Skip to content

Migrate antd Modal and Button to core components and freeze them with ESLint - #35226

Merged
shah-harshit merged 16 commits into
mainfrom
shah-harshit/antd-modal-to-core
Oct 13, 2026
Merged

shah-harshit merged 16 commits into
mainfrom
shah-harshit/antd-modal-to-core

Conversation

@shah-harshit

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

Copy link
Copy Markdown
Contributor

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 Modal and every antd Button in the OSS UI to @openmetadata/ui-core-components and 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 SimpleModal

  • 34 modals in 32 files plus 3 antd/lib/modal imports → SimpleModal (or ModalOverlay/Modal/Dialog where a close button or extra stacking is needed). Collate has no antd Modal left.
  • Props: open → isOpen, confirmLoading → isOkLoading, okButtonProps.disabled → isOkDisabled, maskClosable → isDismissable; forms submitting via okButtonProps.form → onOk={form.submit}.
  • Antd popups (Select / TreeSelect / DatePicker) inside core modals: ModalOverlay marks everything outside the dialog inert, so the 8 modals that still host them render popups into the top-layer DrawerPopupContainerProvider and are not dismissable on outside click — ADR:2026-10-12-antd-popups-in-core-modals-use-the-top-layer-container.
  • Edge-drawer SQL query / function editors raise their overlay above the z-999 lineage drawer.
  • Dead .ant-modal* LESS removed (global modal.less, add-widget-modal.less, app-run-history.less, add-attribute-modal.less); rc-dialog dropped from the boot bundle list.

Button → core Button

  • 137 files, ~270 buttons: 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 removed per ADR:2026-10-11-migrated-antd-components-adopt-core-styling: padding/border/colour/typography classes, inline styles and their LESS (~30 files). Remaining layout moved to inline tw: classes; dead button class names dropped.
  • Structural fixes: propagation-only buttons → div role="presentation"; buttons wrapping a RangePicker → span / the picker alone; Link > Button / a > Button → Button href (react-aria RouterProvider); date-picker clear → ButtonUtility; GitHub star popup close → core CloseButton; StatusAction approve/reject → core colours/icons; Add Contract actions → Card.Header extra.
  • Text <span>s in touched files → core Typography (85 spans).
  • Accessibility: all 46 icon-only core Buttons the migration introduced carry a translated aria-label.
  • Edit icons unified: every header/description edit/request/comment trigger is EditIconButton newLook size="small", whose defaults are now core Edit01 / MessagePlusSquare / MessageChatSquare; 10 legacy-SVG icon= overrides removed (team, entity and incident headers now match).

Dark mode (AI mode)

  • Test Case Status chart cards, Edit Edge rows and the Table Constraints box use theme tokens instead of light-only LESS/antd colours.

ESLint freeze

  • Modal and Button added to MIGRATED_ANTD_COMPONENTS; eslint-suppressions.json pruned; EXPECTED_SUPPRESSED_ANTD_SYMBOLS 723 → 547.

Core styling differences are accepted as-is; no caller-side overrides of core components.

Type of change:

  • Improvement

High-level design:

Mechanical conversion of antd props to the core APIs (scripted for Button), then hand review of every className, inline style, 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

  • Every migrated modal opens, submits, cancels and closes via the core footer / close button; antd Select / DatePicker popups inside them stay interactive.
  • Every migrated button renders, clicks, shows loading/disabled state; buttons that became links navigate via href.

Unit tests

  • Jest: all suites related to the changed files pass (latest run: 845 suites / 10,998 tests after the main merge; 849 suites / 11,030 tests for the EditIconButton change).
  • yarn test:eslint-rules: 191/191. generate-playwright-rule-table.mjs --check: clean. tsc --noEmit: no new errors in changed files.

Backend integration tests

  • Not applicable.

Ingestion integration tests

  • Not applicable.

Playwright (UI) tests

  • Selectors updated: every .ant-modal* / .ant-btn* reference used by the migrated components → data-testid / role; custom-property editor title → dialog-title; new test ids add-team-modal, remove-team-user-modal, restore-user-modal. Removed test ids audited against Playwright for both migrations.
  • Visual regression teams baseline refreshed for the unified edit icons (CI's own render, stable across attempts).
  • Not run locally (OSS PR; merge queue runs the full suite).

Manual testing performed

  • Scripted headless Chromium against a local backend with sample data, before (main) vs after: 31 modals and 21 pages with migrated buttons; 20 more pages pixel-diffed for the Typography change.
  • AI-mode dark sweep: 30 modals + 21 pages; core modal surface/title/close/footer, core buttons and Typography render correctly. (Legacy classic-page cards and antd fields are out of scope.)
  • ui-checkstyle:changed (src + Playwright): 0 errors.

UI screen recording:

Not applicable: refactor (component swap). Before/after screenshots below.

Modals

Teams (7)

add-team

add-team

team-remove-user

team-remove-user

team-leave

team-leave

team-remove-role

team-remove-role

team-add-role

team-add-role

team-hierarchy-move

team-hierarchy-move

team-subscription

team-subscription
Roles / Policies (3)

role-add-policy

role-add-policy

role-remove-policy

role-remove-policy

policy-remove-role

policy-remove-role
Users (5)

user-list-restore

user-list-restore

profile-restore

profile-restore

profile-edit-name

profile-edit-name

change-password

change-password

sidebar-logout

sidebar-logout
Personas (3)

persona-add

persona-add

persona-default

persona-default

persona-remove-user

persona-remove-user
Settings & Apps (6)

test-email

test-email

audit-export

audit-export

data-asset-rule-add

data-asset-rule-add

app-schedule

app-schedule

app-run-config

app-run-config

app-stop-run

app-stop-run
Data assets & Lineage (7)

lineage-config

lineage-config

lineage-add-pipeline

lineage-add-pipeline

lineage-edge-sql

lineage-edge-sql

table-constraints

table-constraints

profiler-settings-db

profiler-settings-db

custom-metric-edit

custom-metric-edit

sample-data-json

sample-data-json

Buttons

Edit icons before/after (3)

Team header

team

Table header + description

table

Incident header (Owners / Assignee)

incident
Test Case Status dark mode before/after (2)

Tag → Data Observability, dark

tcs-dark

Data Quality, light

tcs-light
Access control & teams (6)

roles-list

roles-list

policies-list

policies-list

team-details

team-details

team-roles-tab

team-roles-tab

user-profile

user-profile

tasks

tasks
Settings (8)

email-config

email-config

appearance

appearance

sso-config

sso-config

search-settings-global

search-settings-global

search-settings-table

search-settings-table

bot-details

bot-details

app-details

app-details

app-runs

app-runs
Data assets & quality (7)

table-queries

table-queries

table-sample-data

table-sample-data

table-profiler-settings

table-profiler-settings

pipeline-executions

pipeline-executions

data-contract-add

data-contract-add

data-insights

data-insights

test-library

test-library

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: not applicable.
  • For a UI feature or feature task: not applicable (refactor).
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Decision check: adds docs/decisions/2026-10-12-antd-popups-in-core-modals-use-the-top-layer-container.md.

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
@shah-harshit shah-harshit added the UI UI specific issues label Oct 12, 2026
@shah-harshit shah-harshit added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Oct 12, 2026
@shah-harshit shah-harshit self-assigned this Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 911 → 912
- 1 added, 0 removed, 0 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/pages/UserListPage/UserListPageV1.tsx

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 getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

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

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 77%
77.32% (124215/160645) 63.52% (77253/121608) 64.96% (25873/39825)

…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
@shah-harshit
shah-harshit removed this pull request from the merge queue due to a manual request Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-10-12T15:08:56Z)

No failing check on merge-queue commit 6236d52 — 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 12, 2026
@shah-harshit
shah-harshit removed this pull request from the merge queue due to a manual request Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-10-12T16:39:36Z)

The entry left the queue before it was built, so no checks ran against it.

… 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
@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 725016020867bb4011cb8a22a4c426f3b3131ccc in Playwright run 38290633172, attempt 1.

✅ 4872 passed · ❌ 0 failed · 🟡 2 flaky · ⏭️ 2 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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:

  • Common shard skew was 34.57% (convergence target: at most 15%).
  • Browser traffic was 230.25 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.16 per UI scenario (11264 boots / 5223 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 66 0 0 0 0 0
✅ Shard advanced-search-02 64 0 0 0 0 0
✅ Shard chromium-01 153 0 0 0 0 0
✅ Shard chromium-02 135 0 0 0 0 0
✅ Shard chromium-03 143 0 0 0 0 0
✅ Shard chromium-04 196 0 0 0 0 0
✅ Shard chromium-05 183 0 0 0 0 0
✅ Shard chromium-06 177 0 0 0 0 0
✅ Shard chromium-07 159 0 0 0 0 0
✅ Shard chromium-08 185 0 0 0 0 0
✅ Shard chromium-09 181 0 0 0 0 0
🟡 Shard chromium-10 167 0 1 0 0 0
✅ Shard chromium-11 186 0 0 0 0 0
✅ Shard chromium-12 154 0 0 0 0 0
✅ Shard chromium-13 196 0 0 0 0 0
✅ Shard chromium-14 159 0 0 0 0 0
✅ Shard chromium-15 189 0 0 0 0 0
✅ Shard chromium-16 188 0 0 0 0 0
✅ Shard chromium-17 162 0 0 0 0 0
✅ Shard chromium-18 177 0 0 0 0 0
✅ Shard chromium-19 164 0 0 0 0 0
✅ Shard chromium-20 192 0 0 1 0 0
✅ Shard chromium-21 170 0 0 0 0 0
✅ Shard chromium-22 135 0 0 1 0 0
✅ Shard chromium-23 211 0 0 0 0 0
✅ Shard chromium-24 174 0 0 0 0 0
✅ Shard chromium-25 160 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard global-state-01 68 0 0 0 0 0
✅ Shard import-export-01 84 0 0 0 0 0
✅ Shard import-export-02 68 0 0 0 0 0
🟡 Shard ingestion-01 45 0 1 0 0 0
✅ Shard ingestion-02 46 0 0 0 0 0
✅ Shard reindex-01 41 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 2 flaky test(s) (passed on retry)
  • Pages/Entity.spec.ts › Announcement create, edit & delete (shard chromium-10, 1 retry)
  • Features/DataQuality/Dimensionality.spec.ts › Dimensionality Tests (shard ingestion-01, 1 retry)

📦 Download artifacts

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.
@shah-harshit
shah-harshit removed this pull request from the merge queue due to a manual request Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-10-12T22:39:47Z)

The entry left the queue before it was built, so no checks ran against it.

@gitar-bot

gitar-bot Bot commented Oct 12, 2026

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

📄 openmetadata-ui/src/main/resources/ui/src/components/MyData/GithubStarCard/GithubStarCard.component.tsx:155-163
This change moves the GitHub star popup's close control to core Button with only iconLeading and no children, so the rendered <button> has no text. It has no aria-label either, so screen readers announce it as an unnamed "button", and the decorative CloseIcon is not marked aria-hidden. The repo's accessibility rule says icon-only buttons always need an i18n aria-label and an aria-hidden icon. Since this line is being rewritten anyway, add both here.

✅ Quality: Icon-only core Buttons in ContractSecurityFormTab have no accessible name

📄 openmetadata-ui/src/main/resources/ui/src/components/DataContract/ContractSecurityFormTab/ContractSecurityFormTab.tsx:164-172 📄 openmetadata-ui/src/main/resources/ui/src/components/DataContract/ContractSecurityFormTab/ContractSecurityFormTab.tsx:303-313
The migrated delete-policy button (line 164) and the remove-row-filter button (line 303) render only an iconLeading with no children and no aria-label. Screen readers announce them as an unnamed "button", which breaks the repo a11y rule that icon-only buttons need an i18n aria-label. The GitHub star close button in this same migration was fixed the same way. jsx-a11y does not check custom components, so CI will not catch this. Add translated aria-labels, or use ButtonUtility with a tooltip.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Options

Display: compact → Counting what did not apply, without listing it.

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 12, 2026
Merged via the queue into main with commit 9b5f77e Oct 13, 2026
72 checks passed
@shah-harshit
shah-harshit deleted the shah-harshit/antd-modal-to-core branch October 13, 2026 02:59
anuj-kumary added a commit that referenced this pull request Oct 13, 2026
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]>
shah-harshit added a commit that referenced this pull request Oct 13, 2026
…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.
shah-harshit added a commit that referenced this pull request Oct 13, 2026
…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.
shah-harshit added a commit that referenced this pull request Oct 13, 2026
…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.
shah-harshit added a commit that referenced this pull request Oct 13, 2026
…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.
shah-harshit added a commit that referenced this pull request Oct 13, 2026
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.
pmbrull pushed a commit to pmbrull/OpenMetadata that referenced this pull request Oct 14, 2026
…#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>
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants