Repository navigation
ui: remove dead antd styles, selectors, tests and packages - #36373
Conversation
Nothing renders antd any more, so .ant-* LESS rules that target classes no component emits are deleted, along with the dead .ant-* checks in TSX, the antd mocks and assertions in unit tests, the no-op antd selectors in Playwright, and the unused rc-picker and react-antd-column-resize packages. Classes OSS still emits itself (ant-form-item-explain-error, ant-select-selection-item, ant-typography-ellipsis-custom, ant-layout-content, ant-space-authMechanism) keep their rules, and antd-master.less stays, so nothing renders differently.
|
| Count | Rule |
|---|---|
| 22 | react-hooks/exhaustive-deps |
| 2 | openmetadata-imports/no-api-calls-in-iteration |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:115:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'getResourcePermission' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertConfigDetails/AlertConfigDetails.tsx:121:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTemplates'. Either include it or remove the dependency array. |
| 🟡 | src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx:219:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'feedCount', 'getEntityFeedCount', 'glossary.childrenCount', 'glossary.id', 'glossary.owners', 'glossary.reviewers' |
| 🟡 | src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx:232:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchActivityCount' and 'fetchTaskCounts'. Either include them or remove the dependency array. |
| 🟡 | src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx:236:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'tabs'. Either include it or remove the dependency array. |
| 🟡 | src/components/Glossary/GlossaryDetails/GlossaryDetails.component.tsx:236:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked. |
| 🟡 | src/components/Glossary/GlossaryTerms/GlossaryTermsV1.component.tsx:175:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'activeTabHandler' and 'fetchGlossaryTermAssets'. Either include them or remove the dependency array. |
| 🟡 | src/components/Glossary/GlossaryTerms/GlossaryTermsV1.component.tsx:228:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'feedCount', 'getEntityFeedCount', 'permissions', and 'refreshActiveGlossaryTerm'. Either include them or remove th |
| 🟡 | src/components/Glossary/GlossaryTerms/GlossaryTermsV1.component.tsx:252:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchActivityCount', 'fetchGlossaryTermAssets', and 'fetchTaskCounts'. Either include them or remove the depende |
| 🟡 | src/components/Glossary/GlossaryTerms/GlossaryTermsV1.component.tsx:281:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'tabItems'. Either include it or remove the dependency array. |
| 🟡 | src/components/Glossary/GlossaryTerms/GlossaryTermsV1.component.tsx:281:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked. |
| 🟡 | src/components/NavBar/NavBar.tsx:204:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'activeTab' and 'hasMentionNotification'. Either include them or remove the dependency array. |
| 🟡 | src/components/NavBar/NavBar.tsx:442:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'showBrowserNotification'. Either include it or remove the dependency array. |
| 🟡 | src/components/NavBar/NavBar.tsx:446:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchOMVersion'. Either include it or remove the dependency array. |
| 🟡 | src/components/NavBar/NavBar.tsx:465:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 't'. Either exclude it or remove the dependency array. |
| 🟡 | src/components/Settings/Services/Ingestion/IngestionListTable/IngestionListTable.tsx:160:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Services/Ingestion/IngestionListTable/IngestionListTable.tsx:181:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'deleteIngestion'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Services/Ingestion/IngestionListTable/IngestionListTable.tsx:202:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'getEntityPermissionByFqn'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Services/Ingestion/IngestionListTable/IngestionListTable.tsx:232:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'afterDeleteAction'. Either include it or remove the dependency array. If 'afterDeleteAction' changes too often |
| 🟡 | src/components/Settings/Services/Ingestion/IngestionListTable/IngestionListTable.tsx:238:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchIngestionPipelineExtraDetails'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Services/Ingestion/IngestionListTable/IngestionListTable.tsx:246:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'ingestionPagingInfo'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Services/Ingestion/IngestionListTable/IngestionListTable.tsx:440:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/utils/TagsUtils.tsx:57:9 |
openmetadata-imports/no-api-calls-in-iteration |
Avoid issuing one API request per item. Fetch at the data owner, use a bulk endpoint, or use useQueries with an intentional concurrency policy. |
| 🟡 | src/utils/TagsUtils.tsx:89:7 |
openmetadata-imports/no-api-calls-in-iteration |
Avoid issuing one API request per item. Fetch at the data owner, use a bulk endpoint, or use useQueries with an intentional concurrency policy. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changedantd's global element reset, the --ant-* defaults and the rules for the two ant-* class names still rendered move to src/styles/legacy-base.css, compiled with variables.less so the emitted global CSS is unchanged. The rest of antd-master.less becomes master.less. rc-virtual-list is now a direct dependency, the rc-* type imports are local, and the dead tagRender and TagRenderer are deleted.
…-guard The theme colour properties become --theme-*, the navbar height becomes --navbar-height, and the class names still rendered become form-field-error, loader-content and auth-mechanism-space. The ant-select-selection-item rules left by the deleted TagRenderer go, tw-guard and tw-audit stop looking for antd imports, and the token files and specs are regenerated for the styles removed earlier.
…ylesheet antd-master.less was first in globalStyles.ts only because import sorting put "antd" before "app". Its replacements sorted after app.less and the other global sheets, so antd's base rules (p margin-bottom: 1em, among others) and master.less's layout rules started winning ties they used to lose. They now sit in their own import group above the sorted list, and a unit test pins the order. Also formats the files the previous commit touched.
…-antd-only # Conflicts: # openmetadata-ui/src/main/resources/ui/playwright/eslint-rules/tests/corpus.test.mjs
waitForAntOverlayToOpen becomes waitForOverlayToOpen and loses its check for ant-zoom classes, which nothing renders. TableV2's size maps and IngestionListTable's sort types no longer carry an Antd prefix.
Code Review ✅ Approved 2 closed / 2 findings🟡 Medium risk · Removing Ant Design and migrating global styles, selectors, and theme variables across the UI could cause visual regressions or broken interactions. Removes the leftover Ant Design package, styles, selectors, tests and lint rules with no intended visual change, and keeps the global base styles loading first. Resolved this session: orphaned comments describing removed antd CSS were cleaned up, and legacy-base.css and master.less again load before app.less so the cascade is preserved. No open findings. ✅ 2 closed✅ Quality: Deleted antd rules leave orphaned comments describing removed CSS
✅ Bug: legacy-base.css/master.less now load after app.less, reversing the cascade
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
🚦 Removed from the merge queue —
|
…36552) * ui: remove dead antd styles, selectors, tests and packages Nothing renders antd any more, so .ant-* LESS rules that target classes no component emits are deleted, along with the dead .ant-* checks in TSX, the antd mocks and assertions in unit tests, the no-op antd selectors in Playwright, and the unused rc-picker and react-antd-column-resize packages. Classes OSS still emits itself (ant-form-item-explain-error, ant-select-selection-item, ant-typography-ellipsis-custom, ant-layout-content, ant-space-authMechanism) keep their rules, and antd-master.less stays, so nothing renders differently. * ui: format, prune playwright suppressions and lower the corpus count * ui: drop comments left behind by removed antd rules * ui: keep the antd sidebar popup wait and update the Playwright handbook * ui: remove the antd package, antd-master.less and the antd ESLint rules antd's global element reset, the --ant-* defaults and the rules for the two ant-* class names still rendered move to src/styles/legacy-base.css, compiled with variables.less so the emitted global CSS is unchanged. The rest of antd-master.less becomes master.less. rc-virtual-list is now a direct dependency, the rc-* type imports are local, and the dead tagRender and TagRenderer are deleted. * ui: rename the --ant-* variables and ant-* classes, drop antd from tw-guard The theme colour properties become --theme-*, the navbar height becomes --navbar-height, and the class names still rendered become form-field-error, loader-content and auth-mechanism-space. The ant-select-selection-item rules left by the deleted TagRenderer go, tw-guard and tw-audit stop looking for antd imports, and the token files and specs are regenerated for the styles removed earlier. * ui: load legacy-base.css and master.less before every other global stylesheet antd-master.less was first in globalStyles.ts only because import sorting put "antd" before "app". Its replacements sorted after app.less and the other global sheets, so antd's base rules (p margin-bottom: 1em, among others) and master.less's layout rules started winning ties they used to lose. They now sit in their own import group above the sorted list, and a unit test pins the order. Also formats the files the previous commit touched. * ui: drop the antd names left in identifiers waitForAntOverlayToOpen becomes waitForOverlayToOpen and loses its check for ant-zoom classes, which nothing renders. TableV2's size maps and IngestionListTable's sort types no longer carry an Antd prefix. * ui: sort the imports touched by the waitForOverlayToOpen rename (cherry picked from commit aada83e)



Describe your changes:
Part of open-metadata/openmetadata-collate#7504. Collate counterpart: open-metadata/openmetadata-collate#7913.
Removes what is left of Ant Design from
openmetadata-ui, including theantdpackage,antd-master.lessand the antd ESLint rules, with no visual change. Everyantdimport is already gone (#35509). This removes the styles, selectors, tests and packages that were left behind.Merge order: first open-metadata/openmetadata-collate#7955, then this PR, then open-metadata/openmetadata-collate#7913. This PR's Collate check builds Collate
main, which imports two stylesheets this PR deletes; #7955 removes those imports, and #7913 removes Collate's ownantdpackage..ant-*selectors (378 whole rules) from 84 LESS files, and 11 LESS files that were left empty, along with their imports.ant-*class that nothing renders.:is(.ant-x, .layout-x)became.layout-x, which has the same specificity.table:not(.ant-table)becametable, after checking that no rule competes for it.ant-*class names OSS still rendered no longer carry the prefix.ant-form-item-explain-errorbecameform-field-error(FieldErrorTemplate,TestCaseFormV1.less, the SSO error selector).ant-layout-contentbecameloader-content(Loader).ant-space-authMechanismbecameauth-mechanism-space.ant-typography-ellipsis-customhad no rule, so it is dropped. Theant-select-selection-itemrules inusers.lessandlearning-resource-form.lessare deleted, because only the deadTagRendererrendered that class..ant-input/.ant-select-selectorchecks inSSOUtils..ant-drawerfallback ingetDialogContainer.tw:[&_.ant-*]variants inCodeEditor,ExploreSearchInputandTableV2.prefixCls: 'ant-table-filter-dropdown'; no consumer reads it.createScrollToErrorHandlernow defaults to[aria-invalid="true"], [data-invalid="true"]instead of.ant-form-item-has-error. Every caller already passes that selector, so runtime behaviour is unchanged.jest.mock('antd', …)blocks in 11 files, the antd-drawer case inEditorSlots, and the antd input cases inSSOUtils. TheformPureUtilsexpectations now match the new default..ant-spinwaits,.ant-popover/.ant-dropdown/.ant-tagabsence checks, andwaitForAntdPopupToSettle; the Playwright handbook drops its references..ant-*arm.replyAnnouncement,updateFollowers,editTeamsandeditDescription(user) helpers.selectSubDomainloses an always-falseant-menu-item-selectedcheck.GlossaryAssetswaits for themenurole instead of.ant-dropdown.rc-pickerandreact-antd-column-resize, plus the Jest mapping and mock;yarn.lockupdated.antdpackage andantd-master.less(ADR:2026-10-28-antd-global-styles-live-on-in-legacy-base-css):antd, its~antd/antdVite aliases, the pinnedvendor-antdchunk and the bundle-runtime allowance for it. Theantdimports ingeneric-tab.lessandpage-layout.lessare removed too.antd-master.lesswas not only antd. Besides component styles, antd emitted an element reset (bodyfont and colour,h1–h6/pmargins,acolour, form-control inheritance), the--ant-*defaults thatvariables.lessreads, and rules for two class names OSS still renders. Those rules move tosrc/styles/legacy-base.css, compiled from antd 4.24.16 with ourvariables.less. The rest ofantd-master.lessbecomesmaster.less.token-auditexemptslegacy-base.cssas a vendored snapshot.rc-virtual-list(SelectableList) is now a direct dependency at the version antd resolved (3.19.2). Therc-select,rc-tableandrc-field-formtype imports becomeas const/unknown.tagRender(TagsUtils) andTagRenderer: they were renderers for antdSelectwith no caller. That retires theant-select-selection-itemrule.browser-tests/sidebarNavigation.spec.tsno longer mounts antdLayout/Menuandantd.css. The two antd-only cases are gone (popup opacity, tooltip duplicate) and so is the.ant-menu-submenu-popupwait inutils/sidebar.ts. The glossary-redirect and same-prefix cases remain.--ant-*custom properties: renamed. The theme colours (--ant-primary-*,--ant-{success,warning,error,info}-color*) become--theme-*;useThemeCssVariableswrites them andvariables.lessreads them.--ant-navbar-heightbecomes--navbar-height. Defaults that nothing reads are pruned fromlegacy-base.css; the wave-effect and scroll-bar properties went with them. No.ant-*selector or--ant-*property is left in the built CSS.tw-guard/tw-audit: no longer check or count antd imports.tw-guardkeeps its raw-SVG and.lesschecks. The docs that described the antd check are updated:.claude/rules,docs/ui-code-quality-gate.md, andspecs/README.md/foundations/tailwind.md.tokens.css's generated block andtoken-reference.mdstale, and broke three spec links to deleted stylesheets. Both files are regenerated; 14--om-legacy-color-*tokens that nothing references any more drop out. Theselect,slider,tabs,drawerandpaginationspecs lose their rows and examples for the antd styling that is gone.waitForAntOverlayToOpenbecomeswaitForOverlayToOpenand drops its deadant-zoomclass check.TableV2's size maps andIngestionListTable's sort types lose theirAntdprefix.master.lessstays: it imports only our own sheets, and LESS@importis what holds their order, which import sorting inglobalStyles.tswould not.openmetadata-antdESLint rules (no-antd-import,no-migrated-antd-import), their test andMIGRATED_ANTD_COMPONENTS. Their suppressions were already at zero, which is the retirement condition ADR:2026-10-11-antd-imports-are-frozen-by-eslint-suppressions set; that record is now superseded. With the package gone, an antd import fails to resolve at build time.Type of change:
High-level design:
A script parses each LESS file with
postcss-lessand drops a selector only when it contains anant-*class outside:not()/:is()that is not on the live list. A rule left with no selectors is removed, and so is a parent rule left empty. The flagged:not/:iscases were rewritten by hand, as described above. Prettier formatted the result, andvite buildcompiles it.Tests:
Use cases covered
antd-master.lesswas checked rule by rule.antd-master.lesson this branch's parent, minus itsant-*component rules, compiles to the same 363 rules in the same order aslegacy-base.cssfollowed bymaster.less.generic-tab.lessandpage-layout.lesscompile to identical non-ant-*output with and without the antd import.legacy-base.cssandmaster.lessload exactly whereantd-master.lessdid, first among the global stylesheets. In an earlier commit, import sorting had moved them belowapp.less(antd-masterwas first only because "antd" sorts before "app"). That let antd'sp { margin-bottom: 1em }beatapp.less'sp { margin-bottom: 0 }, which pushed the pagination page-size value off-centre.87d265862bfpins them in their own import group, andglobalStyles.test.tsfails if they move. The built CSS has antd'sprule (offset 9997) ahead ofapp.less's (offset 26494), as onmain.Unit tests
Backend integration tests
Playwright (UI) tests
Not run locally, by request. This includes the rewritten
browser-tests/sidebarNavigation.spec.ts. The Playwright edits remove no-op checks, unused helpers and dead branches. The exception is theGlossaryAssetsadd-assets menu wait, which now targets themenurole and is unverified. Two no-op checks were removed rather than re-pointed, so their intent is no longer covered: the add-tag / add-glossary-term absence invalidateViewPermissions, and the tier-chip absence inExplorePageRightPanel. Follow-up: assert on[data-testid="add-tag"]and the Tier chip.Manual testing performed
Computed-style comparison against
main(.context/tools/style-diff.mjs, run locally): the production builds ofmainand of this branch were served side by side against the same backend and data. The script loaded the same page in each, recorded 60 computed properties plus the box of every rendered element, and diffed them by DOM position.main471bce367e8vs this branch): 25 routes in AI mode, 13 AI settings tabs, 22 classic routes (classic settings, bot auth page, roles/policies, services), 12 routes in dark theme, and 3 open-picker states (owner, domain, explore filter). Result: 0 structural differences and 0 style differences. The only exceptions are timing noise:/users/admincaught a skeleton loader mid-pulse (opacity) and a relative "17/18 hours ago" timestamp ticked over; one hover fade was caught mid-transition.mainada1ddd92341with OSSmain, vs the Collate branch with this OSS branch): 24 AI-mode routes, including automations, AI governance, observability, data marketplace, metadata completeness and billing; 15 classic routes, including SSO, SCIM and appearance; and 11 dark-theme routes. Result: 0 structural differences and 0 style differences. The exceptions are chart gradient IDs, which come from a per-render counter, and the same skeleton pulse./settings/preferences/appearancediffered once because logo previews loaded late; on two re-runs it showed 0 differences.Run at
c59bb78867c, unless noted.87d265862bf(import order) was rebuilt and checked separately:make ui-checkstyle-changed: clean, with no diff left by the tools.yarn lint:playwright: 0 errors.yarn test:eslint-rules: 170/170; it was 191 before the 21 antd-rule cases were deleted.node scripts/generate-playwright-rule-table.mjs --check: passes.yarn tsc:check,tw-deprecation-guardandtw-auditon the changed files: pass.check-drift.js(token drift): clean.tw-deprecation-guard.test.js: 5/5. Design-token script tests: 18/18..ant-*selector or--ant-*property indist/assets/*.css.useThemeCssVariables,FieldErrorTemplate,Loader,Bot,SettingsSso,InheritedRolesCard,RolesElement): 18 suites, 249 tests passed.yarn token-audit: 77 errors, the same 77 asmain(33c83b964ae), so none are introduced here.legacy-base.cssis exempt.yarn build: passes, andantdis no longer innode_modules.yarn bundle:check: passes with 1335 emitted / 1154 small JS files, against ceilings of 1450 / 1250.yarn bundle:runtime: 151 route chunks load with no undefined exports.TagsUtils,CronExpressionUtils,IngestionListTable,SelectableListand its callers,AddIngestion): 19 suites, 164 tests passed. Earlier commits: 444 suites, 7475 tests.scripts/harness/check_decision_records.py: clean.antduninstalled.UI screen recording:
Not applicable — this only removes selectors and styles that match no rendered element. No visual change is intended.
Checklist:


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issue was established.Summary
Removes the remaining Ant Design package, unused styles, helpers, mocks, and checks.
The three previous, unnumbered findings are addressed: the sidebar harness no longer mounts Ant Design, the handbook no longer recommends the deleted helper, and global stylesheet order is restored.
shah-harshitacknowledged and deferred replacement negative assertions for tag/glossary editing permissions and the Tier chip.Review checks were static. No build, tests, or browser capture was run.
Reviews (6) · Last reviewed commit: "ui: drop the antd names left in identifi..." · Reviewed by Greptile