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

feat(registry): update registry #578

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

hexqi
Copy link
Collaborator

@hexqi hexqi commented Jun 13, 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

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

  • Refactor
    • Renamed internal references from component to entry across multiple components and modules for consistency and clarity. This change primarily affects the internal structure and should not impact end-user functionality.

Copy link
Contributor

coderabbitai bot commented Jun 13, 2024

Walkthrough

The recent changes across several packages involve a consistent renaming effort where the component property has been updated to entry for better naming semantics. This affects import statements, export objects, and bindings within Vue component files. Additionally, the MetaApp interface in the documentation was updated to reflect this change, along with the inclusion of a new components property. These updates improve code clarity and consistency.

Changes

File Path Change Summary
packages/.../src/layout/DesignPlugins.vue Renamed component property to entry within the plugins.forEach loop.
packages/entry/docs/registry.md Renamed MetaApp interface property from component to entry; added components property.
packages/plugins/.../index.js Renamed imported component to entry and updated the exported object accordingly.
packages/canvas/DesignCanvas/... Updated Canvas... components' properties from component to entry.
packages/layout/.../DesignSettings.vue Renamed setting.component to setting.entry within the <component> tag.
packages/layout/.../DesignToolbars.vue Changed binding from item.component to item.entry within template loops.
packages/layout/.../Main.vue Replaced registry.canvas.component with registry.canvas.entry in a <component> tag.
packages/settings/.../index.js Renamed imported component to entry affecting the exported default object.
packages/toolbars/.../index.js Changed import from component to entry and modified export object accordingly.

Poem

In the code where plugins dwell,
Components once, now entries tell,
Of changes made with care precise,
To names that fit, to code concise.
Developers cheer, with joyous plea,
For clarity in code's decree.
🐇✨🌸


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 Configration 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.

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: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ee181ae and e843b4c.

Files selected for processing (36)
  • packages/design-core/src/layout/DesignPlugins.vue (1 hunks)
  • packages/design-core/src/layout/DesignSettings.vue (1 hunks)
  • packages/design-core/src/layout/DesignToolbars.vue (1 hunks)
  • packages/entry/docs/registry.md (1 hunks)
  • packages/plugins/block/index.js (1 hunks)
  • packages/plugins/bridge/index.js (1 hunks)
  • packages/plugins/data/index.js (1 hunks)
  • packages/plugins/datasource/index.js (1 hunks)
  • packages/plugins/i18n/index.js (1 hunks)
  • packages/plugins/materials/index.js (1 hunks)
  • packages/plugins/page/index.js (1 hunks)
  • packages/plugins/robot/index.js (1 hunks)
  • packages/plugins/schema/index.js (1 hunks)
  • packages/plugins/script/index.js (1 hunks)
  • packages/plugins/tree/index.js (1 hunks)
  • packages/plugins/tutorial/index.js (1 hunks)
  • packages/settings/events/index.js (1 hunks)
  • packages/settings/panel/index.js (1 hunks)
  • packages/settings/props/index.js (2 hunks)
  • packages/settings/styles/index.js (1 hunks)
  • packages/toolbars/breadcrumb/index.js (1 hunks)
  • packages/toolbars/clean/index.js (1 hunks)
  • packages/toolbars/collaboration/index.js (1 hunks)
  • packages/toolbars/fullscreen/index.js (1 hunks)
  • packages/toolbars/generate-vue/index.js (1 hunks)
  • packages/toolbars/lang/index.js (1 hunks)
  • packages/toolbars/layout/index.js (1 hunks)
  • packages/toolbars/lock/index.js (1 hunks)
  • packages/toolbars/logo/index.js (1 hunks)
  • packages/toolbars/logout/index.js (1 hunks)
  • packages/toolbars/media/index.js (1 hunks)
  • packages/toolbars/preview/index.js (1 hunks)
  • packages/toolbars/redoundo/index.js (1 hunks)
  • packages/toolbars/refresh/index.js (1 hunks)
  • packages/toolbars/save/index.js (1 hunks)
  • packages/toolbars/setting/index.js (1 hunks)
Files not summarized due to errors (8)
  • packages/design-core/src/layout/DesignSettings.vue: Error: Server error. Please try again later.
  • packages/plugins/block/index.js: Error: Server error. Please try again later.
  • packages/plugins/data/index.js: Error: Server error. Please try again later.
  • packages/design-core/src/layout/DesignToolbars.vue: Error: Server error. Please try again later.
  • packages/toolbars/save/index.js: Error: Server error. Please try again later.
  • packages/plugins/page/index.js: Error: Server error. Please try again later.
  • packages/settings/events/index.js: Error: Server error. Please try again later.
  • packages/plugins/script/index.js: Error: Server error. Please try again later.
Files skipped from review due to trivial changes (17)
  • packages/plugins/bridge/index.js
  • packages/plugins/i18n/index.js
  • packages/plugins/schema/index.js
  • packages/plugins/tree/index.js
  • packages/settings/panel/index.js
  • packages/settings/props/index.js
  • packages/toolbars/breadcrumb/index.js
  • packages/toolbars/clean/index.js
  • packages/toolbars/collaboration/index.js
  • packages/toolbars/fullscreen/index.js
  • packages/toolbars/generate-vue/index.js
  • packages/toolbars/lang/index.js
  • packages/toolbars/layout/index.js
  • packages/toolbars/lock/index.js
  • packages/toolbars/media/index.js
  • packages/toolbars/preview/index.js
  • packages/toolbars/redoundo/index.js
Additional comments not posted (31)
packages/toolbars/setting/index.js (1)

13-13: LGTM! The renaming from component to entry aligns with the PR objectives of standardizing naming conventions.

Also applies to: 17-17

packages/settings/events/index.js (1)

13-13: LGTM! Consistent application of the renaming strategy across different settings modules.

Also applies to: 18-18

packages/settings/styles/index.js (1)

13-13: The change is consistent and correctly implemented as per the renaming strategy described in the PR.

Also applies to: 18-18

packages/toolbars/logo/index.js (1)

13-13: This change is consistent with the other toolbar modules and aligns with the overall refactoring goals.

Also applies to: 18-18

packages/toolbars/logout/index.js (2)

13-13: Change from component to entry is consistent with the PR's renaming objective.


18-18: Export of entry correctly reflects the updated import. Good job on maintaining consistency.

packages/toolbars/refresh/index.js (2)

13-13: Identical change as in other toolbar modules, maintaining consistency across the project.


18-18: Export of entry is correctly updated to reflect the import change. Consistency is key in large refactors.

packages/plugins/data/index.js (2)

13-13: Change from component to entry aligns with the project-wide renaming initiative.


18-18: Correctly updated export to use entry, maintaining consistency and clarity in module exports.

packages/plugins/robot/index.js (2)

13-13: Consistent renaming from component to entry observed here as well, aligning with refactor goals.


18-18: Export statement correctly reflects the renamed import, ensuring consistency across the codebase.

packages/toolbars/save/index.js (2)

13-13: LGTM! The import statement correctly reflects the renaming from component to entry.


18-18: The export object is updated properly to use entry instead of component. Good consistency with the rest of the changes in the PR.

packages/plugins/block/index.js (2)

13-13: The import statement is correctly updated. Consistent with the project-wide renaming effort.


19-19: Correct update in the export object to reflect the new naming convention.

packages/plugins/page/index.js (2)

13-13: Import statement update is consistent with the renaming strategy across the project.


19-19: The export object correctly uses entry as part of the renaming effort. Well done.

packages/plugins/script/index.js (2)

13-13: The changes to the import statement are correct and align with the renaming initiative in the rest of the codebase.


19-19: Export object update is accurate and consistent with the changes made project-wide.

packages/plugins/tutorial/index.js (1)

13-13: Renaming 'component' to 'entry' aligns with the PR's objective of standardizing naming conventions.

packages/plugins/materials/index.js (3)

13-13: Renaming 'component' to 'entry' aligns with the PR's objective of standardizing naming conventions.


18-18: Export object updated correctly to reflect the renaming. Ensure all references to 'entry' are updated across the project.


22-22: Explicit export of 'entry' ensures it can be used elsewhere. Good practice to maintain modularity.

packages/plugins/datasource/index.js (2)

14-14: Renaming 'component' to 'entry' aligns with the PR's objective of standardizing naming conventions.


19-19: Export object updated correctly to reflect the renaming. Ensure all references to 'entry' are updated across the project.

packages/entry/docs/registry.md (2)

14-14: Documentation updated to reflect the renaming of 'component' to 'entry'. This helps maintain consistency in the codebase.


16-16: Addition of 'components' property in the documentation is well-documented, enhancing the customizability of the module.

packages/design-core/src/layout/DesignSettings.vue (1)

5-5: The renaming of component to entry aligns with the PR's objectives to standardize naming conventions.

packages/design-core/src/layout/DesignToolbars.vue (1)

4-4: Renaming of component to entry in toolbar components is consistent with the overall refactoring strategy.

Also applies to: 7-7, 10-10

packages/design-core/src/layout/DesignPlugins.vue (1)

130-131: The renaming of component to entry and the refactoring of plugin handling logic are correctly implemented. Ensure that all plugins correctly define their entry and icon properties to avoid runtime errors.

@hexqi hexqi marked this pull request as draft June 14, 2024 03:12
@hexqi hexqi marked this pull request as ready for review June 14, 2024 06:52
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 e843b4c and d83e3c1.

Files selected for processing (41)
  • packages/canvas/DesignCanvas/index.js (1 hunks)
  • packages/canvas/DesignCanvas/src/DesignCanvas.vue (2 hunks)
  • packages/canvas/breadcrumb/index.js (1 hunks)
  • packages/canvas/container/index.js (1 hunks)
  • packages/entry/docs/registry.md (1 hunks)
  • packages/layout/src/DesignPlugins.vue (1 hunks)
  • packages/layout/src/DesignSettings.vue (1 hunks)
  • packages/layout/src/DesignToolbars.vue (1 hunks)
  • packages/layout/src/Main.vue (1 hunks)
  • packages/plugins/block/index.js (1 hunks)
  • packages/plugins/bridge/index.js (1 hunks)
  • packages/plugins/data/index.js (1 hunks)
  • packages/plugins/datasource/index.js (1 hunks)
  • packages/plugins/i18n/index.js (1 hunks)
  • packages/plugins/materials/index.js (1 hunks)
  • packages/plugins/page/index.js (1 hunks)
  • packages/plugins/robot/index.js (1 hunks)
  • packages/plugins/schema/index.js (1 hunks)
  • packages/plugins/script/index.js (1 hunks)
  • packages/plugins/tree/index.js (1 hunks)
  • packages/plugins/tutorial/index.js (1 hunks)
  • packages/settings/events/index.js (1 hunks)
  • packages/settings/panel/index.js (1 hunks)
  • packages/settings/props/index.js (2 hunks)
  • packages/settings/styles/index.js (1 hunks)
  • packages/toolbars/breadcrumb/index.js (1 hunks)
  • packages/toolbars/clean/index.js (1 hunks)
  • packages/toolbars/collaboration/index.js (1 hunks)
  • packages/toolbars/fullscreen/index.js (1 hunks)
  • packages/toolbars/generate-vue/index.js (1 hunks)
  • packages/toolbars/lang/index.js (1 hunks)
  • packages/toolbars/layout/index.js (1 hunks)
  • packages/toolbars/lock/index.js (1 hunks)
  • packages/toolbars/logo/index.js (1 hunks)
  • packages/toolbars/logout/index.js (1 hunks)
  • packages/toolbars/media/index.js (1 hunks)
  • packages/toolbars/preview/index.js (1 hunks)
  • packages/toolbars/redoundo/index.js (1 hunks)
  • packages/toolbars/refresh/index.js (1 hunks)
  • packages/toolbars/save/index.js (1 hunks)
  • packages/toolbars/setting/index.js (1 hunks)
Files skipped from review due to trivial changes (6)
  • packages/canvas/breadcrumb/index.js
  • packages/canvas/container/index.js
  • packages/layout/src/DesignToolbars.vue
  • packages/layout/src/Main.vue
  • packages/plugins/page/index.js
  • packages/toolbars/save/index.js
Files skipped from review as they are similar to previous changes (27)
  • packages/entry/docs/registry.md
  • packages/plugins/bridge/index.js
  • packages/plugins/datasource/index.js
  • packages/plugins/i18n/index.js
  • packages/plugins/materials/index.js
  • packages/plugins/robot/index.js
  • packages/plugins/schema/index.js
  • packages/plugins/tree/index.js
  • packages/plugins/tutorial/index.js
  • packages/settings/panel/index.js
  • packages/settings/props/index.js
  • packages/settings/styles/index.js
  • packages/toolbars/breadcrumb/index.js
  • packages/toolbars/clean/index.js
  • packages/toolbars/collaboration/index.js
  • packages/toolbars/fullscreen/index.js
  • packages/toolbars/generate-vue/index.js
  • packages/toolbars/lang/index.js
  • packages/toolbars/layout/index.js
  • packages/toolbars/lock/index.js
  • packages/toolbars/logo/index.js
  • packages/toolbars/logout/index.js
  • packages/toolbars/media/index.js
  • packages/toolbars/preview/index.js
  • packages/toolbars/redoundo/index.js
  • packages/toolbars/refresh/index.js
  • packages/toolbars/setting/index.js
Additional comments not posted (8)
packages/canvas/DesignCanvas/index.js (1)

6-6: Change from component to entry aligns with the PR's objectives and appears correctly implemented.

packages/settings/events/index.js (1)

13-13: Change from component to entry aligns with the PR's objectives and appears correctly implemented.

Also applies to: 18-18

packages/plugins/data/index.js (1)

13-13: Change from component to entry aligns with the PR's objectives and appears correctly implemented.

Also applies to: 18-18

packages/plugins/block/index.js (1)

13-13: Change from component to entry aligns with the PR's objectives and appears correctly implemented.

Also applies to: 19-19

packages/plugins/script/index.js (1)

13-19: The renaming from 'component' to 'entry' is consistent with the PR's objectives and is correctly implemented here.

packages/layout/src/DesignSettings.vue (1)

5-5: The dynamic component binding using 'setting.entry' is correctly implemented and aligns with the renaming strategy of the PR.

packages/canvas/DesignCanvas/src/DesignCanvas.vue (1)

5-5: The renaming from 'component' to 'entry' is consistently applied across the dynamic component bindings and the script section. This ensures uniformity and clarity in the codebase.

Also applies to: 13-13, 181-181

packages/layout/src/DesignPlugins.vue (1)

132-133: The renaming from 'component' to 'entry' in the plugin registration logic is correctly implemented, ensuring consistency across the codebase.

@chilingling chilingling merged commit 43a65d8 into opentiny:refactor/develop Jun 14, 2024
@coderabbitai coderabbitai bot mentioned this pull request Sep 24, 2024
14 tasks
yy-wow pushed a commit to yy-wow/tiny-engine that referenced this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants