Skip to content

Move ClassificationTag/GlossaryTag/DomainTag/DataProductTag/AutoClassificationTag and Icon into openmetadata-ui-core-components - #33366

Open
Rohit0301 wants to merge 7 commits into
mainfrom
move-tags-to-core-ui
Open

Rohit0301 wants to merge 7 commits into
mainfrom
move-tags-to-core-ui

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

Screenshot 2026-09-16 at 11 05 18 AM

Fixes #

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

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: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • UI Component Migration:
    • Moved ClassificationTag, GlossaryTag, DomainTag, DataProductTag, AutoClassificationTag, and Icon into openmetadata-ui-core-components
    • Updated imports across UI components to reference components from @openmetadata/ui-core-components

This will update automatically on new commits.

Greptile Summary

This PR relocates the five entity-tag variants and the configurable Icon implementation into @openmetadata/ui-core-components, migrates application imports, adds a dedicated Icon package subpath, and moves tag styling and tests into the shared library.

  • Consolidates classification, glossary, domain, data-product, and generated-tag presentation in the shared design system.
  • Preserves configurable icon lookup, image loading, and fallback behavior through the new icon subpath.
  • Updates Badge primitives to support tooltips and forwarded span attributes.
  • The migration currently increases eager bootstrap bytes and drops targeted Glossary Playwright selection.
Confidence Score: 4/5

The PR appears safe to merge functionally, but the non-blocking eager-bundle regression and lost targeted Glossary test coverage should be addressed.

The component, icon, routing, styling, and package-export contracts remain compatible; the remaining findings concern additional initial-download cost and a concrete reduction in targeted Playwright coverage.

Files Needing Attention: openmetadata-ui/src/main/resources/ui/scripts/check-bundle-chunks.mjs; .github/playwright/impact-map.generated.json

Important Files Changed
Filename Overview
openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/tag-chip-content.tsx Centralizes tag icon, truncation, and React Aria link rendering while lazily loading configurable icons.
openmetadata-ui-core-components/src/main/resources/ui/src/components/base/badges/badges.tsx Adds tooltip support and HTML span-attribute forwarding needed by the migrated tag components.
openmetadata-ui-core-components/src/main/resources/ui/src/components/foundations/icon/icon.tsx Relocates the existing named-icon and image-loading implementation without changing its fallback contract.
openmetadata-ui-core-components/src/main/resources/ui/package.json Publishes the new dedicated Icon subpath with paths aligned to the library build configuration.
openmetadata-ui/src/main/resources/ui/scripts/check-bundle-chunks.mjs Raises the eager bootstrap allowance to accommodate payload growth introduced by the component migration.
.github/playwright/impact-map.generated.json Removes the dedicated GlossaryTag-to-Glossary-spec edge without replacing it for the relocated source.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
    App[OpenMetadata UI callers] --> Root[Core components root barrel]
    Root --> Tags[Shared entity-tag variants]
    Tags --> Badge[Badge and BadgeWithButton]
    Tags --> LazyIcon[Lazy configurable Icon]
    LazyIcon --> IconEntry[Dedicated icon subpath]
    Root --> Vendor[vendor-untitled bootstrap chunk]
    CoreCSS[Core globals.css] --> Tags
Loading

Reviews (1): Last reviewed commit: "Merge branch 'main' into move-tags-to-co..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Context used:

…ificationTag and Icon into openmetadata-ui-core-components
@Rohit0301 Rohit0301 self-assigned this Sep 15, 2026
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Sep 15, 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: 775 → 774
- 0 added, 1 removed, 0 changed spec-list

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/common/atoms/Tag/GlossaryTag.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

@gitar-bot

gitar-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 3 closed / 3 findings

Refactor moving ClassificationTag, GlossaryTag, DomainTag, DataProductTag, AutoClassificationTag, and Icon components into openmetadata-ui-core-components. Resolved icon styling inconsistencies in AutoClassificationTag, removed dead AUTO_CLASSIFICATION_TAG_COLOR constant and stale comment, and fixed tag-chip-content to not emit literal 'undefined' class when labelClassName is omitted.

✅ 3 closed
Bug: AutoClassificationTag no longer sets --tag-color for close icon

📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.tsx:47-49 📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.tsx:80-93
The delete-button branch still applies the tag-tinted__close-icon class, whose CSS tints the close button via color-mix(in srgb, var(--tag-color) 60%, transparent) (styles/globals.css). But the tagColorStyle that set --tag-color is now commented out and no style is passed to BadgeWithButton, so --tag-color is undefined and the color-mix silently fails, dropping the intended brand tint on the delete icon (the original component set style={tagColorStyle}). Either restore a style={{ '--tag-color': AUTO_CLASSIFICATION_TAG_COLOR }} on the badge, or remove the now-inert tag-tinted__close-icon class and dead commented block.

Quality: AUTO_CLASSIFICATION_TAG_COLOR is now dead + comment is stale

📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/tag.constants.ts:41-45 📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.tsx:47-49
The exported AUTO_CLASSIFICATION_TAG_COLOR is only referenced from a commented-out line in auto-classification-tag.tsx, so it is effectively dead code. Its value was also changed from --tw-color-brand-900 to --tw-color-brand-700 while the doc comment above it still says it "references the brand-900 design token", so the comment now contradicts the value. Remove the unused constant or wire it back up, and fix the comment.

Quality: tag-chip-content emits literal 'undefined' class when labelClassName omitted

📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/tag-chip-content.tsx:63-69
In TagChipContent the label span uses a template literal `tw:block tw:truncate ${labelClassName}`. When labelClassName is not provided (e.g. AutoClassificationTag calls TagChipContent without it), the rendered class string becomes tw:block tw:truncate undefined, adding a spurious undefined class token. Harmless but sloppy; use cx('tw:block tw:truncate', labelClassName) to avoid it.

Review coverage

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

// `vendor-untitled` chunk regardless of code-splitting, so the moved code
// still counts against this app's eager bootstrap bytes even though nothing
// new is rendered. ~5 KiB of headroom above the post-move measurement.
const MAX_HTML_BOOTSTRAP_JS_BROTLI_BYTES = 975 * 1024;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Bootstrap Budget Regression

Raising the bootstrap limit from 970 KiB to 975 KiB admits an eager-payload increase caused by this migration instead of preserving the existing performance ratchet. The migrated tags are exported through the core package’s root barrel, and the app groups that package into the bootstrap vendor-untitled chunk. As a result, code that renders nothing new adds roughly 5 KiB to the initial download. Please keep the migration payload-neutral or isolate these exports rather than increasing the threshold.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@@ -9127,14 +9127,6 @@
"playwright/e2e/Pages/DataContracts.spec.ts"
]
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Glossary Coverage Removed

Removing the dedicated GlossaryTag.tsx to Glossary.spec.ts edge leaves the relocated component covered only by the broad core-components mapping, whose three selected specs do not include the glossary flow. Because that broad entry marks the file as mapped, the full-suite fallback for unmapped code does not apply. A glossary-tag rendering or navigation regression can therefore pass targeted PR checks and surface later. Please preserve the Glossary spec mapping for the relocated source.

Knowledge Base Used:

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 118 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 118 warning(s) across 25 changed file(s).

Count Rule
54 react-hooks/exhaustive-deps
42 openmetadata-imports/no-circular-imports
7 no-restricted-imports
6 openmetadata-imports/no-internal-barrel-imports
4 openmetadata-ui-patterns/no-raw-title-attribute
3 openmetadata-imports/no-lower-layer-page-imports
2 openmetadata-imports/review-sequential-api-calls
All findings
Location Rule Message
🟡 src/components/Certification/Certification.component.tsx:136:9 react-hooks/exhaustive-deps The 'handleScroll' function makes the dependencies of useMemo Hook (at line 242) change on every render. Move it inside the useMemo callback. Alternatively, wra
🟡 src/components/Certification/Certification.component.tsx:278:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'currentCertificate' and 'getCertificationData'. Either include them or remove the dependency array. If 'setSelec
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:42:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:43:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:44:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:81:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:85:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:89:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:98:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:99:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:103:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:104:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:105:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:106:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:110:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:116:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:117:1 openmetadata-imports/no-internal-barrel-imports Import the internal module directly instead of its index barrel so unrelated siblings do not enter the bundle graph.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:118:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:119:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:258:5 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'hasFollowers'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:382:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'entityType', 'fetchActiveAnnouncement', 'fetchContainerAncestors', and 'fetchDQFailureCount'. Either include the
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:560:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'dataAsset'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:696:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'dataAsset.fullyQualifiedName'. Either include it or remove the dependency array.
🟡 src/components/DataAssets/DataAssetsHeader/DataAssetsHeader.component.tsx:772:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchDataContract'. Either include it or remove the dependency array.
🟡 src/components/Domain/AddDomainForm/AddDomainForm.component.tsx:90:1 openmetadata-imports/no-internal-barrel-imports Import the internal module directly instead of its index barrel so unrelated siblings do not enter the bundle graph.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:44:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:48:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:51:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:53:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:54:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:56:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:58:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:59:1 openmetadata-imports/no-circular-imports This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency.
🟡 src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx:839:8 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'renderOwnerContent', 't', and 'toOwnersWithHref'. Either include them or remove the dependency array.
🟡 src/components/Glossary/GlossaryHeader/GlossaryHeader.component.tsx:631:6 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'isGlossary', 'onAddGlossaryTerm', and 'selectedData'. Either include them or remove the dependency array. If '
🟡 src/components/Glossary/GlossaryHeader/GlossaryHeader.component.tsx:711:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'showModal'. Either include it or remove the dependency array.
🟡 src/components/Glossary/GlossaryHeader/GlossaryHeader.component.tsx:773:6 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'handleAddGlossaryTermClick' and 't'. Either include them or remove the dependency array.
🟡 src/components/Glossary/GlossaryHeader/GlossaryHeader.component.tsx:815:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'handleBreadcrumb'. Either include it or remove the dependency array.
🟡 src/components/Glossary/GlossaryHeader/GlossaryHeader.component.tsx:821:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchCurrentGlossaryInfo' and 'isVersionView'. Either include them or remove the dependency array.
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:116:1 openmetadata-imports/no-internal-barrel-imports Import the internal module directly instead of its index barrel so unrelated siblings do not enter the bundle graph.
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:515:34 react-hooks/exhaustive-deps React Hook useCallback received a function whose dependencies are unknown. Pass an inline function instead.
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:519:9 react-hooks/exhaustive-deps The 'fetchChildTerms' function makes the dependencies of useCallback Hook (at line 1022) change on every render. To fix this, wrap the definition of 'fetchChild
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:603:22 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/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:618:9 react-hooks/exhaustive-deps The 'fetchAllTerms' function makes the dependencies of useCallback Hook (at line 1339) change on every render. To fix this, wrap the definition of 'fetchAllTerm
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:686:9 react-hooks/exhaustive-deps The 'fetchExpadedTree' function makes the dependencies of useCallback Hook (at line 1339) change on every render. To fix this, wrap the definition of 'fetchExpa
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:820:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchAllTerms', 'handlePagingChange', and 'setGlossaryChildTerms'. Either include them or remove the dependency
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:832:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'setGlossaryChildTerms'. Either include it or remove the dependency array.
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:994:5 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'applyGlossaryTermApprovalOutcome', 'notifyPendingApprovalTasks', and 't'. Either include them or remove the de
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:1258:6 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'currentUser', 'onAddGlossaryTerm', 'onEditGlossaryTerm', 'renderOwnerContent', 't', and 'toOwnersWithHref'. Either
🟡 src/components/Glossary/GlossaryTermTab/GlossaryTermTab.component.tsx:1398:5 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'handleCheckboxChange' and 't'. Either include them or remove the dependency array.

… and 68 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

@sonarqubecloud

Copy link
Copy Markdown

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants