Skip to content

fix(navbar): keep user dropdown on one line and reveal navbar border#1140

Open
JeanMarcMilletScality wants to merge 1 commit into
development/1.0from
fix/navbar-username-wrap
Open

fix(navbar): keep user dropdown on one line and reveal navbar border#1140
JeanMarcMilletScality wants to merge 1 commit into
development/1.0from
fix/navbar-username-wrap

Conversation

@JeanMarcMilletScality

@JeanMarcMilletScality JeanMarcMilletScality commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Problem

A long username in the navbar's right-action dropdown wrapped to two lines and grew taller than the navbar, breaking vertical alignment. The trigger's solid navbarBackground fill also covered the navbar's bottom border.

Fix

In NavbarMenuItem .sc-dropdown .trigger (Navbar.component.tsx):

  • Pin the trigger to navbarHeight and add white-space: nowrap so it never wraps.
  • Truncate the label (.sc-trigger-text): display: block; max-width: 12rem; overflow: hidden; text-overflow: ellipsis.
  • Remove the background-color: navbarBackground fill so the navbar's bottom border stays visible.

Scope matches the original bug — it applies to Dropdown-type right actions (the username case), whose trigger text carries .sc-trigger-text.

Verification

  • NavbarWithLongUserName Storybook story added for visual review.
  • Full Jest suite: 36 suites / 454 tests pass.
  • tsc --noEmit clean; ESLint clean.

🤖 Generated with Claude Code

The right-action dropdown trigger used height: auto with no nowrap, so a
long username wrapped to two lines and grew past the navbar height,
breaking vertical alignment. Its solid navbarBackground fill also hid the
navbar's bottom border.

Pin the trigger to navbarHeight with white-space: nowrap, truncate the
label with an ellipsis (max-width + overflow), and drop the background
fill so the border stays visible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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