Skip to content

fix(ui-react): make app bar responsive and keep triggers labeled#6403

Merged
gustavosbarreto merged 3 commits into
masterfrom
fix/ui-react/app-bar-responsiveness-and-a11y
Jun 3, 2026
Merged

fix(ui-react): make app bar responsive and keep triggers labeled#6403
gustavosbarreto merged 3 commits into
masterfrom
fix/ui-react/app-bar-responsiveness-and-a11y

Conversation

@luizhf42
Copy link
Copy Markdown
Member

@luizhf42 luizhf42 commented Jun 2, 2026

What

The app bar adapts to narrow viewports: the invitations dropdown no longer overflows horizontally, and the namespace and user-menu triggers collapse to icon-only without losing their accessible names.

Why

On narrow screens the header was crowded and the invitations panel overflowed off the left edge. The panel was anchored to its trigger button, which sits inset from the viewport's right edge (the support and user-menu buttons are to its right), so a right-aligned w-80 dropdown grew leftward off-screen. Widening it only pushed it further off-screen.

Changes

  • InvitationsMenu: below sm, the container drops to sm:relative so the panel anchors to the full-width <header> instead of the inset button, and max-w-full caps its width (sm:max-w-none restores the desktop w-80). A right-pinned panel that can never exceed the viewport makes overflow impossible. Picked over position: fixed because the header shifts down when a connectivity/license banner shows, and a viewport-fixed panel would detach from it.
  • NamespaceSelector: hide the namespace name and Admin Console label below md, leaving the initials/icon. Added aria-label, aria-haspopup, and aria-expanded so the collapsed trigger keeps an accessible name — without it the admin variant would be an unlabeled icon button.
  • UserMenu: hide the username below sm, leaving the avatar, with the same aria-label/aria-haspopup/aria-expanded treatment so the avatar-only button stays labeled.

Testing

Resize across the sm (640px) and md (768px) breakpoints. Confirm the invitations panel opens fully on-screen at ~360px, the namespace name returns at md, and the username at sm. With a screen reader, verify each trigger announces a name at every width — especially the admin-console variant.

luizhf42 added 3 commits June 2, 2026 17:45
The dropdown was positioned against its trigger button, which sits inset
from the viewport edge, so the right-aligned panel spilled off the left
side on narrow screens. Anchor it to the full-width header below `sm` via
`sm:relative` and clamp with `max-w-full` so it cannot exceed the viewport.
Hide the namespace name below `md` to save header width. Because that
text was the trigger's accessible name, hiding it would leave an unlabeled
icon button (no name at all in the admin variant), so add `aria-label`
plus `aria-haspopup`/`aria-expanded` to keep the control labeled.
Hide the username below `sm` to save header width. Since that text was
the trigger's accessible name, add `aria-label` plus `aria-haspopup`/
`aria-expanded` so the avatar-only button stays labeled.
@luizhf42 luizhf42 requested a review from a team as a code owner June 2, 2026 21:07
@luizhf42 luizhf42 self-assigned this Jun 2, 2026
@luizhf42 luizhf42 added kind/bug Something isn't working area/ui labels Jun 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Claude finished @luizhf42's task in 10s —— View job


Code Review Complete

Reviewed 3 files across code quality, security, testing, language patterns, and architecture — no issues found. The code looks good as-is.

If you push additional changes and want a new review, tag @shellhub-io/admin and a team member can trigger it.


@gustavosbarreto gustavosbarreto merged commit 80badcf into master Jun 3, 2026
21 checks passed
@gustavosbarreto gustavosbarreto deleted the fix/ui-react/app-bar-responsiveness-and-a11y branch June 3, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ui kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants