feat(antd6): migrate antd 5.29 to 6.6 - #53
Merged
Merged
Conversation
Upgrade antd ^5.24.5 -> ^6.6.5 (@ant-design/icons already 6.3.4).
API renames applied per the official v6 migration guide:
- Modal destroyOnClose -> destroyOnHidden (5 files)
- Modal maskClosable -> mask={{ closable }} (6 files)
- Space/Steps direction -> orientation (92 sites)
- Alert message -> title (95 sites)
- Statistic valueStyle -> styles={{ content }} (9 sites + StatCard)
- Drawer width -> size (4 Drawer sites; Modal width untouched)
- Divider type=vertical -> orientation; orientation=left -> titlePlacement=start
- Table size=middle -> medium (TrashPage)
- notification payload message -> title (utils/taskNotify.ts, NotifyHost mocks)
- assistant-composer.css / form-state.css: v6 Select/TextArea DOM class updates
Test convention updates (v6 evidence from jsdom probes):
- .ant-select-selector removed in v6 -> .ant-select-content
- .ant-notification-notice-message -> .ant-notification-notice-title
- Form.useWatch notifies asynchronously -> tests await derived state
Verified: vitest 801/801, eslint 0 errors (11 pre-existing warnings),
tsc clean, rolldown build ok, lockfile platform bindings match main
(rolldown 15 / lightningcss 12 / fsevents 1).
prettier re-wraps lines whose width changed after direction -> orientation and related renames; fixes the format:check job.
magicapple123
added a commit
that referenced
this pull request
Oct 2, 2026
Follow-up to #53, unblocked by the user's visual verification. List→Listy across 19 files/30 uses (Listy is NOT 1:1 with List: items/rowKey required, no loading/locale/bordered/size/Meta — rebuilt via shared ListyItem/ListyMeta components + token-based listyPadding density parity, loading→Spin wrapper, emptyText→Empty, bordered→styles.root; ConversationSidebar CSS .ant-list-item→.ant-listy-item), addonAfter/addonBefore→Space.Compact (3 places, Form.Item label↔input association preserved), Dropdown.Button→Space.Compact+Button+Dropdown (JobsPage). Single test-scope change (closest li→.ant-listy-item), assertions unchanged. CI 10/10.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
antd
^5.24.5→^6.6.5(React 保持 18.3.1;@ant-design/icons6.3.4 已是 v6 配套)。Supersedes #20(dependabot 的 antd 6 bump,只动了版本号,未处理迁移面;本 PR 合并后该 PR 可关闭)。
迁移面(对齐官方 v6 迁移指南,全仓 grep 驱动 +
@ant-design/cli migrate v5 v6扫描核对)destroyOnClose→destroyOnHidden(5 处)maskClosable→mask={{ closable }}(6 处)direction→orientation(92 处)message→title(95 处)valueStyle→styles={{ content }}(9 处 + StatCard 透传)width→size(4 处 Drawer;Modal 的width未弃用,不动)type="vertical"→orientation="vertical";文字对齐orientation="left"→titlePlacement="start"(v6 中 orientation 语义变更为方向)size="middle"→medium(TrashPage)message→title(utils/taskNotify.ts类型与实现、两处测试 fake host).ant-input-textarea包装、Select 占位/值类名更名(ant-select-placeholder/ 值文本落在.ant-select-content),assistant-composer.css、form-state.css选择器同步更新(均有 jsdom DOM 探针证据)测试惯例变化(附 v6 行为证据,断言未放松)
.ant-select-selector包装层在 v6 被移除 → mousedown 目标改为.ant-select-content(探针实测打开下拉有效,option 类名ant-select-item-option不变).ant-notification-notice-message→.ant-notification-notice-titleForm.useWatch在 v6 改为异步通知:受控组件派生态晚一拍落地,相关测试改为waitFor等待(真实浏览器同样有一帧延迟,行为不变)已知残留(v6 仍可用、仅控制台警告,v7 才移除;结构性重构建议随真机视觉验证另行处理)
List→Listy(24 个文件,v6.6 新组件)Input/InputNumber addonAfter→Space.Compact(3 文件)Dropdown.Button→Space.Compact + Dropdown + Button(JobsPage 1 处)验证
npm run test:123 文件 / 801 用例全绿npm run lint:0 error / 11 warning(存量基线持平)npm run typecheck:通过