Skip to content

refactor: migrate rc-overflow to @rc-component/overflow to drop rc-util#56074

Merged
afc163 merged 4 commits intofeaturefrom
drop-rc-overflow
Dec 4, 2025
Merged

refactor: migrate rc-overflow to @rc-component/overflow to drop rc-util#56074
afc163 merged 4 commits intofeaturefrom
drop-rc-overflow

Conversation

@yoyo837
Copy link
Contributor

@yoyo837 yoyo837 commented Dec 4, 2025

中文版模板 / 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 refactor: migrate rc-overflow to @rc-component/overflow to drop rc-util
🇨🇳 Chinese 迁移 rc-overflow@rc-component/overflow 以删除 rc-util

@bolt-new-by-stackblitz
Copy link

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

👁 Visual Regression Report for PR #56074 Failed ❌

🎯 Target branch: feature (408afb0)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 4 changed

Expected (Branch feature) Actual (Current PR) Diff
button-debug-color-variant.compact.png button-debug-color-variant.compact.png button-debug-color-variant.compact.png button-debug-color-variant.compact.png
button-debug-color-variant.dark.png button-debug-color-variant.dark.png button-debug-color-variant.dark.png button-debug-color-variant.dark.png
button-debug-color-variant.default.png button-debug-color-variant.default.png button-debug-color-variant.default.png button-debug-color-variant.default.png
table-sticky.dark.png table-sticky.dark.png table-sticky.dark.png table-sticky.dark.png

Important

There are 4 diffs found in this PR: 🔄 4 changed.
Please check all items:

  • Visual diff is acceptable

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Preview is ready

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 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.

📝 Walkthrough

Summary by CodeRabbit

发布说明

  • 新功能

    • 新增徽章(Badge)组件,支持计数、点状和偏移等多种显示样式
    • Alert 和 Drawer 组件的关闭按钮现在支持自定义样式和类名
    • ConfigProvider 现已支持为弹出式组件(Tooltip、Popover、Popconfirm)统一配置触发事件类型
    • 弹出式组件现可继承 ConfigProvider 中的触发事件配置
  • 文档

    • 新增 Tooltip 键盘可访问性使用指南
  • 改进

    • Drawer 组件的可调整大小功能现支持布尔值或详细配置

✏️ Tip: You can customize this high-level summary in your review settings.

概览

该PR涉及模块结构重构、组件重命名、新增Badge组件、语义增强(关闭按钮样式)、覆盖层组件的上下文触发配置,以及包依赖项更新。

变更

内聚块 / 文件 变更摘要
模块导入路径重构
components/_util/ActionButton.tsx, components/button/Button.tsx, components/button/__tests__/delay-timer.test.tsx, components/button/__tests__/index.test.tsx, components/button/buttonHelpers.tsx, components/button/index.tsx, components/date-picker/PickerButton.tsx, components/dropdown/dropdown-button.tsx, components/float-button/FloatButton.tsx, components/input/Search.tsx, components/modal/components/NormalCancelBtn.tsx, components/modal/components/NormalOkBtn.tsx, components/modal/interface.ts, components/popconfirm/PurePanel.tsx, components/qr-code/QrcodeStatus.tsx, components/table/hooks/useFilter/FilterDropdown.tsx, components/tour/panelRender.tsx, components/transfer/Actions.tsx, components/upload/UploadList/index.tsx
更新Button相关导入路径:从../button../button/button改为../button/Button;从./button-group改为./ButtonGroup;从../button/button-group改为../button/ButtonGroup。无运行时或行为变化。
Card组件重命名
components/card/Card.tsx, components/card/CardGrid.tsx, components/card/CardMeta.tsx, components/card/index.tsx, components/index.ts
Grid重命名为CardGrid,Meta重命名为CardMeta。更新Card.Grid和Card.Meta绑定。更新导出路径和类型声明。
Alert组件语义增强
components/alert/Alert.tsx, components/alert/ErrorBoundary.tsx, components/alert/__tests__/index.test.tsx, components/alert/demo/_semantic.tsx, components/alert/index.tsx, components/index.ts
添加'close'语义命名。CloseIconProps增加className和style字段。ErrorBoundaryProps导出为公开接口。新增close相关的classNames和styles属性。
Badge组件新增
components/badge/Badge.tsx, components/badge/index.tsx
新增完整Badge组件实现,包含count、dot、offset、status等配置。支持语义classNames/styles集成。使用CSSMotion和ScrollNumber实现动画效果。
Drawer组件增强
components/drawer/DrawerPanel.tsx, components/drawer/__tests__/semantic.test.tsx, components/drawer/demo/_semantic.tsx, components/drawer/index.tsx, components/drawer/index.en-US.md, components/drawer/index.zh-CN.md
添加'close'语义支持。resizable属性类型扩展为boolean | DrawerResizableConfig
覆盖层组件触发配置
components/tooltip/index.tsx, components/popover/index.tsx, components/popconfirm/index.tsx, components/config-provider/context.ts, components/config-provider/index.en-US.md, components/config-provider/index.zh-CN.md, components/config-provider/__tests__/popup.test.tsx
为Tooltip、Popover、Popconfirm添加上下文触发配置。支持通过ConfigProvider全局配置trigger属性。实现trigger的上下文合并逻辑。
虚拟列表包更新
components/list/demo/virtual-list.md, components/list/demo/virtual-list.tsx, docs/blog/historical-debt.en-US.md, docs/blog/historical-debt.zh-CN.md, docs/blog/virtual-table.en-US.md, docs/blog/virtual-table.zh-CN.md, docs/react/recommendation.en-US.md, docs/react/recommendation.zh-CN.md, tests/__mocks__/@rc-component/virtual-list.ts, tests/__mocks__/rc-virtual-list.ts
将虚拟列表包引用从rc-virtual-list更新为@rc-component/virtual-list。更新文档和mock配置。
工作流安全文档
.github/WORKFLOWS_SECURITY.md
扩展Background部分的风险和攻击者能力描述。增加Safe workflows和Build/Deploy阶段列表项。添加Input Validation相关说明。
依赖项更新
package.json
升级多个@rc-component包版本。添加@rc-component/virtual-list到devDependencies,移除rc-virtual-list。
文档和FAQ增强
components/tooltip/shared/sharedFAQ.en-US.md, components/tooltip/shared/sharedFAQ.zh-CN.md
添加新FAQ章节说明Tooltip键盘无障碍支持配置方式。

预估代码审查工作量

🎯 4 (复杂) | ⏱️ ~60 分钟

需要重点关注的区域:

  • Badge组件的新增实现逻辑,包括计数、点状态缓存、动画集成
  • 多个组件间的导入路径一致性验证
  • Card组件的重命名是否完整覆盖所有公共接口和内部引用
  • Alert和Drawer的'close'语义支持是否与现有样式系统兼容
  • 覆盖层组件的trigger上下文合并逻辑与现有默认行为的兼容性
  • 虚拟列表包迁移对现有功能的影响

诗歌

🐰 文件路径换新衣,组件重名显新姿
徽章新生伴关闭,覆盖层融上下文
虚拟表单迁新家,代码整洁又舒畅
兔子欢跳庆更新,质量提升数倍强

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main refactoring: migrating from rc-overflow to @rc-component/overflow. It directly matches the primary objective of the changeset.
Description check ✅ Passed The PR description includes changelog entries and references the migration purpose. However, the template sections for background/solution and related issues lack substantial detail about the rationale and impact.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@yoyo837 yoyo837 changed the base branch from master to feature December 4, 2025 09:32
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @yoyo837, 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 represents a significant refactoring effort focused on modernizing the component library's internal dependencies and structure. The primary change involves migrating several rc- packages to their @rc-component/ equivalents, most notably rc-virtual-list to @rc-component/virtual-list, which contributes to bundle size optimization. Concurrently, core components like Button, Card, and Badge have been restructured into dedicated files to enhance modularity and maintainability. Further improvements include expanded semantic styling options for the close buttons of Alert and Drawer components, and the introduction of global trigger configuration via ConfigProvider for Tooltip, Popover, and Popconfirm, which streamlines accessibility settings. These changes collectively aim to improve the library's performance, maintainability, and user experience.

Highlights

  • Dependency Migration to @rc-component: Key internal dependencies, including rc-virtual-list, have been migrated to their newer @rc-component/ counterparts, aiming for improved bundle size and modern architecture.
  • Component File Restructuring: Several components, such as Button, Card, and Badge, have undergone internal file re-organization, with main component logic moved to dedicated files (e.g., Button.tsx) for better modularity.
  • Enhanced Semantic Styling for Close Buttons: The Alert and Drawer components now support more granular semantic styling for their close buttons, allowing for greater customization of their appearance.
  • Global Trigger Configuration for Overlay Components: The ConfigProvider now offers a global option to configure the trigger property for Tooltip, Popover, and Popconfirm, facilitating consistent accessibility settings across the application.
  • Accessibility Snapshot Refinements: Numerous test snapshots were updated to remove aria-describedby="test-id", reflecting a standardization or improvement in how accessibility attributes are handled.
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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 4, 2025

Deploying ant-design-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9aa236
Status: ✅  Deploy successful!
Preview URL: https://06e47c78.ant-design-next.pages.dev
Branch Preview URL: https://drop-rc-overflow.ant-design-next.pages.dev

View logs

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

size-limit report 📦

Path Size
dist/antd.min.js 524.27 KB (-3.9 KB 🔽)
dist/antd-with-locales.min.js 617.23 KB (-4.04 KB 🔽)

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 refactors the project by migrating from rc-overflow to @rc-component/overflow. This is achieved by updating several @rc-component/* dependencies to newer versions that incorporate this change. A related comment in components/date-picker/style/util.ts has also been updated to reflect this migration. The changes are straightforward and align with the goal of the pull request.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 4, 2025

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 4, 2025

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9aa236
Status: ✅  Deploy successful!
Preview URL: https://cb340d8f.ant-design.pages.dev
Branch Preview URL: https://drop-rc-overflow.ant-design.pages.dev

View logs

@yoyo837 yoyo837 changed the title refactor: migrate rc-overflow to @rc-component/overflow refactor: migrate rc-overflow to @rc-component/overflow to drop rc-util Dec 4, 2025
@socket-security
Copy link

socket-security bot commented Dec 4, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addeddekko@​0.2.1981008877100
Updated@​rc-component/​picker@​1.7.1 ⏵ 1.8.079 -710010097 +2100
Updated@​rc-component/​menu@​1.1.5 ⏵ 1.2.081 +110010095 +2100
Updated@​rc-component/​tabs@​1.6.0 ⏵ 1.7.085 +110010095 +5100
Updated@​rc-component/​mentions@​1.5.5 ⏵ 1.6.08610010098 +2100

View full report

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (58e3f85) to head (a9aa236).
⚠️ Report is 5 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #56074   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          804       804           
  Lines        14838     14838           
  Branches      3919      3919           
=========================================
  Hits         14838     14838           

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

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 4, 2025
@thinkasany
Copy link
Member

size-limit report 📦

Path Size
dist/antd.min.js 524.27 KB (-3.9 KB 🔽)
dist/antd-with-locales.min.js 617.23 KB (-4.04 KB 🔽)

🐮 小这么多

image

@afc163
Copy link
Member

afc163 commented Dec 4, 2025

降这么多,开心!

@afc163 afc163 merged commit 82ebd44 into feature Dec 4, 2025
43 checks passed
@afc163 afc163 deleted the drop-rc-overflow branch December 4, 2025 15:04
@yoyo837
Copy link
Contributor Author

yoyo837 commented Dec 4, 2025

降这么多,开心!

还有个 @ant-design/react-slick, 还能再开心一次;

@codecov
Copy link

codecov bot commented Dec 4, 2025

Bundle Report

Changes will decrease total bundle size by 12.53kB (-0.32%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.87MB -12.53kB (-0.32%) ⬇️

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.min.js -6.27kB 2.13MB -0.29%
antd.min.js -6.27kB 1.74MB -0.36%

@coderabbitai coderabbitai bot mentioned this pull request Dec 8, 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.

3 participants