-
Notifications
You must be signed in to change notification settings - Fork 277
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
docs: 删除smb配置以及相关依赖 #2332
docs: 删除smb配置以及相关依赖 #2332
Conversation
WalkthroughThe changes in this pull request primarily involve the removal of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
[e2e-test-warn] The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug". Please make sure you've read our contributing guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (11)
- examples/docs/newsrc/pc.vue (1 hunks)
- examples/docs/package.json (0 hunks)
- examples/sites/package.json (0 hunks)
- examples/sites/playground/App.vue (4 hunks)
- examples/sites/src/tools/useTheme.js (1 hunks)
- examples/vue2/package.json (3 hunks)
- examples/vue3/package.json (0 hunks)
- internals/cli/src/commands/build/build-ui.ts (2 hunks)
- internals/cli/src/commands/create/commonMapping.json (1 hunks)
- packages/design/smb/index.ts (0 hunks)
- packages/design/smb/package.json (0 hunks)
💤 Files with no reviewable changes (5)
- examples/docs/package.json
- examples/sites/package.json
- examples/vue3/package.json
- packages/design/smb/index.ts
- packages/design/smb/package.json
🧰 Additional context used
🔇 Additional comments (14)
internals/cli/src/commands/create/commonMapping.json (1)
Line range hint
1-57
: LGTM! Removal of DesignSmb entry is consistent with PR objectives.The removal of the "DesignSmb" entry from this mapping file aligns well with the PR's goal of removing SMB configuration and related dependencies. This change is consistent with other modifications across the project, such as removing '@opentiny/vue-design-smb' from package.json files and updating the build process. The JSON structure remains valid after this removal.
examples/vue2/package.json (4)
5-5
: LGTM: Repositioning ofprivate
fieldThe
private
field has been moved. This change doesn't affect functionality and is likely for better organization of the package.json file.
Line range hint
1-62
: Summary of changes and next stepsThe changes in this file align with the PR objectives of removing SMB configuration and related dependencies. The shift towards SAAS theming is evident, and new dependencies suggest the introduction of new features or tools.
Next steps:
- Provide clarification on the purpose and impact of the new dependencies.
- Run the verification scripts to ensure complete removal of SMB-related code and proper usage of new dependencies.
- Update documentation to reflect these dependency changes and any new features they introduce.
Overall, these changes seem to be moving the project in the intended direction, but careful verification is needed to ensure smooth transition and maintain project stability.
Line range hint
1-62
: Verify complete removal of @opentiny/vue-design-smbThe removal of
@opentiny/vue-design-smb
aligns with the PR objective. This change is consistent with similar removals in other package.json files.Please run the following script to ensure complete removal of SMB-related code:
#!/bin/bash # Description: Verify complete removal of @opentiny/vue-design-smb echo "Checking for any remaining references to vue-design-smb:" rg -i 'vue-design-smb' echo "Checking for any remaining SMB theme usage:" rg -i 'theme.*smb'
30-33
: Clarify the purpose and impact of new dependenciesSeveral new dependencies have been added:
- @tiptap/vue-2
- @unocss/core, @unocss/preset-icons, @unocss/transformer-directives, unocss
- js-sha256
- onigasm
These additions suggest new features or tools being incorporated into the project. Could you please clarify:
- The purpose of each new dependency?
- How they align with the PR objectives?
- Any potential impact on the project's performance or build process?
To help assess the impact, please run:
#!/bin/bash # Description: Check for usage of new dependencies in the project echo "Checking for Tiptap usage:" rg -i 'tiptap' echo "Checking for UnoCSS usage:" rg -i 'unocss' echo "Checking for js-sha256 usage:" rg -i 'js-sha256' echo "Checking for onigasm usage:" rg -i 'onigasm'Also applies to: 39-39, 41-41, 46-46
examples/sites/playground/App.vue (5)
74-77
: LGTM: Theme selection simplifiedThe condition for including design themes has been updated to only consider 'aurora' and 'saas'. This change aligns with the PR objective of removing SMB configuration and related dependencies.
92-93
: LGTM: Consistent theme validationThe theme validation has been updated to only consider 'aurora' and 'saas' as valid themes, defaulting to 'default' for unsupported themes. This change is consistent with the earlier modification in the import map creation and aligns with the removal of the 'smb' theme.
135-135
: LGTM: Removed unused 'smb' theme mappingThe 'smb' entry has been removed from the designThemeMap object, which is consistent with the overall changes to remove SMB configuration and related dependencies.
146-152
: LGTM: Consistent theme configuration updatesThe conditions for importing design configurations and applying design themes have been updated to only consider supported themes ('aurora', 'saas', and 'infinity'). These changes are consistent with the previous modifications and align with the removal of the 'smb' theme support.
Line range hint
1-368
: Overall assessment: SMB theme successfully removedThe changes in this file consistently remove all references to the 'smb' theme and related configurations. This aligns well with the PR objective of removing SMB configuration and its dependencies. The modifications maintain code clarity and structure while simplifying theme-related logic. No new issues or potential problems were introduced by these changes.
Here's a summary of the key changes:
- Updated import map creation to exclude 'smb' theme
- Modified theme validation to only consider 'aurora' and 'saas' as valid themes
- Removed 'smb' entry from the designThemeMap
- Updated conditions for importing design configurations and applying design themes
These changes should simplify maintenance and usage of the component in the future by focusing on the supported themes.
internals/cli/src/commands/build/build-ui.ts (3)
203-203
: LGTM: Removal of 'design/smb' from matchListThe removal of 'design/smb' from the
matchList
array aligns with the PR objective of removing SMB configuration. This change will affect how certain file paths are matched during the build process, specifically for determining the main and module entries in the generated package JSON.
329-329
: LGTM: Updated regex for design packagesThe regular expression for design packages has been updated to remove 'smb', which is consistent with the PR objective. This change will affect how PNG files are handled for different design packages during the build process. The updated regex now only includes 'saas' and 'aurora' designs.
Line range hint
1-465
: Overall changes look goodThe modifications in this file consistently remove SMB-related configurations, aligning with the PR objective. The changes affect the build process for UI components, specifically in how design packages are handled and how file paths are matched. These updates don't introduce any apparent bugs or issues and maintain the overall structure and logic of the file.
examples/docs/newsrc/pc.vue (1)
266-267
: Verify that 'tiny-aurora-theme' functions correctly without a design configurationWhile the removal of
designSmbConfig
and assigning an empty object to'tiny-smb-theme'
aligns with the objective to eliminate SMB configurations, assigning an empty object to'tiny-aurora-theme'
may have unintended consequences. Please verify that'tiny-aurora-theme'
does not require a specific design configuration to function properly. Assigning an empty object might lead to issues in theme rendering or inconsistencies in the user interface if the theme relies on particular configurations.Run the following script to check for any references to a design configuration specific to
'tiny-aurora-theme'
:
"@opentiny/vue-theme-mobile": "workspace:~", | ||
"@opentiny/vue-theme-saas": "workspace:~", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Residual SMB theme references detected
Several files still reference smb-theme
, which conflicts with the removal of SMB configuration:
- examples/sites/demos/pc/webdoc/theme.md
- packages/theme/src/theme/index.js
- internals/automate/src/theme-swap/index.ts
- examples/sites/src/router.js
🔗 Analysis chain
Verify usage of @opentiny/vue-theme-saas
The addition of @opentiny/vue-theme-saas
aligns with the PR objective of removing SMB configuration. This change suggests a shift towards using the SAAS theme.
Please run the following script to verify the usage of this theme:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the usage of @opentiny/vue-theme-saas in the project
# Test: Search for imports or uses of the SAAS theme
rg -i 'vue-theme-saas'
Length of output: 4859
[DEFAULT_THEME]: {}, | ||
[INFINITY_THEME]: {}, | ||
[AURORA_THEME]: {}, | ||
[SMB_THEME]: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Issues Found: Residual SMB References Detected
The shell script identified multiple remaining references to SMB-related configurations and imports. This indicates that SMB themes are still partially integrated within the codebase.
- Files with SMB References:
packages/vue-icon/src/config/index.ts
packages/theme/src/theme-tool.js
examples/sites/src/tools/useTheme.js
internals/automate/src/theme-swap/index.ts
- Numerous
.less
,.js
, and.md
files across various packages
Recommended Actions:
-
Remove Unnecessary SMB Imports:
- Ensure that all SMB-related imports, such as
@opentiny/vue-design-smb
, are removed if SMB themes are no longer required.
- Ensure that all SMB-related imports, such as
-
Clean Up Theme Configurations:
- Verify that setting theme configurations to empty objects does not leave behind dependencies or affect other themes.
-
Update or Remove SMB-Specific Code:
- Refactor or eliminate SMB-specific code segments found in components, stylesheets, and configuration files.
-
Comprehensive Testing:
- Perform thorough testing to confirm that removing SMB references does not introduce runtime errors or degrade application functionality.
-
Documentation Updates:
- Update any documentation that references SMB themes to reflect their removal or modification.
🔗 Analysis chain
LGTM. Verify impact on theme functionality.
The changes to designConfigMap
align with the project goal of removing SMB-related configurations. All theme configurations are now consistently set to empty objects.
Please ensure that:
- These changes don't negatively impact theme functionality across the application.
- Any components or modules relying on theme-specific configurations are updated accordingly.
- Documentation related to theming is updated to reflect these changes.
To verify the impact, you can run the following script:
This script will help identify any remaining references to theme-specific configurations or SMB-related code that might need attention.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any remaining references to theme-specific configurations
# Test: Search for references to designConfigMap or theme-specific configurations
rg -i '(designConfigMap|theme.*config)'
# Test: Check for any remaining SMB-related imports or configurations
rg -i '(smb|@opentiny/vue-design-smb)'
Length of output: 26911
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
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
Release Notes
New Features
Bug Fixes
Chores
@opentiny/vue-design-smb
from various projects and adding new dependencies in thevue2-example
project.