Skip to content

Comments

feat(Progress): Support better customization with semantic classNames & styles#55058

Merged
zombieJ merged 17 commits intonextfrom
semantic-Progress
Sep 22, 2025
Merged

feat(Progress): Support better customization with semantic classNames & styles#55058
zombieJ merged 17 commits intonextfrom
semantic-Progress

Conversation

@li-jia-nan
Copy link
Member

…/styles

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English feat(Progress): Support better customization with semantic classNames…
🇨🇳 Chinese feat(Progress): Support better customization with semantic classNames…

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit 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
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch semantic-Progress

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 17, 2025

Preview is ready

@github-actions
Copy link
Contributor

github-actions bot commented Sep 17, 2025

👁 Visual Regression Report for PR #55058 Failed ❌

🎯 Target branch: next (3cc8666)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 2 changed, 🆕 3 added

Expected (Branch next) Actual (Current PR) Diff
grid-flex-stretch.compact.png grid-flex-stretch.compact.png grid-flex-stretch.compact.png grid-flex-stretch.compact.png
grid-flex-stretch.default.png grid-flex-stretch.default.png grid-flex-stretch.default.png grid-flex-stretch.default.png
progress-style-class.compact.png progress-style-class.compact.png 🆕🆕🆕 Added 🆕🆕🆕
progress-style-class.dark.png progress-style-class.dark.png 🆕🆕🆕 Added 🆕🆕🆕
progress-style-class.default.png progress-style-class.default.png 🆕🆕🆕 Added 🆕🆕🆕

Important

There are 5 diffs found in this PR: 🔄 2 changed, 🆕 3 added.
Please check all items:

  • Visual diff is acceptable

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Progress component now supports more granular customization of its internal elements (e.g., root, body, rail, track, indicator) through semantic classNames and styles.
  • Improved Type Safety: New type definitions (ProgressClassNamesType, ProgressStylesType) and explicit generic type parameters for the useMergeSemantic hook ensure better type checking and developer experience when customizing the Progress component.
  • Refactored useMergeSemantic Usage: The useMergeSemantic hook is now used with explicit generic types and an options object containing props, 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

  1. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 17, 2025

size-limit report 📦

Path Size
dist/antd.min.js 497.24 KB (+23 B 🔺)
dist/antd-with-locales.min.js 588.88 KB (+22 B 🔺)

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 17, 2025

More templates

npm i https://pkg.pr.new/ant-design/ant-design/antd@55058

commit: b8faa83

@codecov
Copy link

codecov bot commented Sep 17, 2025

Bundle Report

Changes will increase total bundle size by 7.91MB (211.1%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
antd.min-array-push 11.66MB 7.91MB (211.1%) ⬆️⚠️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.js (New) 6.13MB 6.13MB 100.0% 🚀
antd.js (New) 5.53MB 5.53MB 100.0% 🚀
antd-with-locales.min.js (Deleted) -2.06MB 0 bytes -100.0% 🗑️
antd.min.js (Deleted) -1.69MB 0 bytes -100.0% 🗑️

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 17, 2025

Deploying ant-design-next with  Cloudflare Pages  Cloudflare Pages

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

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 17, 2025

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: b8faa83
Status: ✅  Deploy successful!
Preview URL: https://af43512a.ant-design.pages.dev
Branch Preview URL: https://semantic-progress.ant-design.pages.dev

View logs

@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e7feb7a) to head (b8faa83).
⚠️ Report is 14 commits behind head on next.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@li-jia-nan li-jia-nan changed the title [WIP] feat(Progress): Support better customization with semantic classNames… feat(Progress): Support better customization with semantic classNames… Sep 18, 2025
@li-jia-nan li-jia-nan changed the title feat(Progress): Support better customization with semantic classNames… feat(Progress): Support better customization with semantic classNames & styles Sep 18, 2025
@li-jia-nan li-jia-nan requested a review from zombieJ September 19, 2025 10:28
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 22, 2025
@zombieJ zombieJ merged commit 701fe71 into next Sep 22, 2025
45 checks passed
@zombieJ zombieJ deleted the semantic-Progress branch September 22, 2025 02:48
@zombieJ zombieJ mentioned this pull request Nov 4, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants