perf: uninstall classnames, install clsx#55164
Conversation
|
|
👁 Visual Regression Report for PR #55164 Failed ❌
Important There are 4 diffs found in this PR: 🔄
|
|
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 |
Summary of ChangesHello @li-jia-nan, 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 focuses on a significant internal refactoring to enhance the project's efficiency. By migrating from 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
|
size-limit report 📦
|
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 7.9MB (210.37%) ⬆️
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
There was a problem hiding this comment.
Code Review
This pull request is a great performance-oriented refactoring, replacing the classnames library with the faster and smaller clsx library across the entire codebase. The changes are extensive but have been applied consistently and correctly in all affected files, including the update to package.json. The refactoring is well-executed and should provide a welcome performance boost. I have reviewed all the changes and found no issues. Great work!
Deploying ant-design with
|
| Latest commit: |
4a65962
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d396dcdb.ant-design.pages.dev |
| Branch Preview URL: | https://clsx-update.ant-design.pages.dev |
Deploying ant-design-next with
|
| Latest commit: |
4a65962
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7ce49e76.ant-design-next.pages.dev |
| Branch Preview URL: | https://clsx-update.ant-design-next.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #55164 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 798 798
Lines 14768 14762 -6
Branches 3901 3898 -3
=========================================
- Hits 14768 14762 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: lijianan <574980606@qq.com>
Signed-off-by: lijianan <574980606@qq.com>
Signed-off-by: lijianan <574980606@qq.com>
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Signed-off-by: lijianan <574980606@qq.com>
There was a problem hiding this comment.
Pull Request Overview
This PR removes the classnames dependency and replaces it with clsx for better performance and smaller bundle size. This is a performance optimization that affects many components throughout the codebase.
Key changes:
- Replace
classnameswithclsxin package.json dependencies - Update all imports from
classnamesto{ clsx }fromclsx - Replace all
classNames()function calls withclsx()
Reviewed Changes
Copilot reviewed 209 out of 211 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| package.json | Replace classnames dependency with clsx |
| components/* | Update imports and function calls from classnames to clsx across all component files |
| docs/* | Update documentation examples to use clsx instead of classnames |
| .dumi/* | Update development environment files to use clsx |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |







为了避免影响到 v5,建议发 minor
@zombieJ @afc163 @MadCcc 求发版