feat(spin): Support better customization with semantic classNames/styles as function#55157
Conversation
…les as function - Support classNames/styles as object or function via useMergeSemantic - Add 5 semantic slots: root, wrapper, mask, indicator, tip - Add docs with proper classNames/styles API table entries - Add style-class demo with 4 examples: classNamesObject/classNamesFn/stylesObject/stylesFn - Add comprehensive semantic tests (object & function forms)
- Simplify style processing by removing unnecessary variables - Optimize test to use rerender instead of multiple render calls
|
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
👁 Visual Regression Report for PR #55157 Passed ✅
🎊 Congrats! No visual-regression diff found.
|
Summary of ChangesHello @Susuperli, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces significant enhancements to the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable feature by allowing classNames and styles props on the Spin component to be functions. This greatly enhances customization capabilities. The implementation is clean, leveraging a new useMergeSemantic hook for handling the logic, which is a good abstraction. The changes are also well-supported by new tests and a demonstration, ensuring the feature is robust. I have one suggestion to improve type definition clarity.
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 354 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #55157 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 798 798
Lines 14727 14726 -1
Branches 3896 3895 -1
=========================================
- Hits 14727 14726 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log