Skip to content

ui: remove dead antd styles, selectors, tests and packages - #36373

Merged
shah-harshit merged 10 commits into
mainfrom
shah-harshit/7504-oss-antd-only
Oct 29, 2026
Merged

shah-harshit merged 10 commits into
mainfrom
shah-harshit/7504-oss-antd-only

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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 the antd package, antd-master.less and the antd ESLint rules, with no visual change. Every antd import 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 own antd package.

  • Styles: removed 492 .ant-* selectors (378 whole rules) from 84 LESS files, and 11 LESS files that were left empty, along with their imports.
    • A selector was removed only when it requires an ant-* class that nothing renders.
    • :is(.ant-x, .layout-x) became .layout-x, which has the same specificity.
    • table:not(.ant-table) became table, after checking that no rule competes for it.
    • The ant-* class names OSS still rendered no longer carry the prefix. ant-form-item-explain-error became form-field-error (FieldErrorTemplate, TestCaseFormV1.less, the SSO error selector). ant-layout-content became loader-content (Loader). ant-space-authMechanism became auth-mechanism-space. ant-typography-ellipsis-custom had no rule, so it is dropped. The ant-select-selection-item rules in users.less and learning-resource-form.less are deleted, because only the dead TagRenderer rendered that class.
  • TSX:
    • Dropped the dead .ant-input / .ant-select-selector checks in SSOUtils.
    • Dropped the .ant-drawer fallback in getDialogContainer.
    • Dropped the tw:[&_.ant-*] variants in CodeEditor, ExploreSearchInput and TableV2.
    • TableV2's filter dropdown no longer passes prefixCls: 'ant-table-filter-dropdown'; no consumer reads it.
    • createScrollToErrorHandler now 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.
  • Unit tests: removed the jest.mock('antd', …) blocks in 11 files, the antd-drawer case in EditorSlots, and the antd input cases in SSOUtils. The formPureUtils expectations now match the new default.
  • Playwright:
    • Removed no-op checks on dead selectors: .ant-spin waits, .ant-popover / .ant-dropdown / .ant-tag absence checks, and waitForAntdPopupToSettle; the Playwright handbook drops its references.
    • Union selectors drop their .ant-* arm.
    • Removed the unused replyAnnouncement, updateFollowers, editTeams and editDescription (user) helpers.
    • selectSubDomain loses an always-false ant-menu-item-selected check.
    • GlossaryAssets waits for the menu role instead of .ant-dropdown.
    • Suppressions are pruned and the corpus count is lowered.
  • Dependencies: removed rc-picker and react-antd-column-resize, plus the Jest mapping and mock; yarn.lock updated.
  • antd package and antd-master.less (ADR:2026-10-28-antd-global-styles-live-on-in-legacy-base-css):
    • Removed antd, its ~antd / antd Vite aliases, the pinned vendor-antd chunk and the bundle-runtime allowance for it. The antd imports in generic-tab.less and page-layout.less are removed too.
    • antd-master.less was not only antd. Besides component styles, antd emitted an element reset (body font and colour, h1–h6 / p margins, a colour, form-control inheritance), the --ant-* defaults that variables.less reads, and rules for two class names OSS still renders. Those rules move to src/styles/legacy-base.css, compiled from antd 4.24.16 with our variables.less. The rest of antd-master.less becomes master.less. token-audit exempts legacy-base.css as a vendored snapshot.
    • rc-virtual-list (SelectableList) is now a direct dependency at the version antd resolved (3.19.2). The rc-select, rc-table and rc-field-form type imports become as const / unknown.
    • Deleted the dead tagRender (TagsUtils) and TagRenderer: they were renderers for antd Select with no caller. That retires the ant-select-selection-item rule.
    • browser-tests/sidebarNavigation.spec.ts no longer mounts antd Layout / Menu and antd.css. The two antd-only cases are gone (popup opacity, tooltip duplicate) and so is the .ant-menu-submenu-popup wait in utils/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-*; useThemeCssVariables writes them and variables.less reads them. --ant-navbar-height becomes --navbar-height. Defaults that nothing reads are pruned from legacy-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-guard keeps its raw-SVG and .less checks. The docs that described the antd check are updated: .claude/rules, docs/ui-code-quality-gate.md, and specs/README.md / foundations/tailwind.md.
  • Token drift: the earlier selector removal left tokens.css's generated block and token-reference.md stale, and broke three spec links to deleted stylesheets. Both files are regenerated; 14 --om-legacy-color-* tokens that nothing references any more drop out. The select, slider, tabs, drawer and pagination specs lose their rows and examples for the antd styling that is gone.
  • Identifiers: waitForAntOverlayToOpen becomes waitForOverlayToOpen and drops its dead ant-zoom class check. TableV2's size maps and IngestionListTable's sort types lose their Antd prefix. master.less stays: it imports only our own sheets, and LESS @import is what holds their order, which import sorting in globalStyles.ts would not.
  • Lint: deleted the openmetadata-antd ESLint rules (no-antd-import, no-migrated-antd-import), their test and MIGRATED_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:

  • Improvement

High-level design:

A script parses each LESS file with postcss-less and drops a selector only when it contains an ant-* 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 / :is cases were rewritten by hand, as described above. Prettier formatted the result, and vite build compiles it.

Tests:

Use cases covered

  • No UI change intended: every removed selector matched nothing.
  • The global CSS that replaces antd-master.less was checked rule by rule. antd-master.less on this branch's parent, minus its ant-* component rules, compiles to the same 363 rules in the same order as legacy-base.css followed by master.less. generic-tab.less and page-layout.less compile to identical non-ant-* output with and without the antd import.
  • Cascade position: legacy-base.css and master.less load exactly where antd-master.less did, first among the global stylesheets. In an earlier commit, import sorting had moved them below app.less (antd-master was first only because "antd" sorts before "app"). That let antd's p { margin-bottom: 1em } beat app.less's p { margin-bottom: 0 }, which pushed the pagination page-size value off-centre. 87d265862bf pins them in their own import group, and globalStyles.test.ts fails if they move. The built CSS has antd's p rule (offset 9997) ahead of app.less's (offset 26494), as on main.

Unit tests

  • Jest on every touched directory: 444 suites, 7475 tests passed.

Backend integration tests

  • Not applicable (no backend changes).

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 the GlossaryAssets add-assets menu wait, which now targets the menu role 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 in validateViewPermissions, and the tier-chip absence in ExplorePageRightPanel. 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 of main and 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.

  • OSS (main 471bce367e8 vs 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/admin caught a skeleton loader mid-pulse (opacity) and a relative "17/18 hours ago" timestamp ticked over; one hover fade was caught mid-transition.
  • Collate (main ada1ddd92341 with OSS main, 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/appearance differed 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-guard and tw-audit on the changed files: pass.
  • check-drift.js (token drift): clean. tw-deprecation-guard.test.js: 5/5. Design-token script tests: 18/18.
  • No .ant-* selector or --ant-* property in dist/assets/*.css.
  • Jest for the rename (useThemeCssVariables, FieldErrorTemplate, Loader, Bot, SettingsSso, InheritedRolesCard, RolesElement): 18 suites, 249 tests passed.
  • yarn token-audit: 77 errors, the same 77 as main (33c83b964ae), so none are introduced here. legacy-base.css is exempt.
  • yarn build: passes, and antd is no longer in node_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.
  • Jest on the modules touched by the package removal (TagsUtils, CronExpressionUtils, IngestionListTable, SelectableList and its callers, AddIngestion): 19 suites, 164 tests passed. Earlier commits: 444 suites, 7475 tests.
  • scripts/harness/check_decision_records.py: clean.
  • The Collate side (open-metadata/openmetadata-collate#7913) builds against this branch with antd uninstalled.

UI screen recording:

Not applicable — this only removes selectors and styles that match no rendered element. No visual change is intended.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR is linked to a GitHub issue above.
  • I have commented on my code, particularly in hard-to-understand areas.

RetriggerView in GreptileConfidence 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 UI keeps its page reset and theme colors without loading Ant Design.
  • The UI styles stop targeting Ant Design classes that no longer appear.
  • Form, table, and browser checks stop looking for Ant Design elements.
  • UI lint and audit tools no longer track Ant Design usage.

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-harshit acknowledged 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

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.
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Oct 27, 2026
@shah-harshit shah-harshit self-assigned this Oct 27, 2026
@shah-harshit
shah-harshit marked this pull request as ready for review October 27, 2026 16:26
@shah-harshit
shah-harshit requested a review from a team as a code owner October 27, 2026 16:26
@shah-harshit shah-harshit added the To release Will cherry-pick this PR into the release branch label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 24 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 24 warning(s) across 6 changed file(s).

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-changed

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 80%
79.96% (131600/164580) 66.44% (46416/69856) 69.51% (26375/37944)

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.
…-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.
@gitar-bot

gitar-bot Bot commented Oct 28, 2026

Copy link
Copy Markdown
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

📄 openmetadata-ui/src/main/resources/ui/src/styles/app.less:938-950 📄 openmetadata-ui/src/main/resources/ui/src/styles/app.less:1192-1197 📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/sso-configuration-form.less:56 📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/sso-configuration-form.less:290-292 📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/sso-configuration-form.less:407 📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/sso-configuration-form.less:566 📄 openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/sso-configuration-form.less:597 📄 openmetadata-ui/src/main/resources/ui/src/styles/components/table.less:53-57
Many hunks delete an antd rule body but keep the comment that explained it. The comments now sit above nothing, or above an unrelated rule. In app.less, the 'Ant secondary text…retint the class in dark only' block (~945-947) and the 'antd DatePicker/RangePicker…', 'antd Alert…' and 'antd multi-select tags…' blocks (~1188-1197) describe overrides that are gone. The 'Ant Typography links (a.ant-typography / .ant-typography a…)' comment (~938-940) now sits only above .dark-mode .prose-typography a. The same happens in sso-configuration-form.less ('Hide the clear/close button…', 'Apply select styling…', 'Custom dropdown arrow for SSO forms', 'SSO-specific select dropdown styles', 'Apply same select styling to provider selection card') and in table.less ('Setting the background color of the resizable column…', 'Hide the border of the columns…', 'Table icons'). Under the repo rule that comments explain why, these mislead readers into hunting for styles that no longer exist. Fix: delete each comment together with the rule it described, and reword the Typography comment so it only covers .prose-typography.

✅ Bug: legacy-base.css/master.less now load after app.less, reversing the cascade

📄 openmetadata-ui/src/main/resources/ui/src/styles/globalStyles.ts:20 📄 openmetadata-ui/src/main/resources/ui/src/styles/globalStyles.ts:40-41 📄 openmetadata-ui/src/main/resources/ui/src/styles/legacy-base.css:116-119 📄 openmetadata-ui/src/main/resources/ui/src/styles/legacy-base.css:138-143 📄 openmetadata-ui/src/main/resources/ui/src/styles/legacy-base.css:198-206 📄 docs/decisions/2026-10-28-antd-global-styles-live-on-in-legacy-base-css.md:24-25
antd-master.less used to be the first stylesheet import, ahead of app.less. Its replacements, legacy-base.css and master.less, were put in alphabetical order after app.less, the component .less files and knowledge-center.less. Both sides are unlayered selectors with the same specificity, so whichever loads last now wins. That flips the overrides app.less relies on:

  • ul, ol { margin: 0 } (app.less:92) loses to ol, ul, dl { margin-bottom: 1em }.
  • p { margin-bottom: 0 } (app.less:98) loses to p { margin-bottom: 1em }.
  • a:hover / a:focus { text-decoration: underline } (app.less:145) lose to a:hover / a:focus { text-decoration: none }.

The master.less layout and spacing rules also move from before app.less to after it.

The result is extra margins on every list and paragraph, and links that no longer underline on hover. That contradicts the ADR's claims that the file "loads where antd-master.less did" and that "removing the package changes no visual". The fix is to import both files at the top, in the old position.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

@shah-harshit
shah-harshit added this pull request to the merge queue Oct 28, 2026
@shah-harshit
shah-harshit removed this pull request from the merge queue due to a manual request Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-10-28T19:07:43Z)

No failing check on merge-queue commit a92b23b — invalidated by an entry ahead in the queue, or a required check timed out.

@shah-harshit
shah-harshit added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit aada83e Oct 29, 2026
80 of 81 checks passed
@shah-harshit
shah-harshit deleted the shah-harshit/7504-oss-antd-only branch October 29, 2026 10:17
shah-harshit added a commit that referenced this pull request Oct 29, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants