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

fix: data-source dependency configurator package #622

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

lichunn
Copy link
Contributor

@lichunn lichunn commented Jul 3, 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

  • New Features

    • Exported new components MetaCodeEditor, I18nInput, and CanvasDragItem.
  • Improvements

    • Replaced I18nConfigurator with I18nInput for a streamlined configuration experience.
    • Updated component references in RelatedEditorConfigurator.vue for enhanced functionality.
  • Dependency Updates

    • Removed the dependency on @opentiny/tiny-engine-canvas.
  • Refactor

    • Adjusted imports and exports across multiple files to ensure consistent component usage.

Copy link
Contributor

coderabbitai bot commented Jul 3, 2024

Walkthrough

The recent updates primarily focus on restructuring and optimizing component exports across multiple packages. Key components such as MetaCodeEditor, I18nInput, and CanvasDragItem have been reallocated to improve modularity and dependency management. These changes ensure more streamlined imports, reducing complexity and potential redundancy within the codebase.

Changes

File/Directory Change Summary
packages/common/component/index.js Added exports for MetaCodeEditor, I18nInput, and CanvasDragItem
packages/configurator/src/index.js Replaced I18nConfigurator with I18nInput and changed export accordingly
packages/configurator/src/related-editor-configurator/RelatedEditorConfigurator.vue Replaced <code-configurator> with <meta-code-editor> and adjusted import
packages/canvas/index.js Removed export of CanvasDragItem
packages/plugins/materials/package.json Removed dependency on @opentiny/tiny-engine-canvas
packages/plugins/materials/src/meta/component/src/Main.vue Adjusted imports for CanvasDragItem, switching from canvas to common package

Poem

In lines of code, we dance and play,
Components shift, in bright array,
MetaCodeEditor joins the fray,
I18nInput finds a new way.
A canvas clear, without the clutter,
Drag items smoothly, as we utter—
"Here's to modules that do not stutter!"

  ☕✨

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0c71520 and fe8a485.

Files selected for processing (6)
  • packages/common/component/I18nInput.vue (1 hunks)
  • packages/common/component/index.js (1 hunks)
  • packages/configurator/src/index.js (4 hunks)
  • packages/plugins/bridge/package.json (1 hunks)
  • packages/plugins/datasource/package.json (1 hunks)
  • packages/plugins/datasource/src/DataSourceFieldForm.vue (3 hunks)
Files skipped from review due to trivial changes (4)
  • packages/common/component/I18nInput.vue
  • packages/common/component/index.js
  • packages/plugins/bridge/package.json
  • packages/plugins/datasource/package.json
Additional comments not posted (5)
packages/configurator/src/index.js (2)

32-32: Import statement for I18nInput looks good.

The import statement correctly imports I18nInput from @opentiny/tiny-engine-common.


65-65: Export statement for I18nInput as I18nConfigurator looks good.

The export statement ensures backward compatibility by mapping I18nInput to I18nConfigurator.

packages/plugins/datasource/src/DataSourceFieldForm.vue (3)

24-24: Template section change looks good.

The template section correctly replaces i18n-configurator with i18n-input.


39-39: Import statement for I18nInput looks good.

The import statement correctly imports I18nInput from @opentiny/tiny-engine-common.


54-54: Components section change looks good.

The components section correctly adds I18nInput to the list of components.

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 fe8a485 and 1ce7619.

Files selected for processing (1)
  • packages/configurator/src/index.js (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/configurator/src/index.js

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 1ce7619 and 91c7c6a.

Files selected for processing (14)
  • packages/common/component/MetaCodeEditor.vue (1 hunks)
  • packages/common/component/index.js (2 hunks)
  • packages/configurator/src/index.js (5 hunks)
  • packages/configurator/src/related-editor-configurator/RelatedEditorConfigurator.vue (2 hunks)
  • packages/plugins/block/package.json (1 hunks)
  • packages/plugins/block/src/BlockPropertyForm.vue (4 hunks)
  • packages/plugins/data/package.json (1 hunks)
  • packages/plugins/datasource/package.json (1 hunks)
  • packages/plugins/page/package.json (1 hunks)
  • packages/plugins/page/src/PageInputOutput.vue (2 hunks)
  • packages/plugins/robot/package.json (1 hunks)
  • packages/plugins/schema/package.json (1 hunks)
  • packages/plugins/script/package.json (1 hunks)
  • packages/plugins/tree/package.json (1 hunks)
Files skipped from review due to trivial changes (8)
  • packages/common/component/MetaCodeEditor.vue
  • packages/plugins/block/package.json
  • packages/plugins/data/package.json
  • packages/plugins/page/package.json
  • packages/plugins/robot/package.json
  • packages/plugins/schema/package.json
  • packages/plugins/script/package.json
  • packages/plugins/tree/package.json
Files skipped from review as they are similar to previous changes (3)
  • packages/common/component/index.js
  • packages/configurator/src/index.js
  • packages/plugins/datasource/package.json
Additional comments not posted (6)
packages/configurator/src/related-editor-configurator/RelatedEditorConfigurator.vue (2)

Line range hint 6-17:
LGTM! The <meta-code-editor> component is correctly used.

The <code-configurator> component has been successfully replaced with <meta-code-editor>. Ensure that the new component works as expected.


25-30: LGTM! The MetaCodeEditor component is correctly imported and registered.

The MetaCodeEditor component has been successfully imported and registered.

packages/plugins/page/src/PageInputOutput.vue (2)

11-30: LGTM! The <meta-code-editor> component is correctly used.

The <code-configurator> component has been successfully replaced with <meta-code-editor>. Ensure that the new component works as expected.


43-48: LGTM! The MetaCodeEditor component is correctly imported and registered.

The MetaCodeEditor component has been successfully imported and registered.

packages/plugins/block/src/BlockPropertyForm.vue (2)

25-33: LGTM! The <meta-code-editor> component is correctly used.

The <code-configurator> component has been successfully replaced with <meta-code-editor>. Ensure that the new component works as expected.

Also applies to: 89-96, 99-106


Line range hint 125-157:
LGTM! The MetaCodeEditor component is correctly imported and registered.

The MetaCodeEditor component has been successfully imported and registered.

hexqi
hexqi previously approved these changes Jul 5, 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 91c7c6a and 1f8865d.

Files selected for processing (5)
  • packages/canvas/index.js (1 hunks)
  • packages/common/component/CanvasDragItem.vue (1 hunks)
  • packages/common/component/index.js (2 hunks)
  • packages/plugins/materials/package.json (1 hunks)
  • packages/plugins/materials/src/meta/component/src/Main.vue (1 hunks)
Files skipped from review due to trivial changes (3)
  • packages/canvas/index.js
  • packages/common/component/CanvasDragItem.vue
  • packages/plugins/materials/package.json
Files skipped from review as they are similar to previous changes (1)
  • packages/common/component/index.js
Additional comments not posted (1)
packages/plugins/materials/src/meta/component/src/Main.vue (1)

35-35: LGTM! But verify the new import path.

The change to import CanvasDragItem from @opentiny/tiny-engine-common looks good.

However, ensure that the new import path is correct and the component is available.

Verification successful

The new import path is correct.

The CanvasDragItem component is available in @opentiny/tiny-engine-common.

  • Verified in packages/common/component/index.js
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the availability of `CanvasDragItem` in `@opentiny/tiny-engine-common`.

# Test: Search for the component definition. Expect: At least one match.
rg --type vue $'CanvasDragItem' --glob '**/node_modules/@opentiny/tiny-engine-common/**'

Length of output: 115


Script:

#!/bin/bash
# Description: Verify the availability of `CanvasDragItem` in `@opentiny/tiny-engine-common`.

# Test: Search for the component definition. Expect: At least one match.
rg 'CanvasDragItem' --glob '**/node_modules/@opentiny/tiny-engine-common/**/*.js' --glob '**/node_modules/@opentiny/tiny-engine-common/**/*.ts'

Length of output: 292


Script:

#!/bin/bash
# Description: Verify the availability of `CanvasDragItem` in `@opentiny/tiny-engine-common`.

# Test: Search for the component definition with debug information. Expect: At least one match.
rg 'CanvasDragItem' --glob '**/node_modules/@opentiny/tiny-engine-common/**/*.js' --glob '**/node_modules/@opentiny/tiny-engine-common/**/*.ts' --debug

Length of output: 332175


Script:

#!/bin/bash
# Description: Verify the availability of `CanvasDragItem` in `@opentiny/tiny-engine-common`.

# Test: Search for the component definition. Expect: At least one match.
rg 'CanvasDragItem' --glob 'packages/plugins/materials/src/meta/component/src/**/*.js' --glob 'packages/plugins/materials/src/meta/component/src/**/*.ts'

Length of output: 302


Script:

#!/bin/bash
# Description: Verify the availability of `CanvasDragItem` in `@opentiny/tiny-engine-common`.

# Test: Search for the component definition. Expect: At least one match.
rg 'CanvasDragItem' --glob '**/*.js' --glob '**/*.ts'

Length of output: 153

@hexqi hexqi merged commit b8da605 into opentiny:refactor/develop Jul 11, 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