Repository navigation
Fixes #35240: Migrate Add Assets selection to core components - #35242
Conversation
Replace antd Alert/Checkbox/List and rc-virtual-list in the asset selection body with ui-core-components, rebuild TableDataCardV2 on the core Card, drop the LESS overrides, and keep EntityHeaderTitle's redirect icon outside the ellipsis so long names cannot hide it.
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…check() The core Checkbox puts data-testid on its react-aria label, so locator.check() rejects it as not a checkbox or radio button.
The banner is a core Alert now, so .ant-alert-info no longer exists: the output-port assertion failed and the input-port absence check passed vacuously.
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
|
| Count | Rule |
|---|---|
| 2 | react-hooks/exhaustive-deps |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx:140:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Explore/EntitySummaryPanel/TagsSummary/TagsSummary.component.tsx:72:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTagAssetsDetails'. Either include it or remove the dependency array. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
🚦 Removed from the merge queue —
|
Resolve the antd suppression ratchet: main dropped 12 suppressed symbols (723 -> 711), this branch dropped 5 (723 -> 718), so the merged baseline is 706. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
🚦 Removed from the merge queue —
|
Both sides migrated a different component off antd, which git resolved as an either/or on adjacent hunks in eslint-suppressions.json. Re-merged the baseline per key instead: main dropped AddDataContract.tsx, this branch dropped AssetSelectionContentBody.tsx, so both entries go. 711 - 5 - 169 leaves the ratchet at 537. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Code Review ✅ Approved🟡 Medium risk · Replacing asset-selection controls and cards could mis-handle selections in domain, data-product, glossary, and tag updates. Migrates the Add Assets selection drawer and modal onto 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 |
|
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.



Describe your changes:
Fixes #35240
The Add Assets selection (drawer on Domain / Data Product / Input-Output ports, modal on Glossary term / Tag / Metric / Ontology concept) still rendered Ant Design pieces plus LESS overrides that fought the design system: cards had no gap, radius or shadow. This moves it fully onto
@openmetadata/ui-core-componentswith no override classes. It also fixes the redirect icon disappearing on long asset names.AssetSelectionContentBodyAlert→ coreAlert(info →brand; validation errors →error, dismissible via a smallValidationErrorAlertthat owns its dismissed state).Banner→ coreAlert(success/error) with a spinning coreLoading01icon while the job runs.Checkbox→ coreCheckbox; "Clear"TypographywithonClick→ coreButton(link-color).List+rc-virtual-list→ plainmap. The virtual list was never given aheight, so it rendered every row anyway (useVirtual = !!(virtual !== false && height && itemHeight)); behaviour is unchanged.d-flex/.asset-filters-wrapperdivs →Box(newdata-testid="asset-filters"). The cards sit in a non-scrolling innerBox:Cardisoverflow-hidden, so as a direct child of the scrolling flex column it would shrink to 0 height.asset-selection-model.style.less.TableDataCardV2Card(variant="elevated",isClickable,isSelectedfor checked rows). A failed save renders ascolor="error"plus aCard.Footervia a newerrorMessageprop, instead of a wrapper div in the drawer.Checkbox→ coreCheckbox(sameasset-checkboxtest id). react-aria stops click propagation, so the checkbox calls the card's handler itself.matches,className,nameClassName,displayNameClassName) and the unusedforwardRef; deletedTableDataCardV2.less.TagsSummary, the only other consumer, now lists the cards in a gappedBoxinstead ofmb-2wrappers and gives themkeys.EntityHeaderTitleTypography, so a long name truncated it away. It is now a sibling in the existing row, using coreLinkExternal01(size={14},tw:text-fg-quaternaryto match the copy icon) instead of the hardcoded-fillexternal-link-grey.svg, so it follows dark mode. The icon only renders whereopenEntityInNewPageis set (today the Add Assets cards); other headers only see the icon move out of theTypography.Type of change:
High-level design:
UI-only refactor, no API, schema or state changes.
useAssetSelectionStateis untouched; the drawer and modal still shareAssetSelectionContentBody.Cardowns border, radius, shadow, hover and selected state. The drawer passes data props only (checked,errorMessage), with noclassName, so there is nothing left to override.tw:overflow-hiddenonSlideoutMenu.Content: keeps the search and filters fixed while the list scrolls, which is what the infinite-scrollonScrolllistens to.tw:p-1on the list: stops the scroll container clipping the cards' shadow.tw:min-w-0 tw:flex-1on the card's title column: lets long names truncate.TableDataCardV2's div and restyle it with Tailwind. That re-implementsCardand drifts from it.asset-selection-modal,asset-checkbox,table-data-card_<fqn>,entity-header-name,clear-filtersandsearchbarare unchanged..asset-filters-wrapperis replaced bydata-testid="asset-filters", andplaywright/utils/glossary.tsis updated. No openmetadata-collate change is needed: Collate only imports types fromAssetSelectionModal.interface.ts(untouched), and its Playwright selectors (table-data-card_*,entity-header-nametext) still match.Tests:
Use cases covered
success(spinner while running) orerrorfrom the export job; nothing renders when there is no job.onScrollfor pagination.Unit tests
AssetSelectionContentBody.test.tsx(core mocks, alert variant/dismiss, card error message, scroll container),TableDataCardV2.test.tsx(checkbox calls the handler once).yarn test src/components/DataAssets src/components/common/TableDataCardV2 src/components/Entity/EntityHeaderTitle src/components/Entity/EntityHeader src/components/Explore/EntitySummaryPanel. 31 suites, 476 tests passed.exhaustive-depsinTagsSummaryandEntityHeaderTitle.tsc --noEmit: no errors in the changed files.eslint-suppressions.json: removed the now-unneededno-antd-importentries forAssetSelectionContentBody.tsxandTableDataCardV2.tsx.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Playwright run - https://github.com/open-metadata/OpenMetadata/actions/runs/38241935792
UI screen recording:
Screen.Recording.2026-10-12.at.2.02.19.PM.mov
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: N/A, no schema changes.
For a UI feature or feature task: N/A, a migration/refactor rather than a feature (see above).
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Decision check: no durable decision; this follows the existing rule that new UI uses
ui-core-components.I have added tests around the new logic.
🤖 Generated with Claude Code