Skip to content

feat(header-bar): add expandable notification dot indicator [LIBS-868] - #74

Open
arina-gutuboe wants to merge 1 commit into
mainfrom
LIBS-868/header-notification-indicator
Open

feat(header-bar): add expandable notification dot indicator [LIBS-868]#74
arina-gutuboe wants to merge 1 commit into
mainfrom
LIBS-868/header-notification-indicator

Conversation

@arina-gutuboe

@arina-gutuboe arina-gutuboe commented Aug 5, 2026

Copy link
Copy Markdown

Implements LIBS-868

This is a follow-up PR that ports the equivalent badge behavior from the ui PR.

Description
Replaces the persistent notification counter badge with a compact indicator dot when unread notifications exist. The full counter badge is shown temporarily after login (3 seconds) and on hover or keyboard focus, then collapses back to the dot.

Known issue
A bug has been identified in the header bar: bgColor always has a default value, which means it is always truthy. As a result, the element background is not darkened when the default color is used, and the hover opacity is always applied.

Note for the reviewer (out of scope)
In this PR, the hoverStyle variable in notification-icon was split into two separate variables to avoid applying opacity to the badge itself. The underlying hover logic, however, was intentionally left unchanged.

My initial thought is that, since this behavior has been in place for a while, it may not be worth reintroducing separate hover styles for the default and custom background colors.

I'm wondering if it would make more sense to either keep the current opacity-based approach for consistency and clean up the old hover logic, or consider a different approach that makes the hover state more noticeable.

A possible alternative would be to adopt an approach similar to useOnlineStatusStyles, where the hover background is adjusted based on contrast:

// "Lighten" on light backgrounds with black text; "darken" on dark backgrounds
const customBgColor =
    color === 'black' ? 'rgba(255,255,255, 0.2)' : 'rgba(0,0,0, 0.2)';

Screenshots
A dot indicator is displayed by default, and a badge appears on hover:
Screenshot 2026-08-05 at 13 44 43
Screenshot 2026-08-05 at 13 45 24

@arina-gutuboe
arina-gutuboe requested review from KaiVandivier and kabaros and removed request for kabaros August 5, 2026 11:46
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant