Skip to content

Fixes #37122: Match Glossary and Classification header icons to the Metrics header - #37123

Merged
anuj-kumary merged 4 commits into
mainfrom
anuj-kumary/icon-styling-consistency
Nov 5, 2026
Merged

anuj-kumary merged 4 commits into
mainfrom
anuj-kumary/icon-styling-consistency

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #37122

Entity detail headers drew their leading icon differently: Glossary, Glossary Term and Classification used a bare 36px glyph whose size and vertical alignment shifted with/without a subtitle, while Metrics (and the test case / test suite / incident pages) hand-rolled a 36px bordered badge with the same five Tailwind classes copied in each file.

  • Core: added a surface theme to FeaturedIcon (openmetadata-ui-core-components) — the Metrics badge: neutral bg-surface circle, border-secondary border, shadow-xs-skeumorphic, md = 36px with a 20px icon, brand = utility-brand-700 (same colour as the old utility-blue-700 in both themes). Storybook: Foundations/FeaturedIcon → Surface, plus the Themes row.
  • Callers: Metrics (DataAssetsHeader), Glossary + Glossary Term (GlossaryHeader, incl. a custom style.iconURL term icon), Classification (ClassificationDetails), test case / incident (IncidentManagerDetailPage, TestCaseDetail) and test suite (TestSuiteDetailsPage, TestSuiteDetail) now render <FeaturedIcon color="brand" size="md" theme="surface" /> — no wrapper divs/spans or caller-side classes left.
  • Test case / test suite headers now use the core TestCase / TestSuite icons (@openmetadata/ui-core-components/icons) instead of the raw ic-checklist.svg / icon-test-suite.svg assets, which also drops the tw:dark:[&>rect]:fill-transparent override the old SVG's baked-in white rect needed. They render in the Metrics blue like every other entity header.
  • The glossary term custom icon drops a redundant imageClassName (core Icon already applies object-fit: contain). The service-logo <img> in DataAssetsHeader is kept as is (only tw:size-5), since swapping it to core Icon would add a load skeleton and rewrite relative logo URLs for every data asset.

Computed styles verified identical on all pages: 36×36, radius 9999px, border rgb(233,234,235), bg white, icon rgb(23,92,211) at 20×20.

Not changed: the existing modern / dark FeaturedIcon themes reference shadow-xs-skeuomorphic, a misspelled token that doesn't exist (the real one is shadow-xs-skeumorphic). Fixing it would add a shadow to ~10 unrelated screens, so it is left for a separate PR.

Type of change:

  • Improvement

High-level design:

N/A — small change; one new core variant, callers switched to it.

Tests:

Use cases covered

  • Metrics, Glossary, Glossary Term, Classification (name only, and display name + name), test case and test suite headers all render the same 36px brand icon badge, in light and dark themes

Unit tests

  • Existing suites for all touched components pass: 18 suites, 329 tests (re-run after the icon swap: 14 suites, 241 tests) (GlossaryHeader, ClassificationDetails, DataAssetsHeader, TestCaseDetail, TestSuiteDetail, IncidentManagerDetailPage, TestSuiteDetailsPage). TestSuiteDetail.test.tsx mock now passes the real FeaturedIcon through.
  • Core components: ref-forwarding.test.tsx passes; yarn tw-audit 0 errors.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • No new specs (styling change). Ran the affected specs locally against this branch — 23 passed: ClassificationConditionalRendering, Tags, TestSuiteDetailsPage, MetricHierarchy, GlossaryAdvancedOperations (style/icon tests).

Manual testing performed

  1. Ran the branch UI (Vite) against a local server with sample data.
  2. Opened each page above in light and dark themes, compared headers before/after, and compared computed badge styles against Metrics.

Screenshots — every changed place

Data-asset headers (table, dashboard) and Metrics share DataAssetsHeader; they are pixel-identical before/after in both themes (canvas diff: no changed pixels).

Light theme

Page Before After
Table (service logo — DataAssetsHeader, unchanged)
Dashboard (service logo — DataAssetsHeader, unchanged)
Metric (reference — unchanged)
Glossary
Glossary version view
Glossary term (default icon)
Glossary term (custom picker icon)
Classification (title only)
Classification (title + subtitle)
Classification version view
Test case / incident (IncidentManagerDetailPage)
Test suite (TestSuiteDetailsPage)
AI mode: Observability test suite (TestSuiteDetail)
AI mode: Observability test case version (TestCaseDetail)

Dark theme

Page Before After
Table (service logo — DataAssetsHeader, unchanged)
Dashboard (service logo — DataAssetsHeader, unchanged)
Metric (reference — unchanged)
Glossary
Glossary version view
Glossary term (default icon)
Glossary term (custom picker icon)
Classification (title only)
Classification (title + subtitle)
Classification version view
Test case / incident (IncidentManagerDetailPage)
Test suite (TestSuiteDetailsPage)
AI mode: Observability test suite (TestSuiteDetail)
AI mode: Observability test case version (TestCaseDetail)

UI screen recording:

Not applicable — styling change; before/after screenshots above.

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 a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable).
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
  • Decision check: if this PR decides something the next contributor could undo, it adds a record under docs/decisions/.

🤖 Generated with Claude Code

…etrics header

Extract the Metrics header icon badge into EntityHeaderIcon and use it in
the Glossary, Glossary Term and Classification headers so the icon keeps
the same size and alignment with or without a subtitle.
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 5, 2026 08:52
@anuj-kumary
anuj-kumary requested a review from sweta1308 November 5, 2026 08:53
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

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

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 Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 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 safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check 2.1 labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
81.38% (138412/170070) 68.43% (49875/72884) 71.47% (28026/39213)

Add a 'surface' theme to FeaturedIcon (36px bordered circle at md) that
matches the Metrics header badge, and use it in the Metrics, Glossary,
Classification, test case and test suite headers instead of hand-rolled
classes. Removes EntityHeaderIcon.
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 20 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), 20 warning(s) across 5 changed file(s).

Count Rule
11 react-hooks/exhaustive-deps
8 openmetadata-imports/no-lower-layer-page-imports
1 openmetadata-imports/no-cross-page-imports
All findings
Location Rule Message
🟡 src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:294:8 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'isVersionView' and 'navigate'. Either include them or remove the dependency array.
🟡 src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:458:8 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:534:7 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:584:8 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchClassificationChildren', 'handlePageChange', and 'isAddingTag'. Either include them or remove the dependenc
🟡 src/components/Glossary/GlossaryHeader/GlossaryHeader.component.tsx:649: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:729: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:788: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:830: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:849:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchCurrentGlossaryInfo' and 'isVersionView'. Either include them or remove the dependency array.
🟡 src/components/observability/TestCaseDetail/TestCaseDetail.tsx:35:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/TestCaseDetail/TestCaseDetail.tsx:36:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/TestCaseDetail/TestCaseDetail.tsx:37:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/TestCaseDetail/TestCaseDetail.tsx:42:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/TestCaseDetail/TestCaseDetail.tsx:43:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/TestSuiteDetail/TestSuiteDetail.tsx:39:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/TestSuiteDetail/TestSuiteDetail.tsx:40:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/TestSuiteDetail/TestSuiteDetail.tsx:41:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/TestSuiteDetail/TestSuiteDetail.tsx:345:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'handlePipelinesChange'. Either include it or remove the dependency array.
🟡 src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx:58:1 openmetadata-imports/no-cross-page-imports Page features must not import another page feature. Move shared code to components, hooks, interfaces, or pure utilities.
🟡 src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx:381:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'handlePipelinesChange'. Either include it or remove the dependency array.

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

make ui-checkstyle-changed

Drop the raw ic-checklist/icon-test-suite SVGs and the dark-mode rect
override; FeaturedIcon sizes and colours the core icons itself.
@gitar-bot

gitar-bot Bot commented Nov 5, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Shared icon styling changes several entity headers; a faulty theme could misalign or obscure identifying icons across glossary, classification, metrics, and test pages.

Standardizes entity header icons on a new surface theme of FeaturedIcon, so Glossary, Glossary Term, Classification, test case, incident, and test suite headers match the Metrics badge. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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 enabled auto-merge (squash) November 5, 2026 09:41
@anuj-kumary
anuj-kumary merged commit e1a25fb into main Nov 5, 2026
65 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/icon-styling-consistency branch November 5, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.1 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.

Glossary and Classification header icons are inconsistent with the Metrics header

2 participants