Skip to content

feat(ui): use core-components icons on the domain details page - #35019

Merged
anuj-kumary merged 7 commits into
open-metadata:mainfrom
Vansh0310:feat/domain-page-core-icons
Oct 12, 2026
Merged

anuj-kumary merged 7 commits into
open-metadata:mainfrom
Vansh0310:feat/domain-page-core-icons

Conversation

@Vansh0310

@Vansh0310 Vansh0310 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #

I replaced the local SVG and antd icons on the domain details page with the untitled-ui icons from @openmetadata/ui-core-components/icons, so the page uses only the design system's icon set, as DEVELOPER_HANDBOOK.md and CLAUDE.md require. Every icon chosen was imported from @untitledui/icons before the core migration (#34141), so these are untitled-ui icons hosted in core.

Where Before After
Learning icon next to the title ic-learning.svg Lightbulb01
Follow button ic-star-filled.svg Star01
Manage menu trigger (⋮) menu.svg DotsVertical
Manage menu: Announcements / Rename / Delete announcements-black.svg / edit-new.svg / ic-delete.svg Announcement02 / Edit01 / Trash01
Version button ic-version.svg (via antd Icon) Version
Widget edit / add buttons action-icons/edit.svg / action-icons/plus.svg Edit01 / Plus
Widget collapse toggle ic-card-expand-collapse.svg ChevronUp
Description edit button edit-new.svg Edit01

ic-learning.svg, ic-star-filled.svg and action-icons/plus.svg are deleted because nothing references them any more.

Type of change:

  • Improvement

High-level design:

  • Approach: swap the icon at the shared component that renders it (LearningIcon, EntityHeaderTitle, ManageMenu, WidgetActionButton, WidgetCard, Description) rather than overriding per page. The domain page and every other entity page using these components get the same icons.
  • No new props, wrappers or components. Existing size / className props keep the previous footprints. The Version button keeps its antd Button and passes <Version className="anticon" size={14} />. The antd <Icon component> wrapper is avoided because it forces fill="currentColor", which breaks stroke icons. The className="anticon" pattern already exists in TableConstraintsModal.component.tsx.
  • Kept as is:
    • Edit Tier popover ✕ / ✓: the swap was reverted, so the antd icons stay.
    • Manage menu → Style, tabs expand button, certification header icon: core has no matching icon yet.
  • Known follow-up: about 56 other edit buttons (TagsSection, TierSection, EditIconButton, DisplayName and others) still use edit-new.svg. Where one sits next to the description, the two pencils differ until they move to Edit01 in a follow-up PR.
  • Rollout: visual change only, no API or schema changes.

Tests:

Use cases covered

  • Domain details page renders the core icons for learning, follow, manage menu, version, description edit/comment, widget add/edit/collapse.
  • Manage menu items (Announcements, Rename, Delete) show their core icons.
  • Version button keeps its size (78×40) and the 8px icon-text gap.

Unit tests

  • Updated Description.test.tsx: the edit button now asserts iconLeading is Edit01.
  • Ran 55 suites / 688 tests, all passing (Domain, EntityHeader/EntityHeaderTitle, Learning, EntityPageInfos, TierCard/TierWidget, WidgetActionButton, WidgetCard, EntityDescription, DescriptionSection, CertificationWidget, DataAssets, TagsContainerV2, GlossaryHeader).
  • Line coverage on changed files: WidgetActionButton 100%, WidgetCard 100%, Description 100%, ManageMenu 91%, LearningIcon 88%, EntityHeaderTitle 80%, DomainDetails 63% (DomainDetails coverage is pre-existing. This PR only changes import lines and icon props there.)

Backend integration tests

  • Not applicable (no backend changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • No new specs (icon-only change, data-testids unchanged).
  • Not run locally. make playwright_affected selects 78 specs, and the impact map has gaps for 6 changed files, so CI would run the full suite in the merge queue.

Manual testing performed

  1. Ran the UI dev server from this branch against a local OpenMetadata backend and logged in as admin.
  2. Opened Data Marketplace → Domains → a domain.
  3. Checked in the DOM that each icon renders the core icon's SVG path: learning, copy, follow, up/down vote, description edit and comment, info, 6× plus, widget edits, manage trigger and menu items, version.
  4. Measured the Version button: 78×40 with an 8px icon-text gap, same as before. Its fill is none.
  5. Opened the manage menu and checked the Announcements, Rename and Delete icons.
  6. Ran CI's checkstyle (yarn ui-checkstyle:changed on the changed files): no diff, 0 ESLint errors. tsc --noEmit reports no errors in the changed files.

UI screen recording / screenshots:

TODO: attach before/after screenshots of the domain details page header, widgets and manage menu.

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.
  • Decision check:

Vansh0310 and others added 4 commits October 9, 2026 15:33
Replace the local SVG and antd icons on the domain details page with
untitled-ui icons from @openmetadata/ui-core-components/icons:

- Learning icon: Lightbulb01
- Follow button: Star01
- Manage menu trigger: DotsVertical
- Manage menu items: Announcement02, Edit01, Trash01
- Version button: Version
- Widget edit / add buttons: Edit01 / Plus
- Widget collapse toggle: ChevronUp
- Description edit button: Edit01
- Tier popover close / save: XClose / Check

Remove ic-learning.svg, ic-star-filled.svg and action-icons/plus.svg,
which nothing references any more.
Put CloseOutlined / CheckOutlined back on the TierCard footer buttons,
reverting the XClose / Check swap from the previous commit.
The comment claimed every edit button on an entity page now matches.
Only WidgetEditButton shares Edit01 with the description edit button;
the other edit buttons still use edit-new.svg until they move too.
@github-actions

github-actions Bot commented Oct 9, 2026

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 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

The Version button passes the core Version icon straight into the antd
Button icon slot with className="anticon". The reason lived only in the
PR description, which the squash-merge drops. Record it and cite the
record at the call site.
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Remove the decision record and its ADR citation. The why-comment on the
Version button keeps the reason next to the code.
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 76%
76.68% (122235/159395) 62.77% (75803/120756) 64.24% (25423/39571)

…-icons

# Conflicts:
#	openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetails/DomainDetails.component.tsx
@github-actions github-actions Bot removed the safe to test Add this label to run secure Github workflows on PRs label Oct 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Oct 11, 2026

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

🟢 Low risk · Replacing SVGs with core icons changes only the appearance of shared entity-page controls; the diff shows no changes to behavior, APIs, or data handling.

Swaps local SVG and antd icons on the domain details page for untitled-ui icons from @openmetadata/ui-core-components/icons, including the learning, follow, manage menu, version, and widget edit/add/collapse icons. The Version button keeps its size and spacing. No issues found.

✅ 1 closed
✅ Quality: Rule against antd Icon wrapper for core icons lives only in PR body

📄 openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetails/DomainDetails.component.tsx:1101
The description gives a rule that is not written down anywhere in the tree: "The antd <Icon component> wrapper is avoided because it forces fill="currentColor", which breaks stroke icons". The fix is to pass the core icon straight in with className="anticon". The changed line (icon={<Version className="anticon" size={14} />}) has no comment and no ADR: citation, and nothing in docs/decisions/ or the frontend rules covers this. The repo squash-merges, so the PR description will not survive in git log. Someone migrating the next antd Button icon could easily wrap a stroke icon in <Icon component={...}> again and get filled, broken glyphs. Add a record in docs/decisions/ (or a short why-comment at this line that cites it) stating: "Core-components (untitled-ui) stroke icons inside antd Button/icon slots are passed directly with className="anticon" and an explicit size, never wrapped in @ant-design/icons <Icon component>, because that wrapper forces fill=currentColor."

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

@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Oct 11, 2026
@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), 14 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), 14 warning(s) across 4 changed file(s).

Count Rule
13 react-hooks/exhaustive-deps
1 openmetadata-ui-patterns/no-non-adaptive-palette
All findings
Location Rule Message
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:357:6 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'domain.fullyQualifiedName' and 't'. Either include them or remove the dependency array.
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:359:9 react-hooks/exhaustive-deps The 'handleTabChange' function makes the dependencies of useCallback Hook (at line 468) change on every render. To fix this, wrap the definition of 'handleTabCh
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:359:9 react-hooks/exhaustive-deps The 'handleTabChange' function makes the dependencies of useCallback Hook (at line 637) change on every render. To fix this, wrap the definition of 'handleTabCh
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:747:5 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'closeSubDomainDrawer' and 't'. Either include them or remove the dependency array.
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:946:6 react-hooks/exhaustive-deps React Hook useMemo has missing dependencies: 'activeTab', 'addSubDomain', 'getEntityFeedCount', 'isVersionsView', 'onAddDataProduct', 'onDeleteSubDomain', and '
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:976:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchActiveAnnouncement', 'fetchActivityCount', 'fetchDataProducts', 'fetchDomainAssets', and 'fetchTaskCounts'.
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:989:6 react-hooks/exhaustive-deps React Hook useMemo has an unnecessary dependency: 'isSubDomain'. Either exclude it or remove the dependency array.
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:997:5 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'tabs'. Either include it or remove the dependency array.
🟡 src/components/Domain/DomainDetails/DomainDetails.component.tsx:997:6 react-hooks/exhaustive-deps React Hook useMemo has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked.
🟡 src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx:137:5 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Learning/LearningIcon/LearningIcon.component.tsx:74:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchResourceCount'. Either include it or remove the dependency array.
🟡 src/components/Learning/LearningIcon/LearningIcon.component.tsx:126:13 openmetadata-ui-patterns/no-non-adaptive-palette Raw palette class "tw:*:data-icon:text-brand-600" is static — it does not flip in dark mode. Use the theme-adapting "utility-" variant (tw:text-utility-brand-60
🟡 src/components/common/EntityDescription/Description.tsx:112:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array.
🟡 src/components/common/EntityDescription/Description.tsx:116:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@sonarqubecloud

Copy link
Copy Markdown

@anuj-kumary
anuj-kumary enabled auto-merge October 12, 2026 04:50
@anuj-kumary
anuj-kumary added this pull request to the merge queue Oct 12, 2026
Merged via the queue into open-metadata:main with commit d4150e2 Oct 12, 2026
106 of 113 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants