fix(Breadcrumb): custom itemRender style for 6.x#56253
fix(Breadcrumb): custom itemRender style for 6.x#56253afc163 merged 2 commits intoant-design:masterfrom
Conversation
|
|
👁 Visual Regression Report for PR #56253 Failed ❌
Important There are 2 diffs found in this PR: 🔄
|
Summary of ChangesHello @guoyunhe, 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 resolves a styling inconsistency in the Breadcrumb component where custom 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
|
|
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. 📝 WalkthroughWalkthrough修复面包屑链接样式显示错误。更新了BreadcrumbItem组件的className构建逻辑,使用clsx合并样式类;同时调整了样式表中的选择器,使其更具体地针对面包屑项内的链接元素。 Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request correctly fixes an issue with custom styling on Breadcrumb items by ensuring the base CSS class is always applied. The related CSS selectors are also improved for better specificity. The changes are solid, but I've noticed a related bug where className and style props on Breadcrumb.Item are ignored. I've included a suggestion to address this, which would make item-level customization more robust.
More templates
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #56253 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 804 804
Lines 14841 14841
Branches 3922 3922
=========================================
Hits 14841 14841 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportChanges will increase total bundle size by 430 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
Files in
Files in
|
| <li | ||
| className={clsx(`${prefixCls}-item`, mergedClassNames?.item)} | ||
| style={mergedStyles?.item} | ||
| > |
There was a problem hiding this comment.
@afc163 应该是因为自定义 itemRender 缺了 ${componentCls}-link 这个类,我修复一下
我看你的修复方式不是补 link 这个类,而是新增了 item 这个类,对么?
There was a problem hiding this comment.
是的,因为 -link 类在自定义 itemRender 的情况下几乎肯定会丢,不可靠。而上一级 li 上的 -item 类是不变的。







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