Repository navigation
Migrate antd Form, Select and Input to core components - #35280
Conversation
b9c9ea4 to
5ac272f
Compare
🔄 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 |
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
fb64f1b to
96ef64a
Compare
🚦 Removed from the merge queue —
|
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.
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.
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.
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.
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.
- 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.
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.
…anged" Not part of this PR: the I18n Sync failure was on the Collate PR, not here.
- 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.
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.
🚦 Removed from the merge queue —
|
# Conflicts: # openmetadata-ui/src/main/resources/ui/eslint-rules/openmetadata-antd.test.mjs
🚦 Removed from the merge queue —
|
# Conflicts: # openmetadata-ui/src/main/resources/ui/eslint-rules/openmetadata-antd.test.mjs # openmetadata-ui/src/main/resources/ui/eslint-suppressions.json # openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/AdminPermissionDebugger/AdminPermissionDebugger.component.tsx # openmetadata-ui/src/main/resources/ui/src/components/Settings/Users/AdminPermissionDebugger/AdminPermissionDebugger.style.less # openmetadata-ui/src/main/resources/ui/src/pages/TableDetailsPageV1/TableConstraints/TableConstraintsModal/TableConstraintsModal.component.tsx # openmetadata-ui/src/main/resources/ui/src/pages/TaskFormSettingsPage/TaskFormSettingsPage.tsx # openmetadata-ui/src/main/resources/ui/src/pages/TaskFormSettingsPage/components/TaskFormBuilderSection.tsx
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.
…ect-input-standalone Conflicts with #35190 (classic-mode Observability off antd): - autocomplete.tsx: keep this branch's ellipsis comment and main's remove-button label. - DataQuality.spec.ts: take main's listbox locator; #35190 moved the test-type filter to core and this branch does not touch it. - eslint-suppressions.json: pruned against the merged tree; antd pin set to the real total (246) and the positional-locator pin to 568.
🚦 Removed from the merge queue —
|
The merge of main (#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.
Code Review ✅ Approved 3 closed / 3 findings🔴 High risk · Migrating role and policy rule editors could submit changed authorization conditions, potentially granting users access to resources they should not reach. Migrates antd Form, Select and Input across lineage, search, settings, admin and RJSF forms to core ui-core-components, with inline validation and role-based test locators. Lineage config modal no longer keeps stale or cancelled values, which was resolved in this session. No open issues remain. ✅ 3 closed✅ Bug: Lineage config modal keeps stale or cancelled values
Closed: Bug: Platform lineage search loses the current entity FQN on blur
Closed: Bug: Task Category can no longer be cleared once set
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Part of open-metadata/openmetadata-collate#6893 and open-metadata/openmetadata-collate#6894 (epic open-metadata/openmetadata-collate#6884).
Moves antd
Form,SelectandInputonto@openmetadata/ui-core-components(react-hook-form+HookForm/FormField/FormFields,Select,Select.ComboBox,Autocomplete,Input,PasswordInput). This single PR combines the three parts that were opened separately, to go through the merge queue once:Select/Inputnot bound to an antdForm(this PR's original scope).Out of scope (in flight elsewhere): Data Quality, Observability / Alerts and Profiler forms are migrated by #35190 (OSS) and open-metadata/openmetadata-collate#7276 (Collate), including
AddTestSuitePipeline,SliderWithInput,CustomRangeWidget,AsyncSelectin alerts andFQNListSelect. Once #35190 lands, a follow-up removes the legacy antd field renderer inutils/formUtils.tsxand freezesForm/Select/InputinMIGRATED_ANTD_COMPONENTS.Type of change:
High-level design:
Part 1 — standalone controls
Select(selectedKey/value+onChange)Select.ComboBox(caller filters items; empty input clears the value likeallowClear)Autocomplete(multiple,filterOption={() => true},onSearchChange)mode="tags"AutocompletewithallowsCreation+hideDropdown(CSV split and paste kept)Input/Input.PasswordInput(inputDataTestId) /PasswordInputFiles:
LineageSearchSelect(Autocomplete, virtualizes >200 items, so the manual scroll paging and its constants are gone),NodeSuggestions,NodeChildren,AddPipeLineModal,PlatformLineage+EntitySuggestionOption(now plain option content; selection is handled by the combobox instead of a button nested in an option).GlobalSearchBar,SearchPreview,EntitySearchSettings,FieldConfiguration,GlobalSettingsItem(core Input has nomin/max, so the value is clamped on save).PersonaSelectableList,UserProfileRoles,RolesCard,BotDetails,AuthMechanism,TeamsHeadingLabel,AddAttributeModal,OnlineUsersPage,SampleDataTable,SchemaTable.SelectWidget,PasswordWidget,LdapRoleMappingWidget,WorkflowArrayFieldTemplate,SsoConfigurationFormArrayFieldTemplate,SsoRolesSelectField.CustomUnitSelect(no importers) and antd-only LESS overrides.Autocomplete,MultiSelectandTreeSelectno longer overflow narrow fields — the chip row can shrink and each chip is capped at the field width with an ellipsis.InputRefwas never attached, so the shortcut did nothing).Behaviour notes:
allowClearon single selects maps to a "None" / "All" item where clearing means something (constraint, entity-type filter, search index).AlertsUtil,BotsUtilsandProfilerSettingsModalare form-bound: bots move with Part 2, alerts and profiler with refactor(ui): remove antd from classic-mode Observability #35190.Part 2 — settings and admin forms
Where AI mode already had a core version of a form, the classic page now reuses it instead of keeping a second antd copy:
AccessControlRuleFormfor add/edit rule (classicRuleFormdeleted)EmailConfigFormFieldValueBoostDialogin classic search settings (classicFieldValueBoostModaldeleted)AccessControlDebuggerPanelin the classic permission debugger pageCustomPropertyFormFields+ payload utils (extracted from the AI add page) for the classic add-custom-property drawer/pageuseLearningResourceFieldsfor the classic learning-resource drawerMigrated in place:
ProfileEditModal,LineageConfigModal,TestEmail,ChangePasswordForm,ModalWithQueryEditor,ModalWithFunctionEditorAppearanceConfigSettingsPage), data asset rulesCreateUser,AddTeamForm,AuthMechanismForm, team email + subscription,AddEditPersonaForm(its unreachable edit branch dropped)AddQueryPage,AddKPIPage/EditKPIPage(sharedKPIFormFields),LineageConfigPage,TableConstraintsModal(foreign-key field array; parsing inTableConstraintsModal.utils),TaskFormSettingsPage+TaskFormBuilderSectionCore:
inputDataTestIdadded toFieldPropsMap;PasswordInputforwards it.HookFormdefaults to react-ariavalidationBehavior="aria", so a nativerequiredno longer blocks submit before react-hook-form can show inline errors (covered byhook-form.test.tsx).Playwright helpers move from antd class selectors to role-based locators for the touched forms; antd/positional suppression baselines shrink accordingly.
Part 3 — remaining form controls
TeamTypeSelect→ coreSelect, coreCheck/XCloseicons on its icon-only buttons (now with accessible names).ColorPicker: hex text on coreInput, swatch kept as a native colour input (core has no swatch control, and inside a coreInputthe swatch collapses to a thin stripe); reports a plain string and takes the fieldlabelso each theme colour has distinct accessible names. The coreCOLOR_PICKERfield is a fixed palette, so it cannot replace this free-hex picker for theme colours. Its LESS file goes; the unused legacyCOLOR_PICKERcase informUtilsis dropped.QueryUsedByOtherTable→ coreDataAssetAsyncSelectList(table index, multiple), reporting entity references;QueryCardno longer maps antd options to references.Classic search settings reuse the AI-mode
TermBoostCardinTermBoostList; the antdTermBoostcopy, its LESS and the per-caller card width overrides are removed.Follow-up after #35190 (adds the core
NumberInputand moves the lastAsyncSelect/ legacy-field callers):EntitySearchSettings: its two antdInputNumbers → coreNumberInputAsyncSelectremoval once alerts no longer use itgetField/generateFormFieldsand the wrappers only it uses (SanitizedInput,FilterPattern,UserTeamSelectableListSearchInput, legacyFormItemLabel,FormUtils.interface), then freezeForm/Select/InputBehaviour changes:
Standalone controls: see "Behaviour notes" in Part 1 above.
Forms:
InputNumbermax used to clamp it).Remaining controls:
DataAssetAsyncSelectListlayout). Picks now persist across re-renders of the query card.xsicon buttons with accessible names.Tests:
Use cases covered
Unit tests
main: every changed test file — 33 suites / 520 tests pass; corevitest run— 77 files / 800 tests pass.jest --findRelatedTests872 suites / 11,301 tests; Part 2 883 suites / 11,393 tests; Part 3 affected suites pass.ColorPickeraccessible names, KPI percentage target above 100 rejected,HookFormaria validation default, bot form token-expiry field.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Users,UserDetails,PersonaFlow,SSOConfiguration,SearchSettings,CustomProperties,OnlineUsers,SampleDataTableOperations,PlatformLineage,Navbar,MetricSearch,ExploreQuickFilters+ helpersnavbar,entityPanel,lineage,customizeLandingPage.selectSettingOptionhelper (search settings): expanding a panel smooth-scrolls it and react-aria closes a select popover whose trigger scrolls, so the open-and-pick retries until the value sticks.CI full suite: Postgresql PR Playwright E2E Tests, run 38572427900 (manual dispatch on
1b79b4e4791, the merge withmainafter #35190) passed: all 42 jobs green, 3 skipped. It replaces the three failed merge-queue runs from 2026-10-13 (persona customization, Data Product / Glossary persona, Data Contracts, Description visibility, Lineage controls, Data Quality filters), which the later spec commits fixed. The only commit after it,d736686678e, refreshes seven visual-regression baselines and changes no code.Local runs (chromium, local OSS backend on :8585,
--workers=3):Part 1 (commit
f43c19b038e):Local run against this branch's UI (Vite,
PLAYWRIGHT_TEST_BASE_URL=http://localhost:3000) on a local OSS backend, commitf43c19b038e,--workers=3:Flow/Navbar,Features/OnlineUsers,Features/SampleDataTableOperationsPages/Users,Pages/UserDetails,Flow/PersonaFlow(persona / role tests)Features/SSOConfiguration,Pages/SearchSettings,Pages/SearchIndexApplicationLineage/PlatformLineage,Lineage/LineageFilters,Features/TableConstraint,Flow/GlobalSearch,Flow/MetricSearch,Flow/SchemaTableCustomProperties(search-settings tests),ExploreQuickFilters(metric),DomainWidgetFilterNot yet run:
Teams(team name),Bots,CustomizeLandingPage, aDataAssetLineageslice — the local Docker stack went down mid-run.SearchIndexApplication › Run applicationtimed out waiting for the shared backend's reindex job (environmental).Part 2 (this branch's forms):
Users(incl. token generation / expiry),Teams,Roles,Policies,Bots,PersonaFlowTeams › Export teampassed on re-run (CSV export job was slow locally); PersonaFlow filter tests flakyTableConstraint,QueryEntity,DataInsight,TaskFormSettings,CustomThemeConfig,LearningResources,LineageSettingsDataInsightSettings(Data Insight project)CustomPropertiesPart 3:
SearchSettingspasses;QueryEntitytimed out on a too-strict table-search wait, loosened in0952b50f48aand not re-run.Manual testing performed
Local stack, admin user, scripted with Playwright against
main(:3002, antd) and this branch (:3000, core):alice,bob+ Enter → two chips).Found and fixed during verification: the SSO form's capture-phase Enter guard only exempted antd tag selects, so core tag fields could not add values with Enter (
createFormKeyDownHandlernow exempts[role="combobox"]).Parts 2 and 3: scripted Playwright captures of
mainand this branch side by side (light, classic mode) for every form below; the theme-colour swatch regression and the learning-resource drawer closing on option pick were found and fixed this way.Manual test guide
Log in as admin on a local stack with sample data. For every form: required fields show an inline error under the field on Save; a valid submit saves and the change shows up after a reload.
Part 1 — standalone controls
dim⌘K/Ctrl+Kfocuses the search box/table/sample_data.ecommerce_db.shopify.dim_address/lineage/lineage(platform lineage)/users/admin/settings/bots→ open a bot/settings/members/teams→ a team/settings/members/online-users/settings/preferences/search-settings/settings/preferences/search-settings/tables/settings/sso→ LDAPalice,bob+ Enter in a tag fieldalice,bobcreated (Enter does not submit the form)Part 2 — settings and admin forms
/create-user/create-user/bot/settings/access/roles/add-role/settings/access/policies/add-policyisOwner()), Save/settings/access/permission-debugger/settings/members/teams→ Add Team/settings/persona→ Add Persona/settings/customProperties/tables→ Add/settings/preferences/learning-resources→ Add Resource/data-insights/kpi/add-kpi/settings/governance/task-forms/settings/preferences/appearance/settings/preferences/loginConfiguration/settings/preferences/om-url-config/settings/preferences/email/settings/preferences/lineageConfig/settings/preferences/dataAssetRules/users/adminPart 3 — remaining controls
/settings/preferences/appearance/settings/preferences/search-settings/tables→ Term Boost → AddUI screen recording:
Part 1 — standalone controls
Before / after screenshots (left:
mainwith antd, right: this PR). Core components are used as designed, so their default styling differs from the old antd look.Navbar search index

Profile roles

Online users time window

Search settings match type

Platform lineage search

Bot roles + token — a long role chip used to overflow the narrow card; fixed in core (

d85ca71a6d7): Autocomplete, MultiSelect and TreeSelect chips are now capped at the field width and end in an ellipsis, for every usage (screenshot: "Auto Classif…").SSO LDAP role mapping

SSO tag field (

alice,bob+ Enter)Table lineage search (this PR)

Team name edit (this PR)

Part 2 — settings and admin forms (light, classic mode — before =
main, after = this branch)main)Part 3 — remaining controls (light, classic mode — before =
main, after = this branch)main)Checklist:
yarn test:eslint-rulesandgenerate-playwright-rule-table.mjs --checkpass; ESLint suppressions pruned against currentmain(antd 509 → 346, positional locators 578 → 572).