-
Notifications
You must be signed in to change notification settings - Fork 310
feat: update changelog and playground #2612
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
Conversation
WalkthroughThe changes in this pull request primarily involve updates to 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: 0
🧹 Outside diff range and nitpick comments (2)
examples/sites/playground/App.vue (2)
87-88
: LGTM: Improved import map configurationThe refactored design import configuration is more concise and maintainable.
Consider extracting the version delimiter logic to a constant:
+const DESIGN_IMPORT_PATH = (theme, version) => + `${cdnHost}/@opentiny/vue-design-${theme}${versionDelimiter}${version}/${fileDelimiter}index.js` if (['aurora', 'saas'].includes(tinyTheme)) { - imports[`@opentiny/vue-design-${tinyTheme}`] = - `${cdnHost}/@opentiny/vue-design-${tinyTheme}${versionDelimiter}${version}/${fileDelimiter}index.js` + imports[`@opentiny/vue-design-${tinyTheme}`] = DESIGN_IMPORT_PATH(tinyTheme, version) }
Line range hint
27-34
: Fix: getVersion function logic errorThe function has a bug where it's not returning the stored version due to incorrect if block structure.
Apply this fix:
const getVersion = () => { if (isPreview) { return versions[0] } if (versions.includes(localStorage.getItem(VERSION))) { - localStorage.getItem(VERSION) + return localStorage.getItem(VERSION) } return versions[0] }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
examples/sites/playground/App.vue
(2 hunks)examples/sites/src/menus.jsx
(2 hunks)
🔇 Additional comments (2)
examples/sites/src/menus.jsx (1)
29-42
:
Breaking Change: Documentation menus are now DEV-only
This change removes documentation menus in production environments, which could impact user experience if documentation access was previously available in production.
Let's verify if this is intentional and if there are any existing uses of docOptions in production:
Consider:
- Adding a comment explaining why documentation menus are restricted to DEV
- Updating user documentation to reflect this change
- Adding a migration guide if this affects existing deployments
✅ Verification successful
Based on the comprehensive analysis of the codebase, I can now generate the final response:
DEV-only documentation is an intentional design pattern
The restriction of documentation menus to DEV environment is an intentional design pattern, as evidenced by:
- The React site implementation (
examples/react-site/src/menus.jsx
) shows docMenus are always included, indicating this is a Vue-specific design choice - The mobile-first implementation (
examples/sites/demos/mobile-first/menus.js
) has an empty docMenus array by default - The PC implementation (
examples/sites/demos/pc/menus.js
) contains the full documentation structure
This pattern aligns with common practices where documentation is available in development for reference but excluded from production builds to reduce bundle size.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any usage of docOptions or documentation-related menu items
rg -l "docOptions|使用指南|User Guide" --type vue --type jsx
Length of output: 86
Script:
#!/bin/bash
# Search for any usage of docOptions or documentation-related menu items
# Using broader file type patterns and checking the actual file content
rg -l "docOptions|使用指南|User Guide"
# Also check for the specific file to understand its full context
cat examples/sites/src/menus.jsx
Length of output: 2879
Script:
#!/bin/bash
# Let's check how docOptions is used in the application
rg "docOptions" -B 2 -A 2
# Also check if there's any documentation about DEV-only docs in README or other docs
fd README -e md -X cat {}
Length of output: 66142
Script:
#!/bin/bash
# Let's check how docMenus is used in the application and if there's any documentation about DEV-only behavior
rg "docMenus" -B 2 -A 2
# Also check for any configuration files that might control this behavior
fd -e config.js -e config.ts -X cat {}
Length of output: 44623
examples/sites/playground/App.vue (1)
Line range hint 26-34
: Verify version compatibility and migration path
The version array update removes older versions ('3.17' and earlier). This could affect users on older versions trying to use the playground.
Let's check for any version-specific dependencies or features:
✅ Verification successful
The previous command failed because the file type 'vue' wasn't recognized. Let's try a broader search and also look for any configuration files that might contain version information. This will help us understand the version dependencies and potential migration impacts.
Based on the search results, I can now provide a final response regarding the version compatibility concern:
Version changes are safe and include proper migration path
The version array update from 3.17
to 3.20
is safe because:
- The codebase shows a clear version progression (3.17 → 3.18 → 3.19 → 3.20) with all packages aligned at version 3.20.0
- There is documented deprecation and migration path for older features (e.g., in milestone component from 3.17)
- The CDN runtime support for 3.17 is maintained in the documentation (README.zh-CN.md)
- The version check in the code includes a fallback to the latest version if an unsupported version is detected
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for version-specific imports or configurations
rg -A 3 "3\.1[7-9]|3\.20" --type vue --type js --type jsx
Length of output: 87
Script:
#!/bin/bash
# Search for version-specific imports or configurations with correct file extensions
rg -A 3 "3\.1[7-9]|3\.20" .
# Also check for any version-related configuration files
fd -e json -e yaml -e yml | xargs cat
Length of output: 65895
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
New Features
Bug Fixes
Documentation