Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename plugin name #771

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

hexqi
Copy link
Collaborator

@hexqi hexqi commented Aug 28, 2024

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Built its own designer, fully self-validated

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Background and solution

规范插件包名称

  • 工具栏generate-vue插件改名为 generate-code(不限定生成vue代码,传入不同的出码服务可以生成不同技术栈代码)
  • 状态管理插件plugin-data改名为plugin-state,更符合语义
  • 工具栏锁定插件toolbar-checkinout改名为 toolbar-lock,更易理解(当前图标早已切换为lock,而不是之前的checkin和checkout)

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • New Features

    • Introduced a new state management plugin, replacing the previous data management plugin.
    • Added new constants for managing application states and operation types.
  • Improvements

    • Renamed and restructured toolbar components to reflect broader functionality in code generation.
    • Enhanced clarity in naming conventions for various components and plugins.
  • Bug Fixes

    • Adjusted references in the application to align with the new naming conventions.
  • Chores

    • Updated package configurations to reflect new names and purposes for plugins and toolbars.

Copy link
Contributor

coderabbitai bot commented Aug 28, 2024

Walkthrough

The changes encompass a comprehensive renaming and restructuring of components, exports, and dependencies across various files. Key modifications include renaming GenerateVue to GenerateCode, Data to State, and updating plugin references from @opentiny/tiny-engine-plugin-data to @opentiny/tiny-engine-plugin-state. Additionally, several toolbar entries have been rebranded, reflecting a broader functionality. These alterations indicate a shift in focus towards state management and general code generation capabilities.

Changes

File Path Change Summary
designer-demo/registry.js Renamed exports: GenerateVue to GenerateCode, Data to State.
jsconfig.json Updated plugin and toolbar references: @opentiny/tiny-engine-plugin-data to @opentiny/tiny-engine-plugin-state, @opentiny/tiny-engine-toolbar-checkinout to @opentiny/tiny-engine-toolbar-lock, and @opentiny/tiny-engine-toolbar-generate-vue to @opentiny/tiny-engine-toolbar-generate-code.
packages/build/vite-config/src/vite-plugins/devAliasPlugin.js Renamed aliases: @opentiny/tiny-engine-plugin-data to @opentiny/tiny-engine-plugin-state, @opentiny/tiny-engine-toolbar-checkinout to @opentiny/tiny-engine-toolbar-lock, and @opentiny/tiny-engine-toolbar-generate-vue to @opentiny/tiny-engine-toolbar-generate-code.
packages/design-core/index.js Removed Checkinout, updated imports for Lock, GenerateCode, and State.
packages/design-core/package.json Changed dependencies: @opentiny/tiny-engine-plugin-data to @opentiny/tiny-engine-plugin-state, @opentiny/tiny-engine-toolbar-checkinout to @opentiny/tiny-engine-toolbar-lock, and @opentiny/tiny-engine-toolbar-generate-vue to @opentiny/tiny-engine-toolbar-generate-code.
packages/engine-cli/template/designer/registry.js Renamed exports: Checkinout to Lock, GenerateVue to GenerateCode, and Data to State.
packages/plugins/state/package.json Renamed package from @opentiny/tiny-engine-plugin-data to @opentiny/tiny-engine-plugin-state, updated directory path.
packages/plugins/state/src/js/constants.js Introduced constants: STATE and OPTION_TYPE for state management and operation types.
packages/plugins/state/vite.config.js Changed library name from plugin-data to plugin-state.
packages/register/src/constants.js Renamed GenerateVue in META_APP to GenerateCode.
packages/toolbars/generate-code/meta.js Updated id and title from generate-vue to generate-code.
packages/toolbars/generate-code/package.json Renamed package from @opentiny/tiny-engine-toolbar-generate-vue to @opentiny/tiny-engine-toolbar-generate-code, updated directory path.
packages/toolbars/generate-code/vite.config.js Changed library name from toolbar-generate-vue to toolbar-generate-code, modified external dependencies.
packages/toolbars/lock/package.json Renamed package from @opentiny/tiny-engine-toolbar-checkinout to @opentiny/tiny-engine-toolbar-lock.
packages/toolbars/lock/vite.config.js Changed library name from toolbar-checkinout to toolbar-lock.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant Toolbar
    participant Plugin

    User->>App: Initiate Code Generation
    App->>Toolbar: Call GenerateCode
    Toolbar->>Plugin: Use State Management
    Plugin-->>Toolbar: Return State Info
    Toolbar-->>App: Send Code
    App-->>User: Display Generated Code
Loading

🐰 In a meadow green and wide,
New names hop with joyful pride.
From Vue to Code, we leap and play,
With State in hand, we’ll find our way!
So let’s rejoice, my friends, unite,
For changes bring us pure delight! 🌼✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the refactor-main refactor/develop branch feature label Aug 28, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ab783d8 and 65d7d05.

Files ignored due to path filters (1)
  • packages/plugins/state/assets/test.png is excluded by !**/*.png
Files selected for processing (16)
  • designer-demo/registry.js (2 hunks)
  • jsconfig.json (4 hunks)
  • packages/build/vite-config/src/vite-plugins/devAliasPlugin.js (2 hunks)
  • packages/design-core/index.js (1 hunks)
  • packages/design-core/package.json (2 hunks)
  • packages/engine-cli/template/designer/registry.js (2 hunks)
  • packages/plugins/state/package.json (2 hunks)
  • packages/plugins/state/src/js/common.js (1 hunks)
  • packages/plugins/state/src/js/constants.js (1 hunks)
  • packages/plugins/state/vite.config.js (1 hunks)
  • packages/register/src/constants.js (1 hunks)
  • packages/toolbars/generate-code/meta.js (1 hunks)
  • packages/toolbars/generate-code/package.json (3 hunks)
  • packages/toolbars/generate-code/vite.config.js (1 hunks)
  • packages/toolbars/lock/package.json (1 hunks)
  • packages/toolbars/lock/vite.config.js (1 hunks)
Files skipped from review due to trivial changes (6)
  • packages/plugins/state/package.json
  • packages/plugins/state/src/js/common.js
  • packages/plugins/state/src/js/constants.js
  • packages/toolbars/generate-code/meta.js
  • packages/toolbars/generate-code/package.json
  • packages/toolbars/lock/vite.config.js
Additional comments not posted (23)
packages/toolbars/lock/package.json (1)

2-2: LGTM!

The package name change aligns with the PR objective to improve clarity and semantic relevance.

The code changes are approved.

packages/toolbars/generate-code/vite.config.js (2)

27-27: LGTM!

The library name change aligns with the PR objective to improve clarity and semantic relevance.

The code changes are approved.


32-32: Verify the impact of removing Prettier from the external array.

The removal of the ^prettier.* entry from the external array may affect the build process. Ensure that this change does not introduce any issues.

Run the following script to verify the impact:

packages/plugins/state/vite.config.js (1)

27-27: LGTM!

The library name change aligns with the PR objective to improve clarity and semantic relevance.

The code changes are approved.

designer-demo/registry.js (3)

24-24: LGTM!

The renaming of GenerateVue to GenerateCode aligns with the broader functionality of generating code for various technology stacks.

The code changes are approved.


28-28: LGTM!

The renaming of Data to State aligns better with the intended functionality and improves semantic clarity.

The code changes are approved.


75-75: LGTM!

The renaming of GenerateVue to GenerateCode in the toolbars array aligns with the broader functionality of generating code for various technology stacks.

The code changes are approved.

packages/engine-cli/template/designer/registry.js (3)

17-17: LGTM!

The renaming of Checkinout to Lock enhances understanding, especially since the associated icon has already been updated to represent a lock.

The code changes are approved.


24-24: LGTM!

The renaming of GenerateVue to GenerateCode aligns with the broader functionality of generating code for various technology stacks.

The code changes are approved.


29-29: LGTM!

The renaming of Data to State aligns better with the intended functionality and improves semantic clarity.

The code changes are approved.

packages/register/src/constants.js (1)

29-29: LGTM!

The renaming of GenerateVue to GenerateCode reflects a broader intent in the application's functionality regarding code generation.

The code changes are approved.

packages/design-core/index.js (3)

8-8: LGTM!

The export statement correctly reflects the renaming of the plugin from toolbar-checkinout to toolbar-lock.

The code changes are approved.


14-14: LGTM!

The export statement correctly reflects the renaming of the plugin from generate-vue to generate-code.

The code changes are approved.


19-19: LGTM!

The export statement correctly reflects the renaming of the plugin from plugin-data to plugin-state.

The code changes are approved.

jsconfig.json (3)

11-11: LGTM!

The path for @opentiny/tiny-engine-plugin-state is correctly updated.

The code changes are approved.


27-27: LGTM!

The path for @opentiny/tiny-engine-toolbar-lock is correctly updated.

The code changes are approved.


31-31: LGTM!

The path for @opentiny/tiny-engine-toolbar-generate-code is correctly updated.

The code changes are approved.

packages/design-core/package.json (3)

55-55: LGTM!

The dependency for @opentiny/tiny-engine-plugin-state is correctly updated.

The code changes are approved.


76-76: LGTM!

The dependency for @opentiny/tiny-engine-toolbar-lock is correctly updated.

The code changes are approved.


80-80: LGTM!

The dependency for @opentiny/tiny-engine-toolbar-generate-code is correctly updated.

The code changes are approved.

packages/build/vite-config/src/vite-plugins/devAliasPlugin.js (3)

21-21: LGTM!

The alias renaming from @opentiny/tiny-engine-plugin-data to @opentiny/tiny-engine-plugin-state aligns with the PR objective to improve semantic clarity.

The code changes are approved.


40-40: LGTM!

The alias renaming from @opentiny/tiny-engine-toolbar-checkinout to @opentiny/tiny-engine-toolbar-lock aligns with the PR objective to enhance understanding.

The code changes are approved.


45-45: LGTM!

The alias renaming from @opentiny/tiny-engine-toolbar-generate-vue to @opentiny/tiny-engine-toolbar-generate-code aligns with the PR objective to reflect a broader capability.

The code changes are approved.

@chilingling chilingling merged commit 591ff8e into opentiny:refactor/develop Sep 3, 2024
3 checks passed
yy-wow pushed a commit to yy-wow/tiny-engine that referenced this pull request Oct 10, 2024
规范插件包名称
工具栏generate-vue插件改名为 generate-code(不限定生成vue代码,传入不同的出码服务可以生成不同技术栈代码)
状态管理插件plugin-data改名为plugin-state,更符合语义
工具栏锁定插件toolbar-checkinout改名为 toolbar-lock,更易理解(当前图标早已切换为lock,而不是之前的checkin和checkout)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor-main refactor/develop branch feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants