-
Notifications
You must be signed in to change notification settings - Fork 331
fix(grid): [grid] fix error of grid component and fix huicharts being packaged and excluded #2994
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 update module filtering behavior and tooltip configuration in two parts of the codebase. In the module utility, the filter callback that previously excluded modules with "huicharts" is replaced with an inline arrow function that always returns true, meaning all modules are now included. In the grid component, the tooltip configuration assignment was reformatted into a multi-line version using optional chaining to safely access properties, preventing errors when Changes
Suggested labels
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
internals/cli/src/shared/module-utils.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-vue". (The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. packages/vue/src/grid/src/grid/grid.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-vue". (The package "eslint-plugin-vue" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-vue" was referenced from the config file in ".eslintrc.js » @antfu/eslint-config » @antfu/eslint-config-vue". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. ✨ Finishing Touches
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 (
|
Walkthrough修复了表格组件加载时的报错问题,并修正了 huicharts 被错误排除在打包之外的问题。主要修改包括移除对 huicharts 的路径过滤以及优化了 tooltip 配置的合并逻辑。 Changes
|
|
[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
🧹 Nitpick comments (1)
packages/vue/src/grid/src/grid/grid.ts (1)
376-381: Improved error handling with optional chaining for designConfig accessThe change adds optional chaining when accessing
designConfig.tooltip, which prevents errors whendesignConfigis null or undefined. This is a good defensive programming practice that makes the code more robust.For consistency, consider applying optional chaining to the other
designConfigaccess in the file (line 384) as well:-if (designConfig?.stripe !== undefined && !props.stripe) { +if (designConfig?.stripe !== undefined && !props.stripe) { // aurora规范默认带斑马条纹 props.stripe = designConfig?.stripe }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
internals/cli/src/shared/module-utils.ts(1 hunks)packages/vue/src/grid/src/grid/grid.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: PR Unit Test
- GitHub Check: PR E2E Test (pnpm test:e2e3)
🔇 Additional comments (1)
internals/cli/src/shared/module-utils.ts (1)
54-54:✅ Verification successful
Fix for huicharts being excluded from packaging
The filter that previously excluded modules with 'huicharts' in their path has been replaced with a function that always returns true, ensuring all modules are included. This change aligns with the PR objective to fix the issue of huicharts being incorrectly excluded from the packaging process.
Let's verify the impact of this change by checking what modules were previously being filtered out:
🏁 Script executed:
#!/bin/bash # Check which modules with 'huicharts' in their path will now be included # Find all paths containing 'huicharts' in the modules.json file cat packages/modules.json | grep -i huicharts # List all modules that will now be included that were previously filtered out node -e " const modules = require('./packages/modules.json'); Object.entries(modules).forEach(([key, module]) => { if (module.path && module.path.includes('huicharts')) { console.log(\`Module \${key} with path \${module.path} will now be included\`); } }); "Length of output: 4758
Fix Verified: Huicharts modules now included as expected
The change in
internals/cli/src/shared/module-utils.ts(Line 54) replaces the previous filtering logic withfilterIntercept: () => true. Our verification confirms that all modules with 'huicharts' in their paths (as defined inpackages/modules.json) are now correctly included in the packaging process. This aligns with the PR objective to resolve the issue of huicharts being excluded.
- File affected:
internals/cli/src/shared/module-utils.ts(Line 54)- Verification details: All huicharts-related modules (e.g., Huicharts, HuichartsAmap, HuichartsBar, etc.) are now listed as included based on the output from the verification script.
No further issues remain.
修复表格组件加载报错问题,修复huicharts被打包排除错误
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