-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Upgrade to antd v6 #9304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to antd v6 #9304
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
@copilot snapshot 需要更新一下 |
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
已更新 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@afc163 大佬 还继续嘛 |
|
@XuJin186 欢迎 PR |
|
我看有许多测试用例失败只是由于 class 有变化,例如 .ant-select-selector 应该改为 .ant-select-content 之类的 |
…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
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month 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);| @@ -100,7 +100,6 @@ | ||
| let { | ||
| token = {} as Record<string, any> as ProAliasToken, | ||
| hashed, | ||
| prefixCls, | ||
| } = useContext(ProProvider); | ||
|
|
||
| const { token: antdToken, hashId, theme } = antdTheme.useToken(); |
…, 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.
* Refactor: Update migration guide and homepage content Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Refactor: Update documentation for ProComponents Co-authored-by: qixian.cs <qixian.cs@outlook.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* Refactor: Remove unused nav property from markdown files Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Refactor: Remove hyphens from component titles Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Refactor: Update titles and add frontmatter check script Co-authored-by: qixian.cs <qixian.cs@outlook.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* Remove redundant titles from demo components Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Refactor: Remove redundant titles from code examples Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Revert "Remove redundant titles from demo components" This reverts commit 0f1ec6b. * feat: Add padding to all demo examples This change adds a consistent padding of 24px to all demo examples to improve their visual presentation and spacing. Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Revert "feat: Add padding to all demo examples" This reverts commit c8dc966. * feat: add padding to demo components - Wrap demo components with a div container having 24px padding - Fix linting and formatting issues - Rename default exports to named components for better debugging --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
|
期待。。。 |
* docs: update SchemaForm documentation with missing API definitions Update SchemaForm documentation to include missing props in API and Schema tables: - Add title, action, formRef, open to API table - Add width, colSize, readonly, initialValue, convertValue, transform, order, debounceTime, defaultKeyWords, ignoreFormItem to Schema Definition table - Update columns type definition * docs: restructure SchemaForm demos by layout type Organize code examples into clear categories: - Layout Types: Form, Modal/Drawer, Steps, Embed - Advanced Usage: Dependency, Performance, FormList This improves readability and helps users find examples for specific use cases. * docs: detail SchemaForm usage guides and API Enhance documentation with detailed explanations: - Add descriptions for each layout type example (Form, Modal, Steps, Embed) - Add list of common valueTypes - Add section explaining fieldProps vs formItemProps with code example - Add explanation for performance optimization props (shouldUpdate/dependencies) * docs: synchronize SchemaForm English documentation Update English documentation to match Chinese version changes: - Update API and Schema Definition tables with new props - Add ProFormLayoutType section - Add Common ValueTypes table - Add fieldProps vs formItemProps explanation - Restructure demos by layout types and advanced usage - Update demo descriptions and titles * chore: format documentation with prettier --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…o-components into copilot/upgrade-to-antd-v6
…nsistency - Standardized parameter tables across multiple components, including ProTable, ProForm, and ProDescriptions, for improved readability. - Added missing properties and updated descriptions in the API tables for better user guidance. - Enhanced demo references with consistent IDs for easier navigation and linking. - Improved formatting and structure in migration guides and other documentation files to align with recent changes and maintain consistency.
- Introduced AGENTS.md to provide comprehensive guidelines for the ant-design/ant-design project. - Included sections on project background, installation, development commands, coding standards, naming conventions, API documentation, TypeScript practices, styling guidelines, testing protocols, and internationalization. - Ensured clarity and consistency in documentation to assist developers in adhering to project standards.
…es and remove react-pdf dependency
* Update changelog dates to 2025-07-24 Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Update changelog dates to 2025-07-24 Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Refactor: Update changelog for ProComponents v3 Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Refactor: Update changelog for ProComponents v3.0 Co-authored-by: qixian.cs <qixian.cs@outlook.com> * Remove schema documentation and navigation links Co-authored-by: qixian.cs <qixian.cs@outlook.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…o-components into copilot/upgrade-to-antd-v6
….yaml to maintain compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the project to Ant Design v6, implementing comprehensive breaking changes and API updates across the entire codebase to ensure compatibility with the new version.
Key Changes
- Upgraded core dependencies to antd v6, @ant-design/icons v6, and @ant-design/cssinjs v2
- Updated React peer dependency requirement from >=17.0.0 to >=18.0.0
- Replaced deprecated API properties throughout components (e.g.,
bodyStyle→styles,tabPosition→tabPlacement) - Removed IE 11 support from browser compatibility list
Reviewed changes
Copilot reviewed 299 out of 999 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated all Ant Design dependencies to v6, updated React peer dependency to >=18.0.0, removed IE 11 from browser support |
| site/changelog.md | Added comprehensive changelog documenting v6 upgrade and breaking changes |
| site/changelog.en-US.md | English version of changelog with v6 upgrade details |
| site/components/form/LoginForm/index.md | Removed LoginForm documentation file |
| site/components/form/LoginForm/index.en-US.md | Removed English LoginForm documentation file |
| site/components/form/Group/index.md | Removed ProFormList documentation file |
| site/components/form/Group/index.en-US.md | Removed English ProFormList documentation file |
| site/components/form/FieldSet/index.md | Removed ProFormFields documentation file |
| site/components/form/FieldSet/index.en-US.md | Removed English ProFormFields documentation file |
| site/components/form/Dependency/index.md | Removed ProFormDependency documentation file |
| site/components/form/Dependency/index.en-US.md | Removed English ProFormDependency documentation file |
| site/components/field/index.md | Updated navigation structure for ProField documentation |
| site/components/field/index.en-US.md | Updated navigation and added API type information |
| site/components/field-set/index.md | Updated documentation reference from onDropdownVisibleChange to onOpenChange |
| site/components/field-set/index.en-US.md | Updated English documentation for API changes |
| site/components/editable-table/index.md | Removed navigation structure from EditableProTable documentation |
| site/components/editable-table/index.en-US.md | Removed title attribute from code example |
| site/components/drag-sort-table/index.md | Removed title attribute from code example |
| site/components/descriptions/index.md | Removed title attributes from code examples and updated navigation |
| site/components/descriptions/index.en-US.md | Added missing API documentation and reorganized content |
| site/components/dependency/index.md | Removed title attributes from code examples |
| site/components/check-card/index.md | Removed CheckCard documentation file with comprehensive API tables |
| site/components/check-card/index.en-US.md | Removed English CheckCard documentation file |
| site/components/card/index.md | Updated navigation structure |
| site/components/card/StatisticCard/index.md | Removed StatisticCard documentation file |
| site/components/card/StatisticCard/index.en-US.md | Removed English StatisticCard documentation file |
| site/components/card/CheckCard/index.md | Removed nested CheckCard documentation file |
| site/components/card/CheckCard/index.en-US.md | Removed nested English CheckCard documentation file |
| demos/table/valueType_select.tsx | Wrapped component export with padding wrapper |
| demos/table/valueTypeNumber.tsx | Wrapped component export with padding wrapper |
| demos/table/valueTypeDate.tsx | Wrapped component export with padding wrapper |
| demos/table/valueType.tsx | Wrapped component export with padding wrapper |
| demos/table/dynamic-settings.tsx | Updated bodyStyle to styles.body for ProCard |
| demos/list/base.tsx | Updated bodyStyle to styles.body for ProCard |
| demos/form/modalform-test.tsx | Updated bodyStyle to styles.body for ProCard |
| demos/form/formRef.tsx | Replaced Button.Group with Space.Compact per antd v6 changes |
| demos/form/SchemaForm/schema.tsx | Replaced deprecated direction with orientation and message with title in Alert |
| demos/form/SchemaForm/ModalAndDrawerForm.tsx | Replaced deprecated props in Alert and Space components |
| demos/form/QueryFilter/light-filter-footer.tsx | Replaced direction with orientation in Space component |
| demos/layout/footer-global-tools.tsx | Replaced Alert message prop with title |
| demos/layout/immersive-navigation.tsx | Wrapped icon image in proper img tag instead of string URL |
| demos/layout/Group/horizontal-layout.tsx | Updated bodyStyle to styles.body for ProCard |
| demos/layout/PageHeader/*.tsx | Added new PageHeader demo files with proper exports |
Comments suppressed due to low confidence (5)
site/components/form/Group/index.md:1
- Extra opening parenthesis before
<code. Remove the(character.
site/components/form/Group/index.md:1 - Missing opening quote before the path. Should be
src="../../../../demos/form/Group/countLimit.tsx".
site/components/form/Group/index.md:1 - Double slashes in the file path. Should be
src="../../../../demos/form/Group/horizontal-layout.tsx".
site/components/form/Group/index.md:1 - Double slashes in the file path. Should be
src="../../../../demos/form/Group/list-arrowsort.tsx".
site/components/form/FieldSet/index.md:1 - Git merge conflict markers are present in the file. The conflict between HEAD and the current branch needs to be resolved by choosing the appropriate version and removing the conflict markers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nd SearchSelect components
…nd SearchSelect components
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
… variable classes
|
发版咯 |
|
大佬 666 |
|
大佬 666 |

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