Skip to content

fix(ui): keep the classic sidebar's selected icon visible after it is focused - #36322

Merged
shah-harshit merged 1 commit into
mainfrom
shah-harshit/logo-icon-issue-check
Oct 27, 2026
Merged

shah-harshit merged 1 commit into
mainfrom
shah-harshit/logo-icon-issue-check

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

In classic mode, with the sidebar collapsed, the icon of the selected item disappears after you click it and move the pointer away. The item shows as an empty blue square (seen on devrel, which is Collate, but the cause is in OSS).

RCA

Fix: drop color from the global a:focus rule. Links keep the colour they already have, and focus is still shown by the underline and the focus ring. Other components already had to fight this rule (see the comments in AnnouncementCard.tsx and DataQualityIndicator.tsx).

Screen.Recording.2026-10-27.at.5.47.48.PM.mov

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Classic mode, sidebar collapsed: click the selected item (e.g. Lineage), move the pointer away, and the white icon stays visible on the blue item.
  • Focused links elsewhere keep their own colour instead of switching to the primary blue.

Unit tests

Not applicable. The bug comes from the order of CSS layers, and jsdom doesn't apply that, so a Jest test can't reproduce it.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

Not run locally (OSS PR); the merge queue runs the full suite.

Manual testing performed

  1. On devrel (classic mode, sidebar collapsed), opened /lineage, clicked the selected Lineage item and moved the pointer away. The icon disappeared. The focused link computed color was the brand-solid blue, matched only by the a:focus rule.
  2. Checked that no other rule sets a colour on a:focus once this one is removed (git grep "a:focus").
  3. Ran this branch for OSS (:3002) and Collate (:3003) in classic mode and in AI light/dark mode. Before/after screenshots and computed colours are below.
  4. prettier --check passes on app.less. yarn token-audit reports no new errors (the 11 in app.less already exist).

UI screen recording:

Not applicable — this is a style fix, not a feature. Before/after screenshots are below.

How these were captured: I ran this branch locally against the local Collate backend: the OSS UI dev server (:3002) and the Collate UI dev server (:3003). The Collate UI used this branch's OSS code via make copy_om_ui_mirror. I drove both with headless Chrome through Playwright.

  • After is this branch.
  • Before is the same page with the removed rule (a:focus { color: var(--ant-primary-color) }) injected again unlayered, which gives exactly main's styling.
  • In every image, left is before and right is after. Each item was clicked (or focused, for content links), and then the pointer was moved away.

OSS, classic mode. Rows: collapsed rail Lineage, expanded sidebar Lineage, a content link on Explore.
OSS classic

OSS, AI mode. Rows: light expanded nav, light rail, dark expanded nav, dark rail.
OSS AI

Collate, classic mode. Same rows as OSS classic.
Collate classic

Collate, AI mode. Rows: light expanded nav, light rail, light content link, then the same three in dark.
Collate AI

Computed colours of the focused element (the same in OSS and Collate):

Case Before (main) After (this PR)
Classic collapsed rail, selected icon rgb(21,112,239) on rgb(21,112,239) (icon invisible) rgb(255,255,255) on rgb(21,112,239)
Classic expanded sidebar, selected item white icon and label unchanged
AI expanded nav and rail (light and dark) label and icon colours from .ask-* unchanged
Content link, light rgb(21,112,239) rgb(23,92,211), the same colour the link has when not focused
Content link, AI dark rgb(21,112,239) (dark blue on a dark surface) rgb(83,177,253), the dark-mode link token

No regressions: the only change outside the broken rail item is that a focused link keeps the colour it has when not focused.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • Self-review: I reviewed the final diff against REVIEW.md and found no 🔴 findings.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The change appears safe to merge, with no actionable issues found.

Summary

Removes the global focused-link color override from app.less so links can keep their own colors.

  • Focused links keep their own colors, so selected sidebar icons stay visible.

Reviews (1) · Last reviewed commit: "fix(ui): keep focused links' own colour ..." · Reviewed by Greptile

@shah-harshit
shah-harshit requested a review from a team as a code owner October 27, 2026 08:04
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Oct 27, 2026
@shah-harshit shah-harshit self-assigned this Oct 27, 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.

@gitar-bot

gitar-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Removing the global focused-link color changes focus styling across the UI; links may lose the primary-color cue, while underlining remains.

Removes the global unlayered color rule from a:focus in app.less so focused links keep their own colour, fixing the classic sidebar's selected icon turning blue-on-blue after click. 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

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 79%
79.75% (131256/164582) 66.26% (46295/69864) 69.21% (26270/37953)

@sonarqubecloud

Copy link
Copy Markdown

@shah-harshit shah-harshit added the To release Will cherry-pick this PR into the release branch label Oct 27, 2026
@shah-harshit
shah-harshit added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 05a02f9 Oct 27, 2026
171 of 172 checks passed
@shah-harshit
shah-harshit deleted the shah-harshit/logo-icon-issue-check branch October 27, 2026 14:27
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.1 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

Copy link
Copy Markdown

🤖 Backport to 2.0 opened as #36364 (clean cherry-pick). It merges itself once the checks pass.

@gh-bot-collate

Copy link
Copy Markdown

🤖 Backport to 2.1 opened as #36365 (clean cherry-pick). It merges itself once the checks pass.

shah-harshit added a commit that referenced this pull request Oct 27, 2026
…tays visible (#36322) (#36365)

(cherry picked from commit 05a02f9)

Co-authored-by: Harshit Shah <harshit.shah@getcollate.io>
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 To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants