Skip to content

Conversation

Copy link

Copilot AI commented Nov 25, 2025

  • Review Ant Design v6 migration guide and breaking changes
  • Update antd dependency from ^5.28.1 to ^6.0.0
  • Update peerDependencies for antd to ^6.0.0
  • Update @ant-design/cssinjs from ^1.24.0 to ^2.0.1
  • Update @ant-design/icons from ^5.6.1 to ^6.1.0
  • Update React peer dependency from >=17.0.0 to >=18.0.0
  • Fix useStyle hook to work with new useStyleRegister return type (void)
  • Update Popover styles API from 'body' to 'container'
  • Add required cssVar configuration to useCacheToken
  • Run TypeScript type check - all errors fixed
  • Run build - compilation succeeds
  • Update test snapshots for antd v6
  • Run tests to verify functionality
  • Address any test failures
  • Review and update documentation if needed
Original prompt

升级到 antd v6


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Important

Review skipped

Bot user detected.

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.


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

@socket-security
Copy link

socket-security bot commented Nov 25, 2025

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedantd@​6.0.0871001009980
Added@​ant-design/​icons@​6.1.0891008788100
Added@​ant-design/​cssinjs@​2.0.19810010097100

View full report

@afc163
Copy link
Member

afc163 commented Nov 25, 2025

@copilot snapshot 需要更新一下

Copy link
Author

Copilot AI commented Nov 25, 2025

@copilot snapshot 需要更新一下

已更新 snapshot,提交在 84ff1af

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • at.alicdn.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node -e const sendRequest = require('http').request; const options = { "method": "GET", "headers": { "Accept": "*/*", "Accept-Encoding": "gzip, deflate, br", "Connection": "close", "Referer" (dns block)
  • proapi.azurewebsites.net
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development /home/REDACTED/work/pro-components/pro-components/node_modules/.pnpm/[email protected]/node_modules/tinypool/dist/index.js/../entry/process.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@XuJin186
Copy link

@afc163 大佬 还继续嘛

@afc163
Copy link
Member

afc163 commented Nov 26, 2025

@XuJin186 欢迎 PR

@gin-lsl
Copy link

gin-lsl commented Dec 2, 2025

我看有许多测试用例失败只是由于 class 有变化,例如 .ant-select-selector 应该改为 .ant-select-content 之类的
但是我怎么 at 不出来 copilot @afc163

chenshuai2144 and others added 7 commits December 3, 2025 09:51
…eplacing '.ant-select-selector' with '.ant-select' and '.ant-select-selection-search-input' with '.ant-select-input' across multiple test files.
… replacing '.ant-steps-icon' with '.ant-steps-item-icon' in multiple test files, and enhancing error message checks in utils tests.
…ity, updating '.ant-select-input' to '.ant-select-selection-search-input' and adjusting query selectors to use 'document.body' for dropdown items. Enhance assertions for dropdown item counts and ensure proper interaction with the updated Ant Design components.
… Ant Design v6 compatibility. Update query selectors to use '.ant-select' and adjust dropdown item checks to ensure proper interaction with the updated components. Enhance waitFor assertions for asynchronous operations and improve overall test clarity.
… use 'orientation' prop instead of 'type'. Update Drawer and SiderMenu components to use 'size' prop instead of 'width' for better consistency across the application.
let {
token = {} as Record<string, any> as ProAliasToken,
hashed,
prefixCls,

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable prefixCls.

Copilot Autofix

AI 5 days ago

To fix this issue, simply remove prefixCls from the destructured variables in the let declaration (lines 100–104). This change will not affect the logic or behavior of the function, as prefixCls is not used anywhere in the code block. There’s no need to add any imports, definitions, or other structures. Only the destructuring line needs to be edited: replace

let { token = {} as Record<string, any> as ProAliasToken, hashed, prefixCls } = useContext(ProProvider);

with

let { token = {} as Record<string, any> as ProAliasToken, hashed } = useContext(ProProvider);

Suggested changeset 1
src/provider/useStyle/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/provider/useStyle/index.ts b/src/provider/useStyle/index.ts
--- a/src/provider/useStyle/index.ts
+++ b/src/provider/useStyle/index.ts
@@ -100,7 +100,6 @@
   let {
     token = {} as Record<string, any> as ProAliasToken,
     hashed,
-    prefixCls,
   } = useContext(ProProvider);
 
   const { token: antdToken, hashId, theme } = antdTheme.useToken();
EOF
@@ -100,7 +100,6 @@
let {
token = {} as Record<string, any> as ProAliasToken,
hashed,
prefixCls,
} = useContext(ProProvider);

const { token: antdToken, hashId, theme } = antdTheme.useToken();
Copilot is powered by AI and may make mistakes. Always verify output.
…, updating button selectors in list toolbar tests and adding additional wait conditions in utils tests to ensure proper rendering of popover content.
…d improve layout consistency. Update card divider classes to remove unnecessary vertical orientation and enhance layout structure across multiple demo files. Adjust footer styles in layout demos for better spacing and visual alignment.
… replacing references to '.ant-popover-inner-content' with '.ant-popover-content' to ensure accurate rendering and error message checks.
…size' instead of 'width'. Update deprecated properties in StepsForm and Group components for improved consistency. Adjust SettingDrawer and SiderMenu components for better alignment with new prop standards.
…for consistent layout handling. Update SettingDrawer to use 'size' prop instead of 'width' and adjust Alert component to use 'title' prop. Enhance proFieldParsingText to use 'separator' instead of 'split' for better clarity.
… for improved clarity and consistency. Update related snapshots and tests to reflect this change, ensuring compatibility with Ant Design v6. Adjust test selectors for dropdown interactions to enhance reliability.
…bility, replacing '.ant-progress-text' with '.ant-progress-indicator' to ensure accurate rendering and assertion checks.
… replacing '.ant-select-selection-search-input' with '.ant-select-input' to ensure accurate interaction and assertion checks. Enhance clear button functionality tests to accommodate DOM structure changes in the new version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants