Repository navigation
refactor(ui): migrate remaining antd Tabs to core Tabs - #33912
Conversation
Moves the settings, services, governance, form, modal, panel and legacy TabPane tab usages off antd Tabs onto @openmetadata/ui-core-components Tabs, removes the antd tab Less that only served them, and switches the related unit tests and Playwright locators to role-based queries.
❌ 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 |
|
| Count | Rule |
|---|---|
| 98 | react-hooks/exhaustive-deps |
| 8 | openmetadata-imports/review-sequential-api-calls |
| 3 | openmetadata-imports/no-lower-layer-page-imports |
| 2 | openmetadata-imports/no-cross-page-imports |
| 1 | openmetadata-imports/no-api-calls-in-iteration |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | 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/Explore/EntitySummaryPanel/DataQualityTab/DataQualityTab.tsx:483:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTestCases'. Either include it or remove the dependency array. |
| 🟡 | src/components/MyData/CustomizableComponents/AddDetailsPageWidgetModal/AddDetailsPageWidgetModal.tsx:131:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.tsx:127:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchKnowledgePanels'. Either include it or remove the dependency array. |
| 🟡 | src/components/MyData/CustomizableComponents/AddWidgetModal/AddWidgetModal.tsx:172:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/NotificationBox/NotificationBox.component.tsx:227:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'onMarkMentionsNotificationRead' and 'onMarkTaskNotificationRead'. Either include them or remove the dependency |
| 🟡 | src/components/NotificationBox/NotificationBox.component.tsx:239:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'getTaskNotificationData'. Either include it or remove the dependency array. |
| 🟡 | src/components/ServiceInsights/ServiceInsightsTab.tsx:145:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'serviceCategory' and 'serviceName'. Either include them or remove the dependency array. |
| 🟡 | src/components/ServiceInsights/ServiceInsightsTab.tsx:242:11 |
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/components/ServiceInsights/ServiceInsightsTab.tsx:315:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchChartsData'. Either include it or remove the dependency array. |
| 🟡 | src/components/ServiceInsights/ServiceInsightsTab.tsx:336:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'triggerSocketConnection'. Either include it or remove the dependency array. |
| 🟡 | src/components/ServiceInsights/ServiceInsightsTab.tsx:340:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'getAgentStatuses'. Either include it or remove the dependency array. |
| 🟡 | src/components/ServiceInsights/ServiceInsightsTab.tsx:354:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'onSocketDataUpdate'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Applications/AppDetails/AppDetails.component.tsx:321:11 |
openmetadata-imports/review-sequential-api-calls |
Review these sequential API requests. If they are independent, start them together with Promise.all/Promise.allSettled; keep sequencing only when data-dependent |
| 🟡 | src/components/Settings/Applications/AppDetails/AppDetails.component.tsx:411:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'appData'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Applications/AppDetails/AppDetails.component.tsx:584:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchAppDetails'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:67: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/Settings/Team/TeamDetails/TeamDetailsV1.tsx:68: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/Settings/Team/TeamDetails/TeamDetailsV1.tsx:213:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:308:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:530:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'isOrganization'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:557:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'showModal'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:568:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'currentTeam.name' and 'navigate'. Either include them or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:607:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:661:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'IMPORT_EXPORT_MENU_ITEM', 'handleOpenToJoinToggle', 'handleReactiveTeam', 'isGroupType', and 't'. Either include t |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:756:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 't' and 'teamAssetCounts'. Either include them or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:781:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has an unnecessary dependency: 'isTeamMemberLoading'. Either exclude it or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:813:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'navigate' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:892:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'fetchErrorPlaceHolder' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:967:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'fetchErrorPlaceHolder' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:997:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'currentTeam.isJoinable', 'isOrganization', and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:1101:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'IMPORT_EXPORT_MENU_ITEM' and 't'. Either include them or remove the dependency array. Outer scope values like 'get |
| 🟡 | src/components/Settings/Team/TeamDetails/TeamDetailsV1.tsx:1186:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'isGroupType'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Users/Users.component.tsx:96:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'currentUser?.name'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Users/Users.component.tsx:130:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'location.search' and 'navigate'. Either include them or remove the dependency array. |
| 🟡 | src/components/Settings/Users/Users.component.tsx:135:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'handleTabRedirection' and 'initLimits'. Either include them or remove the dependency array. |
| 🟡 | src/components/Settings/Users/Users.component.tsx:166:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array. |
| 🟡 | src/components/Settings/Users/Users.component.tsx:298:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'activeTab', 'queryFilters.following', 'queryFilters.myData', and 't'. Either include them or remove the dependency |
| 🟡 | src/components/Settings/Users/Users.component.tsx:381:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'afterDeleteAction' and 't'. Either include them or remove the dependency array. If 'afterDeleteAction' changes |
| 🟡 | src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.tsx:232:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'fetchTypeDetail' and 'tab'. Either include them or remove the dependency array. |
| 🟡 | src/pages/CustomPropertiesPageV1/CustomPropertiesPageV1.tsx:273:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'selectedEntityTypeDetail' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/pages/DataQuality/DataQualityPage.tsx:96:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'handleOpenBundleSuiteModal', 'handleOpenTestCaseModal', 't', and 'testSuitePermission?.Create'. Either include the |
| 🟡 | src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx:127:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx:190:24 |
openmetadata-imports/review-sequential-api-calls |
Review these sequential API requests. If they are independent, start them together with Promise.all/Promise.allSettled; keep sequencing only when data-dependent |
| 🟡 | src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx:219:24 |
openmetadata-imports/review-sequential-api-calls |
Review these sequential API requests. If they are independent, start them together with Promise.all/Promise.allSettled; keep sequencing only when data-dependent |
| 🟡 | src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx:342:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'fqn', 'handleRuleDelete', 'navigate', and 't'. Either include them or remove the dependency array. |
| 🟡 | src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx:453:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'fqn', 'getRuleActionElement', 'navigate', and 't'. Either include them or remove the dependency array. |
| 🟡 | src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx:487:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
… and 62 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
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
# Conflicts: # openmetadata-ui/src/main/resources/ui/playwright/eslint-rules/tests/corpus.test.mjs
# Conflicts: # openmetadata-ui/src/main/resources/ui/playwright/eslint-rules/tests/corpus.test.mjs # openmetadata-ui/src/main/resources/ui/src/components/Explore/EntitySummaryPanel/entity-summary-panel.less
Code Review ✅ Approved🟡 Medium risk · Migrates tabs across settings, service, and data-quality pages with behavior changes. Completes the migration of remaining Ant Design Tabs to core Tabs components (react-aria based), eliminating all antd 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:
Follow-up to #33890. Moves the remaining 22 antd
Tabsusages onto the@openmetadata/ui-core-componentsTabs(react-aria). After this PR, nothing underopenmetadata-ui/.../srcimportsTabsorTabsPropsfrom antd.I compared every
data-testidin each changed file against the base, and none were lost. The only removals are antdTabsstubs in two unit-test mocks.Type of change:
High-level design:
The patterns and core additions from #33890 are reused here:
Tabs.List variant="card",actions,useTabItemStateandgetRenderedActiveTab. No core component changes.Page tab bars (previously
className="tabs-new") useTabs.List size="sm" type="underline" variant="card", withclassName="tw:gap-3"on the root. They are controlled throughgetRenderedActiveTabwherever the key comes from the route or tabs can be hidden:Non-page tabs use the plain core types, not the card variant:
orientation="vertical"+type="line", withtw:flex-rowon the root so the list stays on the left.type="button-border"(was antdtype="card").underline.TabPanechildren (activity thread panel, notification box, task tabs) are converted to items.State preserved across tab switches. react-aria mounts only the selected panel, whereas antd (without
destroyInactiveTabPane) kept visited panes mounted. A newuseVisitedTabshook (src/hooks/useVisitedTabs.ts) keeps a panel mounted after its first visit (shouldForceMount+tw:data-inert:hidden); panels still mount lazily. It is used where panels hold local state:AddDataContract: each form tab starts from the original contract when it mounts, so a remount would lose edits.ActivityThreadPanel: unsent conversation and task drafts.AddWidgetModal: the widget size picked on each tab.AlertDetailsContent: the recent events filter and page.ServiceDetailsPage: e.g. an unsaved Service Attributes draft on the Connection tab.DescriptionTabsalways keeps the New panel mounted, because the Diff tab reads its editor.TaskFormSettingsPagestate was already lifted, so nothing changes there; its sub-tab selection is now kept in state, so the chosen sub-tab survives a trip to "Advanced JSON".Fallback tabs. Where a stale or unknown route tab falls back to the first rendered tab, the resolved key also drives the tab-dependent controls: the Data Quality toolbar and export button, and the Tag page AI header.
ServiceInsightsTab. It now syncs the AutoPilot status with workflow state that arrives after the tab mounts. Before, it only read the status once at mount, so the status banner could stay empty.
Styles
service-page.lessdeleted), service details, tag page, data quality page, test suite details, data contract, task form settings, task page, widget modal, entity summary panel / DataQualityTab, feeds widget, feed panel body.ant-tabs-descriptionand.ant-tabs-custom-threadpanelinapp.less, the dead.quality-tab-container .ant-tabs.tabs-newrule, and the now-unused@app-details-page-tabs-height,@users-page-tabs-heightand@services-page-tabs-heightvariables.ant-tabs,.ant-tabs.tabs-newand.entity-details-page-tabsrules instyles/app.less/styles/components/tabs.less. Collate UI still renders antdTabswith these classes (for example, Observability pipeline details and the Collate support app) and picks up these global styles. Remove them once Collate migrates..tabs-newpane was white, the panel now carries Tailwind (tw:rounded-xl tw:bg-primary, etc.).Row/Colaround the touched tab areas are replaced with coreBox/div. antdTooltip+Buttoninside antdDropdowns are unchanged, because they need a combined button and dropdown migration.Types
AlertDetailsPage.interface.ts,ServiceDetailsPageandCustomizePageUtils.test.tsuseDetailsTabIteminstead of antdTabsProps.Behaviour differences
onTabClickre-ran the handler: Notification box re-fetched and re-marked as read; Alert details re-navigated, which did nothing. Opening the bell still marks the active tab as read.?activeTab=even when that tab is not in the list yet, because plugin tabs register asynchronously. This matches an existing test.EntityDetailHeaderalready draws the tab bar. Before,renderTabBarhid the antd bar.linestyle instead of the custom grey active background with a right border.Tests:
Unit tests
EntityRightPanelVerticalNav,ExploreV1,CustomizePageUtils,ServiceInsightsTaband the newuseVisitedTabshook: all pass..ant-tabs*selectors with role queries (Users.component.test.tsx,AddDataContract.test.tsx,DataQualityTab.test.tsx).Tabsstubs from the mocks.useVisitedTabstracks every visited tabServiceInsightsTabshows workflow status that arrives after mountBackend integration tests
Ingestion integration tests
Playwright (UI) tests
[role="tab"]now usepage.getByRole:nightly/AutoClassification.spec.ts:.ant-tabs-nav-list [data-testid="databases"]→getByRole('tab', { name: /^Databases/ })utils/serviceIngestion.ts,support/entity/ingestion/ServiceBaseClass.ts,Features/AutoPilot.spec.ts: the Agents tabPages/Roles.spec.ts: the Policies, Teams and Users tabsutils/entityPanel.ts,PageObject/Explore/DataQualityPageObject.ts:.ant-tabs-tab→getByRole('tab', { name: /incident/i })utils/activityFeed.ts:.ant-tabs-content-holder→getByRole('tabpanel')utils/KnowledgeCenter.ts: the mention notification lookup is scoped to the Mentions tab panel instead of.nth(1), which relied on the hidden Tasks panel staying mountedTeamActivity.spec.ts,TaskNavigation.spec.ts,ActivityFeed.spec.tsandIncidentManager.spec.ts. The IncidentManager lookup is now scoped to.notification-box.Manual testing performed
yarn ui-checkstyle:changed+yarn ui-checkstyle:playwright:changedon all changed files: 0 lint errors, no formatting/i18n/app-docs diff,tw-audit0 errors,tw-guardreports no new antd imports.tsc --noEmitagainst this branch's coredist: no new errors compared with the base.yarn token-audit: no errors in the touched Less files. The baseline total is unchanged.data-testidaudit script: identical testid occurrences per changed source file.Tabs/TabsPropsimport from antd remains undersrc/.Not checked in the browser yet. These are worth a visual pass: the data contract vertical tabs, the widget modals, the Tag page in AI mode, and the notification box.
UI screen recording / screenshots:
To be added.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code
The PR appears safe to merge; the previous tab-state and fallback-selection issues are fixed, and no new actionable failure was found.
Summary
Migrates the remaining application tabs from Ant Design to the React Aria-based core Tabs component while preserving route-controlled selection and stateful visited panels.
useVisitedTabsto retain drafts, edits, filters, and pagination across tab switches.ServiceInsightsTab.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Route or local selected key] --> B[getRenderedActiveTab where needed] B --> C[Core Tabs selectedKey] C --> D[Tabs.List and Tabs.Item] C --> E[Selected Tabs.Panel] C --> F[useVisitedTabs] F --> G[Previously visited panels remain mounted] G --> H[Inactive panels are inert and hidden]Reviews (3) · Last reviewed commit: "test(playwright): lower recorded no-posi..."