Repository navigation
refactor(ui): migrate antd Typography to core Typography - #34106
Conversation
Core Typography gains an opt-in variant (text | paragraph | title | link) with level, strong and code, reproducing antd Typography's computed styles as rendered in this app (measured in a browser against the full global stylesheet); dark mode uses the flipping design tokens. Existing core Typography usages without variant render unchanged. All antd Typography.Text/Paragraph/Title/Link usages in the OSS UI move to core Typography; component LESS selectors that targeted .ant-typography gain [data-typography] twins, and tests/Playwright locators follow the new markup. ReindexFailures keeps antd Typography (copyable / expandable ellipsis have no core equivalent yet).
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
…phy-to-core # Conflicts: # openmetadata-ui/src/main/resources/ui/src/components/DataAssets/DomainLabelV2/DomainLabelV2.tsx # openmetadata-ui/src/main/resources/ui/src/components/MyData/CustomizableComponents/CustomiseLandingPageHeader/LandingPageDomainSelector.tsx # openmetadata-ui/src/main/resources/ui/src/components/NavBar/NavBar.tsx # openmetadata-ui/src/main/resources/ui/src/components/common/DomainDisplay/DomainDisplay.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/common/DomainDisplay/DomainDisplay.test.tsx # openmetadata-ui/src/main/resources/ui/src/components/common/DomainLabel/DomainLabel.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/common/DomainLabel/DomainLabelNew.tsx # openmetadata-ui/src/main/resources/ui/src/components/common/DomainSelectableList/DomainSelectableListNew.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/common/DomainsSection/DomainsSection.test.tsx
✅ Playwright Results — workflow succeededValidated commit ✅ 4654 passed · ❌ 0 failed · 🟡 3 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 38m 13s ⏱️ Max setup 7m 4s · max shard execution 19m 22s · max shard-job elapsed before upload 23m 17s · reporting 18s 🌐 227.25 requests/attempt · 2.19 app boots/UI scenario · 38.21% common-shard skew Optimization targets still in progress:
🟡 3 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…ng FQN/URL/email text
ShaileshParmar11
left a comment
There was a problem hiding this comment.
Need AUT validation, along with Collate changes
… attachment placeholder
…phy-to-core # Conflicts: # openmetadata-ui/src/main/resources/ui/src/components/Glossary/AddGlossary/AddGlossary.component.tsx
- Tooltip trigger keeps the parent's text alignment instead of the button's UA centring (truncated text was centred in table cells). - Links nested in Typography skip article-prose link styling and keep the app's antd link rule (no underline until hover, weight 500). - Inline ellipsis trigger uses inline-flex so the button's line box no longer adds ~2px under entity header text. - Replace className="text-grey-muted" with color="secondary" on the 125 migrated Typography sites.
…sites
antd Typography painted its own primary text colour and gave paragraphs and
titles a bottom margin; core Typography inherits colour and sets no margin.
Restore both only where a runtime scan against main showed a difference:
- tw:text-primary where the text now inherited a tertiary/grey parent
(core table cells, link buttons, headings)
- tw:mb-3.5! / tw:mb-2! where antd's paragraph/title margin was load-bearing
(the ! is needed to beat the global p { margin-bottom: 0 } reset)
- task-details-id LESS rule also targets the core Typography root
… in Collate Service-insights and no-data placeholders render inside Collate pages the OSS scan did not reach; the Collate parity scan showed they inherited a grey parent and lost antd's paragraph margin.
Found by extending the parity scan to opened modals/drawers/menus and a non-admin user: - tw:text-primary on modal titles that fell back to rgba(0,0,0,.85) - tw:mb-4! / tw:mb-3.5! on form titles and alert text that lost antd's paragraph margin (Add KPI/Policy/Rule/Role, What's New alert) - restore the .domain-link.ant-typography selector; broadening it to bare .domain-link turned the grey Domains label blue
…phy-to-core # Conflicts: # openmetadata-ui/src/main/resources/ui/src/pages/SettingsAppModePage/SettingsAppModePage.tsx
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
|
| Count | Rule |
|---|---|
| 473 | react-hooks/exhaustive-deps |
| 90 | no-restricted-imports |
| 33 | openmetadata-imports/no-lower-layer-page-imports |
| 15 | openmetadata-imports/review-sequential-api-calls |
| 12 | openmetadata-ui-patterns/no-non-adaptive-palette |
| 7 | openmetadata-imports/no-cross-page-imports |
| 6 | openmetadata-imports/no-circular-imports |
| 3 | openmetadata-imports/no-api-calls-in-iteration |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/APIEndpoint/APIEndpointSchema/APIEndpointSchema.tsx:486:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx:40:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx:41:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/ActivityFeed/TaskFeedCard/TaskFeedCardFromTask.component.tsx:186:9 |
react-hooks/exhaustive-deps |
The 'handleTaskLinkClick' function makes the dependencies of useMemo Hook (at line 222) change on every render. Move it inside the useMemo callback. Alternative |
| 🟡 | src/components/Alerts/AlertDetails/AlertDiagnosticInfo/AlertDiagnosticInfoTab.tsx:46:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchDiagnosticInfo'. Either include it or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertRecentEventsTab/AlertRecentEventsTab.tsx:96:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has an unnecessary dependency: 'filter'. Either exclude it or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertRecentEventsTab/AlertRecentEventsTab.tsx:310:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'paging' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertDetails/AlertRecentEventsTab/AlertRecentEventsTab.tsx:323:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'getAlertRecentEvents'. Either include it or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertFormSourceItem/AlertFormSourceItem.tsx:75:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Alerts/AlertFormSourceItem/AlertFormSourceItem.tsx:91:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'form'. Either include it or remove the dependency array. |
| 🟡 | src/components/Announcement/AnnouncementThreadBody.component.tsx:103:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'getThreads'. Either include it or remove the dependency array. |
| 🟡 | src/components/AppBar/SearchOptions.tsx:41:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'setIsOpen'. Either include it or remove the dependency array. If 'setIsOpen' changes too often, find the parent |
| 🟡 | src/components/AppBar/Suggestions.tsx:247:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'location.search'. Either exclude it or remove the dependency array. Outer scope values like 'location.search' |
| 🟡 | src/components/AppBar/Suggestions.tsx:394:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/BlockEditor/BubbleMenu/BubbleMenu.tsx:101:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'toggleLink'. Either include it or remove the dependency array. If 'toggleLink' changes too often, find the parent |
| 🟡 | src/components/BlockEditor/Extensions/File/AttachmentComponents/AttachmentPlaceholder.tsx:17:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/components/BlockEditor/Extensions/slash-command/SlashCommandList.tsx:20:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/components/Certification/Certification.component.tsx:129:9 |
react-hooks/exhaustive-deps |
The 'handleScroll' function makes the dependencies of useMemo Hook (at line 240) change on every render. Move it inside the useMemo callback. Alternatively, wra |
| 🟡 | src/components/Certification/Certification.component.tsx:276:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'currentCertificate' and 'getCertificationData'. Either include them or remove the dependency array. If 'setSelec |
| 🟡 | src/components/Container/ContainerDataModel/ContainerDataModel.tsx:309:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 't', 'tagFilter.Classification', and 'tagFilter.Glossary'. Either include them or remove the dependency array. Oute |
| 🟡 | src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:105:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'getEntityPermission'. Either include it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:130:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'fetchChartPermissions' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:137:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'getAllChartsPermissions'. Either include it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:157:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:297:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has an unnecessary dependency: 'chartFilters'. Either exclude it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DashboardChartTable/DashboardChartTable.tsx:408:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'dashboardDetails?.fullyQualifiedName', 'getChartPermissionFlags', 'hasEditGlossaryTermAccess', 't', 'tagFilter.Cla |
| 🟡 | src/components/Dashboard/DataModel/DataModels/DataModelsTable.tsx:131:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'pageSize'. Either include it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DataModel/DataModels/DataModelsTable.tsx:198:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'handlePagingChange'. Either include it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DataModel/DataModels/DataModelsTable.tsx:242:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'searchDataModels'. Either include it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DataModel/DataModels/DataModelsTable.tsx:255:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchDashboardsDataModel'. Either include it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DataModel/DataModels/ModelTab/ModelTab.component.tsx:168:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has an unnecessary dependency: 'paging'. Either exclude it or remove the dependency array. |
| 🟡 | src/components/Dashboard/DataModel/DataModels/ModelTab/ModelTab.component.tsx:224:9 |
react-hooks/exhaustive-deps |
The 'updateColumnDetails' function makes the dependencies of useCallback Hook (at line 253) change on every render. To fix this, wrap the definition of 'updateC |
| 🟡 | src/components/Dashboard/DataModel/DataModels/ModelTab/ModelTab.component.tsx:224:9 |
react-hooks/exhaustive-deps |
The 'updateColumnDetails' function makes the dependencies of useCallback Hook (at line 270) change on every render. To fix this, wrap the definition of 'updateC |
| 🟡 | src/components/Dashboard/DataModel/DataModels/ModelTab/ModelTab.component.tsx:454:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataAssetRules/DataAssetRules.component.tsx:76:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataAssetRules/DataAssetRules.component.tsx:80:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchSemanticsRules'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataAssetRules/DataAssetRules.component.tsx:115:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'fetchSemanticsRules' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/DataAssetRules/DataAssetRules.component.tsx:134:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'form'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataAssetRules/DataAssetRules.component.tsx:362:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 't'. Either exclude it or remove the dependency array. Outer scope values like 't' aren't valid dependencies b |
| 🟡 | src/components/DataAssetRules/DataAssetRules.component.tsx:382:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'addEditSemanticsRule' and 'deleteSemanticsRule'. Either include them or remove the dependency array. |
| 🟡 | src/components/DataContract/AddDataContract/AddDataContract.tsx:309:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'onSave' and 't'. Either include them or remove the dependency array. If 'onSave' changes too often, find the p |
| 🟡 | src/components/DataContract/AddDataContract/AddDataContract.tsx:524:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataContract/AddDataContract/AddDataContract.tsx:567:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataContract/ContractDetailFormTab/ContractDetailFormTab.tsx:143:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'form'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataContract/ContractQualityCard/ContractQualityCard.component.tsx:112:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchTestCaseSummary' and 'fetchTestCases'. Either include them or remove the dependency array. |
| 🟡 | src/components/DataContract/ContractQualityFormTab/ContractQualityFormTab.tsx:94:9 |
react-hooks/exhaustive-deps |
The 'fetchAllTests' function makes the dependencies of useCallback Hook (at line 128) change on every render. To fix this, wrap the definition of 'fetchAllTests |
| 🟡 | src/components/DataContract/ContractQualityFormTab/ContractQualityFormTab.tsx:94:9 |
react-hooks/exhaustive-deps |
The 'fetchAllTests' function makes the dependencies of useCallback Hook (at line 142) change on every render. To fix this, wrap the definition of 'fetchAllTests |
| 🟡 | src/components/DataContract/ContractQualityFormTab/ContractQualityFormTab.tsx:167:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataContract/ContractQualityFormTab/ContractQualityFormTab.tsx:211:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchAllTests'. Either include it or remove the dependency array. |
| 🟡 | src/components/DataContract/ContractSLACard/ContractSLA.component.tsx:182:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
… and 589 more. Run make ui-checkstyle-changed locally for the full list.
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed…phy-to-core # Conflicts: # openmetadata-ui/src/main/resources/ui/src/components/Alerts/AlertDetails/AlertRecentEventsTab/AlertRecentEventsTab.tsx # openmetadata-ui/src/main/resources/ui/src/components/DataContract/ContractSLACard/ContractSLA.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/ColumnDetailPanel.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/Database/TableQueries/QueryCard.tsx # openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityInfoDrawer/EdgeInfoDrawer.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/CustomNode.utils.tsx # openmetadata-ui/src/main/resources/ui/src/components/Explore/ExploreTree/ExploreTree.tsx # openmetadata-ui/src/main/resources/ui/src/components/SettingsSso/SSOConfigurationForm/SSOConfigurationForm.tsx # openmetadata-ui/src/main/resources/ui/src/components/TestLibrary/TestDefinitionList/TestDefinitionTable.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/UploadFile/UploadFile.tsx # openmetadata-ui/src/main/resources/ui/src/pages/Persona/PersonaDetailsPage/PersonaDetailsPage.tsx # openmetadata-ui/src/main/resources/ui/src/utils/CSV/CSV.utils.tsx # openmetadata-ui/src/main/resources/ui/src/utils/IngestionUtils.tsx
…phy-to-core Take main's core rewrite of the custom-property components (b19ecf4) and its removal of EditTableTypePropertyModal. Migrate AddTestCaseList, which still used antd Typography, to core Typography.
Code Review ✅ Approved 2 closed / 2 findings🔴 High risk · A shared Typography migration changes rendering across roughly 390 UI files. Migrates ~390 call sites from antd ✅ 2 closed✅ Security: variant="link" drops antd's automatic rel for target=_blank links
✅ Bug: Truncation check reads the wrapper, so block ellipsis never counts as cut
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Part of open-metadata/openmetadata-collate#6884 (antd → core migration epic) · Typography: open-metadata/openmetadata-collate#6885
Replaces antd
Typography(Text,Paragraph,Title,Link) with the existing core-componentsTypographyacross the OSS UI (~390 files). Colours, font sizes, line heights and margins follow core as-is; nothing recreates the antd look.Mapping at call sites:
Text<Typography>(span)Paragraphas="p", oras="div"when the children contain block elementsTitle level={n}as="hN";level={5}also getssize="text-md" weight="semibold"because core prose has no h5 styleLink<Typography><a …></Typography>, withrel="noopener noreferrer"ontarget="_blank"linkstypecolorstrongweight="semibold"code<code>childellipsis/rows/tooltipCore changes (small, in
typography.tsx, all behaviour and no styling API):ellipsisonspan/akeeps the text inline (inline-block) instead of wrapping it in a blockdiv.Word wrapping stays as on
main. The few migrated call sites that render long unbroken text (FQNs, URLs, emails, paths) addtw:wrap-break-wordlocally:EntityLabel,ProfileSectionUserDetailsCard,TermBoost,SsoTestLoginModal,UrlConfigurationPage,SearchUtils,TableTabsUtils.ReindexFailuresmoves off antd:copyable→ the existingCopyToClipboardButton.ellipsis.expandable→ a more/less toggle, shown only when the text is clamped.LESS: rules that styled migrated elements through
.ant-typographywere retargeted to the elements' own classes; rules that only reset antd defaults were dropped.Type of change:
High-level design:
variant/level/strong/codeAPI is not part of this PR.text-tertiary, and paragraphs use core margins. This is the intended design-system look and differs from antd in places.Tests:
Unit tests
typography.test.tsxpasses 26 tests, including new cases for: no tooltip when the text isn't truncated, the inline wrapper, and truncation detection on block elements.Manual testing performed
UI screen recording / screenshots:
Text follows core Typography styling (see the design notes above).
Checklist: