feat: remove plugin from default registry#562
feat: remove plugin from default registry#562hexqi merged 3 commits intoopentiny:refactor/developfrom
Conversation
WalkthroughThe recent changes involve significant restructuring of the configuration setup across multiple files. Key modifications include reorganization of imports, updates to toolbars, plugins, and settings, and simplification of theme handling. The changes aim to streamline the initialization and configuration processes, enhance clarity, and improve maintainability by consolidating and updating various components and configurations. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant Registry
participant Theme
User->>App: Initialize Preview
App->>Registry: Merge registry with defaultRegistry
Registry->>App: Return merged registry
App->>Theme: Import theme based on configuration
Theme-->>App: Theme applied
App-->>User: Preview initialized
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- designer-demo/registry.js (2 hunks)
- designer-demo/src/preview.js (1 hunks)
- packages/design-core/index.js (1 hunks)
- packages/design-core/registry.js (2 hunks)
- packages/design-core/src/init.js (1 hunks)
- packages/design-core/src/preview/src/App.vue (1 hunks)
- packages/design-core/src/preview/src/main.js (1 hunks)
Files skipped from review due to trivial changes (1)
- packages/design-core/src/preview/src/App.vue
Additional comments not posted (4)
designer-demo/src/preview.js (1)
15-15: EnsureinitPreviewfunction properly handles the new configuration object.packages/design-core/src/preview/src/main.js (1)
15-16: Verify integration ofdefaultRegistrywith custom registries ininitPreview.Also applies to: 20-23
Verification successful
The integration of
defaultRegistrywith custom registries in theinitPreviewfunction has been verified. The function merges the customregistrywithdefaultRegistryusingmergeRegistry.
packages/design-core/src/preview/src/main.js:
- Line 21:
defineEntry(mergeRegistry(registry, defaultRegistry))Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of `defaultRegistry` with custom registries. # Test: Search for the function usage. Expect: Proper integration and no errors. rg --type javascript $'initPreview'Length of output: 69
Script:
#!/bin/bash # Description: Verify the integration of `defaultRegistry` with custom registries. # Test: Search for the function usage. Expect: Proper integration and no errors. rg --type js $'initPreview'Length of output: 391
Script:
#!/bin/bash # Description: Extract the implementation of `initPreview` to verify the integration of `defaultRegistry`. # Test: Extract the function implementation. Expect: Proper integration of `defaultRegistry`. ast-grep --lang javascript --pattern $'export const initPreview = ({ registry }) => { $$$ }' packages/design-core/src/preview/src/main.jsLength of output: 905
designer-demo/registry.js (1)
13-43: Reorganized imports and configurations improve clarity and maintainability.Also applies to: 45-89
packages/design-core/index.js (1)
36-36: Export ofdefaultRegistrylooks good and aligns with the PR's objectives.Verification successful
The
defaultRegistryis used extensively across various modules, including test files and source files. This confirms that the export ofdefaultRegistryis correctly integrated and utilized within the codebase.
packages/entry/test/entryHash.test.jspackages/entry/src/entryHash.jspackages/design-core/src/init.jspackages/design-core/src/preview/src/main.jsScripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify usage of `defaultRegistry` across other modules. # Test: Search for the usage of `defaultRegistry`. Expect: Proper usage across the modules. rg --type python $'defaultRegistry'Length of output: 65
Script:
#!/bin/bash # Description: Verify usage of `defaultRegistry` across other modules. # Test: Search for the usage of `defaultRegistry`. Expect: Proper usage across the modules. rg --type js 'defaultRegistry'Length of output: 3018
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/design-core/src/preview/src/main.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/design-core/src/preview/src/main.js
* feat: remove plugin from default registry * fix: merge registry inside init function * fix: use merged registry to get theme
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Refactor