Repository navigation
feat(antd): add support for Ant Design v6 - #7629
Open
trantam246 wants to merge 1 commit into
Open
trantam246 wants to merge 1 commit into
trantam246 wants to merge 1 commit into
Conversation
- bump antd to ^6.6.5 and @ant-design/icons to ^6.3.4 - replace @ant-design/pro-layout PageHeader with an in-package implementation styled via antd style utils - migrate ThemedSider to the Menu items API with access control (CanAccessMenuItems) - use non-deprecated antd v6 APIs across @refinedev/antd, inferencer and examples - update cypress selectors to the antd v6 DOM - add Ant Design v5 to v6 migration guide Resolves refinedev#7140
🦋 Changeset detectedLatest commit: 5b92cbb The changes in this PR will be included in the next version bump. This PR includes changesets to release 92 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Author
|
Hi @alicanerdurmaz @DoguhanOzgurAkca 👋 This is my first contribution to refine, so the workflows need a maintainer's approval to run. Could you please approve them when you have a moment? Before opening the PR I ran every CI step locally (Node 22 / pnpm 9): lint, syncpack, Thanks! |
This branch has not been deployed
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.
Resolves #7140
Summary
Adds Ant Design v6 support to
@refinedev/antd(major) and@refinedev/inferencer(major, peer dependency change), following the precedent of #7208 (MUI X v8): theantdpeer now targets^6.6.5and@ant-design/icons^6.3.4.Builds on the earlier attempts in #7177 (@mistervaibhav) and #7392 (@arndom) — thank you both. This PR starts from the current
main, keeps the lockfile change minimal, and was run against every CI step locally before opening.What changed
@refinedev/antd@ant-design/pro-layout. Its stable releases still declareantd ^4 || ^5.<PageHeader />is now implemented in-package with the same props (PageHeaderProps) and the sameant-page-header*class names, styled through Ant Design's own style utilities (@ant-design/cssinjs-utils), so it follows theme switches, nestedConfigProviders, CSS variables andStyleProviderlayers, and user CSS on those classes keeps working. Breadcrumbroutesare converted toitemslike pro-layout did; compact mode is measured on the header width (ResizeObserver).<ThemedSider />uses the MenuitemsAPI, so it no longer logs[antd: Menu] children is deprecated. Access control is unchanged: denied items (including nested ones) are not rendered. Therenderprop additionally receivesmenuItems/logoutItemand may return an item array; existingrenderfunctions returningitems/logoutelements keep working. New<CanAccessMenuItems />helps custom siders filter auseMenutree.useTablepaginationplacement(bottomRight→bottomEnd),useDrawerFormsize, notificationtitle, Drawersize/mask.closable, Spaceorientation,size="medium",useModal/useDrawerhandler types from antd.useSelectstill returnsonSearch/filterOption: rc-select marks them@deprecatedat type level only and antd 6 emits no runtime warning for them, so changing the public return shape was left out of this PR.@refinedev/inferencertitle. Antd inferencer tests now fail on any[antd:deprecation warning, so generators can't regress.Examples, e2e, docs
@ant-design/v5-patch-for-react-19removed from them. Examples outside the workspace (blog-*,monorepo-*,with-nx, …) are untouched..ant-select-selection-item→.ant-select-content-has-value,.ant-select-selector→.ant-select-content,.ant-modal-content→.ant-modal-container,.ant-drawer-content→.ant-drawer-section, loading overlay →.ant-spin-spinning.antd ^6.6.5.Local verification (Node 22, pnpm 9 — same as CI)
pnpm lint:cipnpm sp lintpnpm test:all@refinedev/antd497 passed / 2 skipped,@refinedev/inferencer240 passed). Note: with full parallelism on my machine a few timing-based tests (useStepsForm, muiuseDataGridinterval) time out; they pass alone and with--concurrency=2.pnpm publint:all/pnpm attw:allPre-existing e2e failures, also failing on
main:auth-auth0› should redirect to /login if user not authenticated — fails identically in the scheduled run onmain(run 37579846255, chunk 1).with-nextjs› should has 'to' param… / should register — fail the same way on anorigin/maincheckout on my machine (redirect timing); they pass on CI's scheduled runs.table-antd-table-filteronly fails when the machine is not in UTC (date assertion); passes withTZ=UTClike CI.