Skip to content

feat(ui): use the Ontology Studio glyph in the sidebar (backport #32324 to 2.0) - #32416

Closed
anuj-kumary wants to merge 2 commits into
2.0from
backport/32324-ontology-studio-icon-2.0
Closed

anuj-kumary wants to merge 2 commits into
2.0from
backport/32324-ontology-studio-icon-2.0

Conversation

@anuj-kumary

Copy link
Copy Markdown
Member

Describe your changes:

Backport of #32324 to 2.0. Cherry-pick of 057f1de, partial — see below.

The Ontology Studio page header renders LayersThree01 in a brand-solid square, but the classic sidebar entry that leads there used ic-lineage.svg. This points it at the shared OntologyStudioIconLayersThree01 restroked to 1.2 via createIconWithStroke, the weight the hand-drawn nav SVGs beside it draw at (raw @untitledui icons ship at stroke 2, ~39% heavier at nav size).

2 of the 3 files applied cleanly. One hunk is intentionally dropped:

File On 2.0
constants/LeftSidebar.constants.ts applied clean — LineageIconOntologyStudioIcon
utils/IconUtils.tsx applied clean — adds exported StrokableIcon type + OntologyStudioIcon
components/governance/govern/govern.module.tsx dropped — file does not exist on this branch

govern.module.tsx is the app-mode governance sub-nav, which landed on main in #31911 (2026-08-29), after 2.0 diverged (2026-07-24). Its half of the original change — the label.ontology-explorerlabel.ontology-studio relabel and the glyph swap — has no target here. Git reported this as a clean modify/delete conflict, not a content conflict.

The shared OntologyStudioIcon is still hoisted into IconUtils rather than inlined in the sidebar, so this file matches main and future picks touching it apply cleanly. Its doc comment still mentions the app-mode surface for that reason.

Verified after the pick: no remaining reference to LineageIcon or ic-lineage.svg anywhere in ui/src on this branch (the only near-match is the unrelated PlatformLineageIcon / ic-platform-lineage.svg), and LayersThree01 + ComponentType are already imported in 2.0's IconUtils.tsx. No new translation keys — the sidebar title is unchanged on this branch.

Type of change:

  • Improvement

Tests:

No test files in the original PR, and none added — the change is an icon reference plus a typed wrapper.

Not built or type-checked locally (this backport was prepared in a bare scratch worktree with no node_modules); CI on this PR covers tsc and lint.

UI screen recording / screenshots:

See #32324 for the screenshot. The classic-sidebar half is what this backport carries; the app-mode half of that screenshot does not apply to 2.0.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.

🤖 Generated with Claude Code

* feat(ui): use the Ontology Studio glyph in both nav surfaces

The Ontology Studio page header renders LayersThree01 in a brand-solid
square, but the two nav entries that lead there used unrelated icons and,
in the app-mode sidebar, the pre-rename "Ontology Explorer" label.

- classic sidebar (LeftSidebar.constants.ts): ic-lineage.svg ->
  LayersThree01, restroked to 1.2 via createIconWithStroke so it matches
  the neighbouring glossary/classification/metric SVGs (raw @untitledui
  icons ship at stroke 2). Follows the existing DataProductIcon/Cube01
  precedent in the same file. The now-unused LineageIcon import is
  dropped; no other sidebar entry referenced ic-lineage.svg.
- govern app module: ask-collate-nav-bar/ontology-{default,active}.svg ->
  LayersThree01, and labelKey label.ontology-explorer ->
  label.ontology-studio, matching the page title. Single glyph, so no
  activeIcon. The item key stays 'ontology-explorer' to keep the
  existing test ids and Playwright selectors working.

label.ontology-studio already exists in en-us.json, so no new keys.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(ui): restroke the Ontology Studio nav glyph in the govern module

Review catch on #32324: the classic sidebar restroked LayersThree01 to
1.2 but the govern module used it raw, so the two nav entries for the
same destination drew at different weights. The gap is visible — NavItem
renders the icon at 20px, so stroke 2 on a 24 viewBox lands at 1.67px
next to sibling SVGs that draw 1.2px on a 20 viewBox, ~39% heavier.

Hoist the wrapped icon into IconUtils as `OntologyStudioIcon` and use it
from both surfaces, so they cannot drift apart again. The cast that
`createIconWithStroke` needs for `@untitledui` icons is now named
(`StrokableIcon`) and exported, since it had been inlined at each call.

The page header keeps the unrestroked glyph: there it is reversed out on
a brand-solid badge, where the heavier stroke is correct.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Backport note (2.0): the govern.module.tsx hunk is dropped — the app-mode
governance sub-nav does not exist on this branch (it landed on main with
#31911, after 2.0 diverged). The shared OntologyStudioIcon is still hoisted
into IconUtils so the file matches main and future picks apply cleanly; its
doc comment mentions the app-mode surface for that reason.

(cherry picked from commit 057f1de)
@anuj-kumary
anuj-kumary requested a review from a team as a code owner September 2, 2026 02:15
@github-actions

github-actions Bot commented Sep 2, 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 added the UI UI specific issues label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 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 Sep 2, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit ba2972e33871b0c4ce417900328572dab9cf0d8b in Playwright run 33583591037, attempt 1.

✅ 555 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 49m 19s

⏱️ Max setup 3m 27s · max shard execution 16m 29s · max shard-job elapsed before upload 20m 31s · reporting 4s

🌐 207.11 requests/attempt · 2.82 app boots/UI scenario · 15.37% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 15.37% (convergence target: at most 15%).
  • Browser traffic was 207.11 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.82 per UI scenario (1626 boots / 576 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 136 0 0 0 0 0
✅ Shard chromium-02 127 0 0 0 0 0
✅ Shard chromium-03 136 0 0 0 0 0
✅ Shard data-asset-rules-01 63 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@anuj-kumary anuj-kumary self-assigned this Sep 2, 2026
@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 labels Sep 2, 2026
@gitar-bot

gitar-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Backport of Ontology Studio icon change to the 2.0 branch, applying 2 of 3 files cleanly from the original PR. The sidebar now uses the shared OntologyStudioIcon (LayersThree01 at stroke 1.2) instead of ic-lineage.svg, matching the page header and aligning with the hand-drawn nav weight. No issues found.

Options

Display: compact → Showing less information.

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

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 67%
67.1% (80535/120006) 51.63% (49400/95675) 52.51% (14726/28043)

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

@anuj-kumary anuj-kumary closed this Sep 2, 2026
@anuj-kumary

Copy link
Copy Markdown
Member Author

This changes is not required in 2.0 for now.

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

3 participants