Skip to content

Fixes #37178: Match Glossary, Classification and Tag headers to the Metrics title - #37179

Merged
anuj-kumary merged 5 commits into
mainfrom
anuj-kumary/glossary-classification-title-like-metric
Nov 5, 2026
Merged

anuj-kumary merged 5 commits into
mainfrom
anuj-kumary/glossary-classification-title-like-metric

Conversation

@anuj-kumary

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

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #37178

Design feedback: the Glossary, Glossary term, Classification and Tag detail headers should use the Metrics header title treatment.

  • EntityPageTitle (components/Entity/EntityPageTitle/EntityPageTitle.tsx) is the Metrics title row extracted from DataAssetsHeader unchanged: leading icon (vertically centred), display name (h2, text-lg bold) over name (text-sm medium, tertiary), or the name alone as the text-lg bold h2; copy-URL button and actions on the title line; badges level with the title line. With only a name, title + copy + badges stay on one line.
  • Metrics / data assets (DataAssetsHeader) now render through it: no visual change (pixel-identical before/after in both themes), ~90 lines removed.
  • Glossary + glossary term (GlossaryHeader), Classification (ClassificationDetails) and Tag (TagPage) switch from EntityHeaderTitle to EntityPageTitle. Glossary's status badge drops its leading divider, like Metrics.
  • Tag page icon: the oversized 36px raw icon becomes the same FeaturedIcon surface badge as the other headers (the custom style.iconURL at 20px, else the core Tag icon). This fixes the large icon/title gap and the alignment.
  • Tag page learning icon (bulb): dropped its m-t-xss top margin, which sat it 2px below the title line in both the classic and AI-mode Tag headers (measured centre: title 83px / bulb 85px → both 83px in AI mode; 139px for title, copy and bulb in classic).
  • Version-view diffs: EntityPageTitle renders the name and display name through renderHighlightedText, as EntityHeaderTitle did, so the getTextDiff markup that Glossary/Classification version views pass shows as diff highlighting instead of raw <span> HTML (raised by the Gitar review). Covered by EntityPageTitle.test.tsx, which fails without the fix.
  • Core components only: EntityPageTitle uses Box for every layout container, Typography for text, ButtonUtility for copy and a core Badge (color="error") for the "Deleted" marker (still data-testid="deleted-badge"), with no native div/span. Classification's mutually-exclusive wrapper is a Box too. Box emits the same flex/align/gap classes, so headers are pixel-identical before/after this refactor except the Deleted badge (new core style) and the Mutually Exclusive badge, which now sits level with the System badge (it was 1px low).
  • Other EntityHeaderTitle users (Domain, Data Product, Roles, Policies, Persona, Alerts, …) are unchanged.
  • Test ids kept: entity-header-title, entity-header-display-name, entity-header-name, entity-header-copy-button, deleted-badge, disabled, and the classification-<name> / <tag>-<tag> containers that Tags.spec uses.

Type of change:

  • Improvement

High-level design:

N/A — one small shared component extracted from the Metrics header and reused by three more headers.

Tests:

Use cases covered

  • Glossary, glossary term, classification and tag headers render like Metrics, with display name + name and with name only, in light and dark themes
  • Metrics / data-asset headers are unchanged

Unit tests

  • GlossaryHeader.test and ClassificationDetails.test no longer mock the title: they assert the real entity-header-display-name / entity-header-name / disabled output. TagPage.test mocks EntityPageTitle (it doesn't test the header). New EntityPageTitle.test.tsx covers diff-markup rendering and the name-only heading. Affected suites: 554 tests pass. After the core-components refactor, Playwright ClassificationConditionalRendering, Tags, MetricHierarchy, GlossaryAdvancedOperations, GlossaryRemoveOperations: 47 passed (GlossaryHeader, Classifications, DataAssetsHeader, Entity, TagPage).

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • The title is now an h2 (as on Metrics), so the three bare page.getByRole('heading') checks for the tag-update confirm dialog in GlossaryAdvancedOperations / GlossaryRemoveOperations now match the dialog heading by name.
  • Ran locally against this branch: ClassificationConditionalRendering, Tags, Tag, MetricHierarchy, GlossaryAdvancedOperations, GlossaryRemoveOperations: 53 passed, 1 failed, 14 did not run. The failure is Tag.spec › Add and Remove Assets timing out on the Explore "Entity Type" filter option table. It fails identically with the main versions of these files (environment: seeded data overflows that facet list), and the 14 are the serial tests after it.

Manual testing performed

  1. Ran the branch UI (Vite) against a local server with sample data.
  2. Captured every affected header before (main) and after, in light and dark themes.

Screenshots

Light theme

Page Before After
Metric (reference — unchanged)
Table (unchanged)
Glossary (display name + name)
Glossary (name only — one line)
Glossary term (display name + name)
Glossary term (name only — one line)
Glossary version view
Classification (name only — one line)
Classification (display name + name)
Classification version view
Tag with custom icon (Certification › Bronze)
Tag (display name + name)
Tag (name only — one line)

Tag page learning icon (AI mode)

Before After

Version view with a display-name change (Classification v0.2)

Before fix After fix

Deleted entity (Metric) — legacy span → core Badge

Before After

Dark theme

Page Before After
Metric (reference — unchanged)
Table (unchanged)
Glossary (display name + name)
Glossary (name only — one line)
Glossary term (display name + name)
Glossary term (name only — one line)
Glossary version view
Classification (name only — one line)
Classification (display name + name)
Classification version view
Tag with custom icon (Certification › Bronze)
Tag (display name + name)
Tag (name only — one line)

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

Extract the Metrics header title row into EntityPageTitle (icon, display
name/name, copy button on the title line, badges level with the title)
and use it in DataAssetsHeader, GlossaryHeader, ClassificationDetails and
TagPage, so font size, weight, copy button and icon alignment match.
The Tag page icon moves to the surface FeaturedIcon. Glossary specs now
target the confirm dialog heading by name, since the title is an h2.
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 5, 2026 15:18
@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!

@github-actions

github-actions Bot commented Nov 5, 2026

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: 1035 → 1035
- 0 added, 0 removed, 1 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/src/components/Classifications/ClassificationDetails/ClassificationDetails.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 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!

Drop the m-t-xss top margin that pushed the bulb 2px below the title
in both the classic and AI-mode Tag headers.
@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 2.1 labels Nov 5, 2026
Glossary and Classification version views pass getTextDiff HTML as the
name and display name. Render them through renderHighlightedText, as
EntityHeaderTitle did, so the diff spans show instead of raw markup.
@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.41% (138504/170115) 68.46% (49912/72900) 71.51% (28050/39223)

Replace the native div/span containers with Box, and the deleted marker
with a core error Badge (keeps data-testid=deleted-badge). Classification's
mutually-exclusive wrapper also uses Box. Layout classes are unchanged.
@gitar-bot

gitar-bot Bot commented Nov 5, 2026

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

🟡 Medium risk · Extracting shared entity titles and changing glossary, classification, and tag headers could cause display or copy-action regressions across these pages.

Refactors the Glossary, Classification and Tag headers to reuse the Metrics title row via a shared EntityPageTitle component, with no visual change to Metrics. Version-view diff markup that previously rendered as literal HTML now shows as proper diff highlighting. No open issues remain.

✅ 1 closed
✅ Bug: Version-view diff markup is shown as literal HTML in the new title

📄 openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityPageTitle/EntityPageTitle.tsx:55-69 📄 openmetadata-ui/src/main/resources/ui/src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:679 📄 openmetadata-ui/src/main/resources/ui/src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:688 📄 openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryHeader/GlossaryHeader.component.tsx:907-909
In version views, the name and displayName passed to the header come from getEntityVersionByField. That function returns a getTextDiff HTML string with <span class="diff-added">/diff-removed wrappers (see ClassificationPureUtils getClassificationInfo, and GlossaryTermsV1.component.tsx:254-275 → GlossaryHeader selectedData). The old EntityHeaderTitle passed these strings through renderHighlightedText, which turns the wrappers into real <span> elements. EntityPageTitle renders {displayName} and {name} as plain text, so Classification and Glossary/Glossary Term version pages now show raw <span data-testid="diff-added" ...> markup in the header. The tooltips show the same markup, and the version diff highlighting is gone. Fix: render the text through renderHighlightedText (from utils/EntitySearchUtils), as the old component did.

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 16:43
@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), 12 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), 12 warning(s) across 3 changed file(s).

Count Rule
12 react-hooks/exhaustive-deps
All findings
Location Rule Message
🟡 src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx:295: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:459: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:535: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:585: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:644: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:724: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:783: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:825: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:844:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'fetchCurrentGlossaryInfo' and 'isVersionView'. Either include them or remove the dependency array.
🟡 src/pages/TagPage/TagPage.tsx:352:9 react-hooks/exhaustive-deps The 'activeTabHandler' function makes the dependencies of useCallback Hook (at line 518) change on every render. To fix this, wrap the definition of 'activeTabH
🟡 src/pages/TagPage/TagPage.tsx:747:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'fetchFeedCount'. Either include it or remove the dependency array.
🟡 src/pages/TagPage/TagPage.tsx:833:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.

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

make ui-checkstyle-changed

@anuj-kumary
anuj-kumary merged commit 1f32985 into main Nov 5, 2026
65 of 67 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/glossary-classification-title-like-metric branch November 5, 2026 17:09
anuj-kumary added a commit that referenced this pull request Nov 9, 2026
…le glossary and ontology specs (#37337)

* Fix governance AUT failures: slow workflow cancel on hard delete and stale glossary/ontology specs

- WorkflowHandler.cancelInstancesForEntities: find running instances with one
  native IN query per chunk. Flowable's or().variableValueEquals() emits one
  correlated EXISTS per id, a full ACT_RU_VARIABLE scan each; with ~10k running
  instances a 100-id chunk took 15-18s, so hard-deleting a 400-concept ontology
  took ~97s and OntologyLargeGraph cleanup timed out.
- LargeGlossaryPerformance: glossary terms page at 15 since #35288; after clearing
  the search, wait for a listed term the search did not match.
- utils/glossary assignTagToGlossaryTerm: name the confirmation heading; #37179
  made the glossary title an h2.
- OntologyConceptDrawer: match "Unsaved changes" case-insensitively (Collate
  overrides the label); preselect the test's own ontology in All ontologies so a
  parallel worker deleting the first one cannot leave the drawer loading a 404.

* Cover the native cancel lookup with two ids and a surviving bystander; tighten comments

* Match SQL probe fragments past optimizer hints

EntityDAO.deleteByIds (#36868) renders DELETE /*+ INDEX(t PRIMARY) */ FROM t, so
SqlFailureProbe and SqlQueryCounter fragments like "delete from chart_entity" stopped
matching. The bulk-path atomicity cases in EntityHardDeletionAtomicityIT injected
nothing and failed. Match against the SQL with block comments removed.
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glossary, Classification and Tag headers: match the Metrics title style

2 participants