Repository navigation
Migrate antd Modal and Button to core components and freeze them with ESLint - #35226
Conversation
Replace every antd Modal (32 named imports plus 3 antd/lib/modal default imports) with @openmetadata/ui-core-components SimpleModal, or the Dialog primitives where no close button is wanted. The core ModalOverlay marks everything outside the dialog inert, which includes antd Select/DatePicker popups portaled to body. Modals that still host antd popups render them into the existing top-layer container (DrawerPopupContainerProvider) and are not dismissable on outside click. The shared DatePicker is built from antd/lib, which does not see the antd ConfigProvider, so it takes getPopupContainer directly. Modal is added to MIGRATED_ANTD_COMPONENTS, the suppressions baseline is pruned and the pinned antd symbol count drops from 791 to 755. Playwright selectors on .ant-modal* move to data-testid or role. Fixes open-metadata/openmetadata-collate#6895
🔄 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 |
…inline the team-move message
…al-to-core # Conflicts: # openmetadata-ui/src/main/resources/ui/eslint-rules/openmetadata-antd.test.mjs # openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx # openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesDetailPage/RolesDetailPage.tsx
🚦 Removed from the merge queue —
|
…modals for AI dark mode
🚦 Removed from the merge queue —
|
… core Button and freeze it with ESLint (#35252) * refactor(ui): migrate antd Button to core Button Replace every antd Button (137 files, ~270 call sites) with the core Button from @openmetadata/ui-core-components: type -> color (primary/secondary/tertiary/link-color, danger -> *-destructive, ghost primary -> secondary-brand), size small/middle/large -> xs/sm/md, icon -> iconLeading, loading/disabled -> isLoading/isDisabled, htmlType -> type, block -> tw:w-full. Caller-side restyling of the buttons is removed per the core-components rule: padding/border/colour/typography classes, inline styles and the LESS rules that targeted them. Layout (margin, width, position) stays. Structural fixes the core Button needs: - Buttons used only to stop click propagation, or wrapping a RangePicker, become a presentational element; an input cannot live inside a button. - Link > Button and a > Button pairs become Button href (react-aria RouterProvider handles client-side navigation). - The date-picker clear icon uses ButtonUtility. - StatusAction approve/reject use core colours and icons. Button is added to MIGRATED_ANTD_COMPONENTS, the suppressions baseline is pruned and the pinned antd symbol count drops from 687 to 548. Fixes open-metadata/openmetadata-collate#6886 * fix(ui): borderless profile manage menu items and a plain RangePicker for pipeline executions * fix(ui): address review on core Button migration - Remove the screenshot helper committed by mistake. - Theme preview: render the colour samples as non-interactive swatches instead of core Buttons restyled with inline colours. - UserTeamSelectableList trigger (Owners, Assignee) uses EditIconButton newLook, matching the other header edit icons. - Move the remaining button layout LESS to tw: classes and delete the rules; drop dead button class names; rotated x-icon replaced with core Plus. - AddDataContract: actions move to Card.Header extra so they sit on the right; drop the unused mode-change handler. * refactor(ui): use core Typography for text spans in files touched by the Button migration * fix(ui): one edit/request/comment icon button across headers and descriptions * fix(ui): drop legacy edit-icon overrides so every EditIconButton uses the core Edit01 * fix(ui): Test Case Status chart cards use theme surface tokens so they render correctly in dark mode * test(playwright): refresh teams visual baseline for the unified edit icon buttons
✅ Playwright Results — workflow succeededValidated commit ✅ 4872 passed · ❌ 0 failed · 🟡 2 flaky · ⏭️ 2 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) 53m 19s ⏱️ Max setup 4m 15s · max shard execution 20m 41s · max shard-job elapsed before upload 23m 55s · reporting 18s 🌐 230.25 requests/attempt · 2.16 app boots/UI scenario · 34.57% common-shard skew Optimization targets still in progress:
🟡 2 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 |
Resolve conflicts with the Applications core-ui migration (#35179) by keeping main's core implementations, and refresh the antd and Playwright suppression counts.
🚦 Removed from the merge queue —
|
Code Review ✅ Approved 2 closed / 2 findings🟡 Medium risk · Migrating 34 modals and roughly 270 buttons across the UI changes interaction and submission behavior, which could make common actions fail or trigger unexpectedly. Migrates antd Modal and Button to core components across the OSS UI and freezes both with the antd ESLint ratchet. Resolved this session: the icon-only close button in GithubStarCard and the icon-only core Buttons in ContractSecurityFormTab now have accessible names. No issues remain open. ✅ 2 closed✅ Quality: Icon-only close button in GithubStarCard has no accessible name
✅ Quality: Icon-only core Buttons in ContractSecurityFormTab have no accessible name
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledOptionsDisplay: 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 |
|
main's #35226 migrated antd Button to core components in the same Data Contract files this branch rewrites, so the DataContract conflicts resolve to this branch's version, which supersedes it (main's new aria-labels are already present here). The lint-suppression baselines were regenerated with --prune-suppressions from the merge-base copy rather than hand-merged: both sides only removed entries, so the base is a strict superset and pruning yields the exact counts for the merged tree (antd 514, positional locators 584). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…tton and search changes The Add Glossary button, description card and navbar search moved to core components (#35226 and this PR), so the old glossary.png no longer matches and the visual-regression job fails in the merge queue. The new baseline is the CI render of this branch.
…tton and search changes The Add Glossary button, description card and navbar search moved to core components (#35226 and this PR), so the old glossary.png no longer matches and the visual-regression job fails in the merge queue. The new baseline is the CI render of this branch.
…tton and search changes The Add Glossary button, description card and navbar search moved to core components (#35226 and this PR), so the old glossary.png no longer matches and the visual-regression job fails in the merge queue. The new baseline is the CI render of this branch.
…tton and search changes The Add Glossary button, description card and navbar search moved to core components (#35226 and this PR), so the old glossary.png no longer matches and the visual-regression job fails in the merge queue. The new baseline is the CI render of this branch.
Resolve conflicts with the Modal/Button freeze (#35226), the Data Contract (#35217), Add Assets (#35242) and Applications settings (#35179) migrations. Where main already migrated a file, keep main's version and drop this branch's duplicate (DataContract SLA/view switch, AssetSelectionContentBody, TableDataCardV2, AppLogsViewer, ReindexFailures). Elsewhere keep this branch's migration and port main's core Button changes onto it.
…#35280) * feat(ui): migrate standalone antd Select and Input to core components Moves every antd Select/Input that is not bound to an antd Form onto @openmetadata/ui-core-components (Select, Select.ComboBox, Autocomplete, Input, PasswordInput), including the legacy RJSF widgets and SSO array templates. Form-bound controls stay with the Form migration. - Searchable/async selects use Autocomplete (chips, server search) or Select.ComboBox; single-value clear keeps a "None"/"All" item or clears on empty input. - Deletes the unused CustomUnitSelect and antd-only LESS overrides. - NavBar Cmd+K now focuses the global search (its ref was never attached). - Updates unit tests and Playwright specs for the core DOM, prunes the ESLint suppressions and lowers the pinned antd/positional counts. * fix(ui): let Enter reach core comboboxes in the SSO form The SSO form swallows Enter on inputs to stop accidental submits and only exempted antd tag selects, so the migrated tag fields could not add values by pressing Enter. * test(ui): fix e2e fallout from the core Select/Input migration - Persona/SSO specs close the open list before touching chips or Save: react-aria hides the chips from the accessibility tree while the list is open, and removing a chip refocuses the field and reopens it. - Search settings selects retry the open-and-pick via selectSettingOption, since expanding a panel smooth-scrolls it and react-aria closes a popover whose trigger scrolls. - The legacy RJSF SelectWidget keeps the raw enum label in option test ids (select-option-JP) when labels are capitalized for display. * fix(ui): keep the lineage search text when the combobox loses focus Without allowsCustomValue, react-aria resets a combobox with no selected key to an empty input on blur, which cleared the platform lineage entity FQN and fired an empty search. * fix(ui-core): truncate long chips instead of overflowing narrow fields Autocomplete, MultiSelect and TreeSelect chips grew to their label's width (badges are size-max), so a long value spilled past a narrow field. The chip row can now shrink and each chip is capped at the field width, ending the label in an ellipsis. * chore(ui): refresh lint baselines after rebasing onto main Prunes the suppressions the migration cleared, lowers the pinned antd and positional-locator counts to match, and labels the mocked search input that main's stricter control-has-associated-label rule now checks. * chore(playwright): auto-refresh impact-map.generated.json * test(ui): refresh the glossary visual baseline for the core modal, button and search changes The Add Glossary button, description card and navbar search moved to core components (open-metadata#35226 and this PR), so the old glossary.png no longer matches and the visual-regression job fails in the merge queue. The new baseline is the CI render of this branch. * chore(ui): refresh lint baselines after rebasing onto main * test(ui): click Customize UI cards by test id The navbar search-index select is now the core Select, which renders a hidden native <select> whose options (Glossary, Table, Data Product, ...) share the card titles. The unscoped getByText('<card>', { exact: true }) clicks then hit two elements and fail strict mode. Click the card by its PageType test id instead. * test(ui): scope Customize UI card lookups and use the core lineage search The navbar search-index select is now the core Select, which renders a hidden native <select> whose options (Table, Topic, Data Product, ...) match the Customize UI card titles, so page-wide getByText(type, { exact }) lookups resolve to two elements. Give the CustomizeUI grid a test id and scope the card lookups to it. LineageControls still filled the antd .ant-select-selection-search-input; fill the core combobox inside search-entity-select instead. * chore(playwright): auto-refresh impact-map.generated.json * test(ui): pick the Data Quality "All" test type from the open dropdown getByTitle('All').nth(1) relied on the antd navbar search-index select contributing the first title="All"; with the core Select there is only one, so nth(1) never resolved and the TestCase filters test timed out. Scope the click to the open antd dropdown instead, and prune the now unused positional-locator suppression. * feat(ui): move simple modal forms from antd Form to core HookForm ProfileEditModal, LineageConfigModal, TestEmail, ChangePasswordForm, ModalWithQueryEditor and ModalWithFunctionEditor now use react-hook-form with core FormFields/FormField and core Input/PasswordInput. Core: FieldPropsMap gains inputDataTestId so Input-based fields keep test ids on the inner input, and PasswordInput forwards inputDataTestId. * feat(ui): move config, policy, rule and role forms to core HookForm - Login/URL configuration pages use core FormFields/Input; numbers are converted on submit, and doc-panel focus tracking moves to a wrapper. - Add policy, add rule and edit rule reuse the core AccessControlRuleForm; the classic antd RuleForm is deleted. - Add role uses a core Input and an Autocomplete for policies. - Form.constants gains react-hook-form name/display-name rules. - Policies and Roles specs drive the core controls. * feat(ui): move email, team, bot auth and create-user forms to core HookForm EmailConfigForm reuses the AI email-settings mappers; AddTeamForm, AuthMechanismForm and CreateUser move to react-hook-form with core Input/Select/Autocomplete/Toggle. getJWTTokenExpiryOptions now returns core select items. E2E helpers switch to role locators, and the antd/positional suppression baselines shrink accordingly. * feat(ui): move persona form to core and reuse the core field value boost dialog AddEditPersonaForm moves to react-hook-form; its edit branch was unreachable (the page only opens it empty) and is dropped. The classic search settings pages now render the AI-mode FieldValueBoostDialog, so the antd FieldValueBoostModal is removed. * feat(ui): move team email and subscription forms to core HookForm * feat(ui): share the core custom property form and permission debugger with classic settings The add-custom-property fields move out of the AI CustomPropertiesAddPage into a shared CustomPropertyFormFields component plus payload utils, and the classic AddCustomProperty drawer/page now renders them on react-hook-form. The classic permission debugger page renders the AI AccessControlDebuggerPanel instead of its antd copy. * feat(ui): move the theme settings form to core HookForm AppearanceConfigSettingsPage drives its fields through react-hook-form; a primary colour change regenerates the hover and selected shades via a watch subscription. The profile sample field loses its layout-only antd Form.Item. * feat(ui): share the core learning resource fields with the classic drawer The AI learning-resource field list moves into useLearningResourceFields; the classic LearningResourceForm drawer now renders it on react-hook-form and reuses the AI payload mappers. * feat(ui): move the data asset rule form to core HookForm * feat(ui): move query and KPI forms to core HookForm; let RHF own HookForm validation HookForm now defaults to react-aria's aria validation, so native required attributes no longer block submit before react-hook-form can report inline errors. AddQueryPage and both KPI pages move to react-hook-form; the KPI pages share KPIFormFields. The semantics tab validates its editor by explicit field paths. * feat(ui): move lineage config and table constraint forms to core HookForm TableConstraintsModal becomes react-hook-form with a foreign-key field array, core Autocomplete key pickers and an async ComboBox for the related column; its saved-constraints parsing moves to TableConstraintsModal.utils. Playwright helpers switch to role locators. * feat(ui): move the task form settings page to core HookForm Only the general fields are form-managed (the designer keeps the schema state), so loading a template no longer risks spreading stale schema values. Builder, transition and stage editors use core Input/Select/TextArea/Autocomplete. * fix(ui): keep typed rule conditions and render the bot form fields The rule condition combobox now allows custom values, so react-aria no longer resets the typed expression on blur and drops it from the saved rule. CreateUser's bot fields take control as a prop: HookForm's provider belongs to the core package's react-hook-form copy, so useFormContext() in the app returned null and crashed the add-bot page. AddRoleAndAssignToUser picks policies by role. * chore(ui): refresh lint baselines after rebasing onto the updated base * fix(ui): visual fixes from the form migration review Core Toggle caps its width at the container so a long hint wraps instead of overflowing (the bot form's impersonation hint ran off the card). The table constraint modal's add button keeps its content width and the related-column combobox drops the shortcut hint. The task form grid span is escaped so LESS stops computing 1 / -1 into -1, which put Description in a third column. * fix(ui): cap percentage KPI targets and record the form migration rules Percentage KPI targets are validated to 0-100 again, as the antd InputNumber max did. Two decision records capture rules the PR description stated only in prose: classic forms reuse the AI-mode core form when one exists, and inside HookForm react-hook-form rules are the only validation that blocks submit. * test(ui): pick token expiry from the core Select in user helpers * fix(ui): keep the learning resource drawer open while picking options * feat(ui): move TeamTypeSelect and ColorPicker to core components TeamTypeSelect uses the core Select and core icons. ColorPicker keeps its free-hex swatch + text pair on core Input and reports a plain string; the core COLOR_PICKER field is a fixed palette, so it cannot replace it for theme colours. * feat(ui): move the query table picker and classic term boosts to core QueryUsedByOtherTable picks tables with the core DataAssetAsyncSelectList and reports entity references, so QueryCard no longer maps antd options. The classic search settings reuse the AI-mode TermBoostCard instead of the antd TermBoost copy. * test(ui): wait for any table search when picking the query's tables * fix(ui): keep query table picks and name each theme colour input The query table picker is controlled, so it now follows the user's picks instead of being reset to the saved tables on every parent re-render. ColorPicker takes the field label, so the hex box and the swatch of each theme colour get their own accessible names. * fix(ui): keep the theme colour swatch a full-size native colour input * chore(ui): refresh the positional-locator baseline after rebasing onto main * chore(playwright): auto-refresh impact-map.generated.json * fix(ui): re-read the lineage config each time its modal opens Callers keep the modal mounted and only toggle visibility, so the form now resets from the current config on open instead of keeping the first-render values or a cancelled edit. * fix(ui): address self-review on the form migration - SelectWidget keeps saved values that are no longer in the enum, visible and untouched, instead of hiding them or rewriting them to undefined. - GlobalSettingItem treats a cleared number as a cancelled edit. - Core Plus / Trash01 icons replace antd icons with inline styles in the persona, user, team and table constraint forms. - KPI, custom property, persona, node suggestion and query picker layout uses core Grid gaps, Box and Typography instead of layout shims and raw divs. - Name rules share one limit, regex and message set across both rule shapes. - Persona popover cancel / save accessible names were swapped. * chore(ui): run CI's i18n sync checks in make ui-checkstyle-changed The UI Checkstyle workflow fails when yarn i18n changes the locale files or core-components' check-i18n-all fails, but the local target ran neither, so the failure only showed up in CI. The target now runs both; unlike CI it keeps the synced files so the new placeholders can be translated and committed. * Revert "chore(ui): run CI's i18n sync checks in make ui-checkstyle-changed" Not part of this PR: the I18n Sync failure was on the Collate PR, not here. * test(ui): fix the lineage view-mode and custom property E2E steps - LineageSettings picks the pipeline view mode from the core Select instead of the antd option title. - The custom property helper only presses Escape while the enum / table / entity-reference list is open: the add form is a dismissable drawer, so an Escape with no open list closed it and detached the description editor. * fix(ui-core): keep the toggle track full width next to long hint text The toggle root became a w-max flex row so long hints wrap, which let the track shrink: Allow Impersonation on Create Bot rendered a 20px track with only the knob visible. The track no longer shrinks. * chore(ui): refresh lint baselines after rebasing onto main * fix(ui): let the optional Task Category be cleared again The antd Select had allowClear; the core Select that replaced it ignores null keys and has no empty item, so once a category was set it was saved again on every edit. Add a None item that maps to an unset category, following the NO_CONSTRAINT_KEY convention in SchemaTable. * test(playwright): refresh visual-regression baselines after merging main The merge of main (open-metadata#35190 and earlier main changes) moved seven pages off their stored baselines; main's own merge-queue runs fail the same pages. Take the CI screenshots from run 38571094796 as the new baselines: ai-explore, metric-list-narrow, glossary, landing-page, landing-page-sidebar-collapsed, settings and users. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>



Describe your changes:
Fixes open-metadata/openmetadata-collate#6895
Fixes open-metadata/openmetadata-collate#6886
(part of open-metadata/openmetadata-collate#6884)
Migrates every antd
Modaland every antdButtonin the OSS UI to@openmetadata/ui-core-componentsand freezes both with the antd ESLint ratchet. The Button work (#35252) was stacked on this PR and has been merged into it, so this PR now carries both.Modal → core
SimpleModalantd/lib/modalimports →SimpleModal(orModalOverlay/Modal/Dialogwhere a close button or extra stacking is needed). Collate has no antd Modal left.open→isOpen,confirmLoading→isOkLoading,okButtonProps.disabled→isOkDisabled,maskClosable→isDismissable; forms submitting viaokButtonProps.form→onOk={form.submit}.ModalOverlaymarks everything outside the dialoginert, so the 8 modals that still host them render popups into the top-layerDrawerPopupContainerProviderand are not dismissable on outside click — ADR:2026-10-12-antd-popups-in-core-modals-use-the-top-layer-container.z-999lineage drawer..ant-modal*LESS removed (globalmodal.less,add-widget-modal.less,app-run-history.less,add-attribute-modal.less);rc-dialogdropped from the boot bundle list.Button → core
Buttontype→color(primary/secondary/tertiary/link-color,danger→*-destructive, ghost primary →secondary-brand),sizesmall/middle/large →xs/sm/md,icon→iconLeading,loading/disabled→isLoading/isDisabled,htmlType→type,block→tw:w-full.tw:classes; dead button class names dropped.div role="presentation"; buttons wrapping aRangePicker→span/ the picker alone;Link > Button/a > Button→Button href(react-ariaRouterProvider); date-picker clear →ButtonUtility; GitHub star popup close → coreCloseButton;StatusActionapprove/reject → core colours/icons; Add Contract actions →Card.Header extra.<span>s in touched files → coreTypography(85 spans).aria-label.EditIconButton newLook size="small", whose defaults are now coreEdit01/MessagePlusSquare/MessageChatSquare; 10 legacy-SVGicon=overrides removed (team, entity and incident headers now match).Dark mode (AI mode)
ESLint freeze
ModalandButtonadded toMIGRATED_ANTD_COMPONENTS;eslint-suppressions.jsonpruned;EXPECTED_SUPPRESSED_ANTD_SYMBOLS723 → 547.Core styling differences are accepted as-is; no caller-side overrides of core components.
Type of change:
High-level design:
Mechanical conversion of antd props to the core APIs (scripted for Button), then hand review of every
className, inlinestyle, dynamic prop, and every button that wrapped an input, modal or link. The one design decision — how antd popups keep working inside react-aria modals until the Form/Select migrations — is recorded in ADR:2026-10-12-antd-popups-in-core-modals-use-the-top-layer-container. No backend changes.Tests:
Use cases covered
href.Unit tests
mainmerge; 849 suites / 11,030 tests for theEditIconButtonchange).yarn test:eslint-rules: 191/191.generate-playwright-rule-table.mjs --check: clean.tsc --noEmit: no new errors in changed files.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
.ant-modal*/.ant-btn*reference used by the migrated components →data-testid/ role; custom-property editor title →dialog-title; new test idsadd-team-modal,remove-team-user-modal,restore-user-modal. Removed test ids audited against Playwright for both migrations.teamsbaseline refreshed for the unified edit icons (CI's own render, stable across attempts).Manual testing performed
main) vs after: 31 modals and 21 pages with migrated buttons; 20 more pages pixel-diffed for the Typography change.ui-checkstyle:changed(src + Playwright): 0 errors.UI screen recording:
Not applicable: refactor (component swap). Before/after screenshots below.
Modals
Teams (7)
add-team
team-remove-user
team-leave
team-remove-role
team-add-role
team-hierarchy-move
team-subscription
Roles / Policies (3)
role-add-policy
role-remove-policy
policy-remove-role
Users (5)
user-list-restore
profile-restore
profile-edit-name
change-password
sidebar-logout
Personas (3)
persona-add
persona-default
persona-remove-user
Settings & Apps (6)
test-email
audit-export
data-asset-rule-add
app-schedule
app-run-config
app-stop-run
Data assets & Lineage (7)
lineage-config
lineage-add-pipeline
lineage-edge-sql
table-constraints
profiler-settings-db
custom-metric-edit
sample-data-json
Buttons
Edit icons before/after (3)
Team header
Table header + description
Incident header (Owners / Assignee)
Test Case Status dark mode before/after (2)
Tag → Data Observability, dark
Data Quality, light
Access control & teams (6)
roles-list
policies-list
team-details
team-roles-tab
user-profile
tasks
Settings (8)
email-config
appearance
sso-config
search-settings-global
search-settings-table
bot-details
app-details
app-runs
Data assets & quality (7)
table-queries
table-sample-data
table-profiler-settings
pipeline-executions
data-contract-add
data-insights
test-library
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.docs/decisions/2026-10-12-antd-popups-in-core-modals-use-the-top-layer-container.md.