feat(Progress): Support better customization with semantic classNames & styles#55058
feat(Progress): Support better customization with semantic classNames & styles#55058
Conversation
|
|
|
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
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
👁 Visual Regression Report for PR #55058 Failed ❌
Important There are 5 diffs found in this PR: 🔄
|
There was a problem hiding this comment.
Summary of Changes
Hello @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 introduces a new feature to the Progress component, significantly improving its customization capabilities. By leveraging semantic classNames and styles, developers can now apply custom styling to specific, semantically defined parts of the progress indicator. This enhancement is backed by refined TypeScript definitions, ensuring a more robust and type-safe development experience when extending the component's appearance.
Highlights
- Enhanced Customization: The
Progresscomponent now supports more granular customization of its internal elements (e.g.,root,body,rail,track,indicator) through semanticclassNamesandstyles. - Improved Type Safety: New type definitions (
ProgressClassNamesType,ProgressStylesType) and explicit generic type parameters for theuseMergeSemantichook ensure better type checking and developer experience when customizing theProgresscomponent. - Refactored
useMergeSemanticUsage: TheuseMergeSemantichook is now used with explicit generic types and an options object containingprops, improving its flexibility and type inference.
Using Gemini Code Assist
The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces support for function-based classNames and styles in the Progress component for better customization. The implementation correctly uses the useMergeSemantic hook to resolve these props. However, there's a typing issue across the Progress component and its sub-components (Circle, Line, Steps). The classNames and styles props are typed as full Records, while they are actually Partial records. This can lead to runtime errors. I've suggested changes to correct these types to improve type safety.
size-limit report 📦
|
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 7.91MB (211.1%) ⬆️
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
Deploying ant-design-next with
|
| Latest commit: |
b8faa83
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3716a6cf.ant-design-next.pages.dev |
| Branch Preview URL: | https://semantic-progress.ant-design-next.pages.dev |
Deploying ant-design with
|
| Latest commit: |
b8faa83
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://af43512a.ant-design.pages.dev |
| Branch Preview URL: | https://semantic-progress.ant-design.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #55058 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 793 793
Lines 14634 14638 +4
Branches 3889 3890 +1
=========================================
+ Hits 14634 14638 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|










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