Skip to content

fix(ui-react): cap namespace selector list height to prevent overflow#6399

Merged
gustavosbarreto merged 1 commit into
masterfrom
fix/ui-react/namespace-selector-list-height
Jun 1, 2026
Merged

fix(ui-react): cap namespace selector list height to prevent overflow#6399
gustavosbarreto merged 1 commit into
masterfrom
fix/ui-react/namespace-selector-list-height

Conversation

@luizhf42
Copy link
Copy Markdown
Member

@luizhf42 luizhf42 commented Jun 1, 2026

What

The namespace selector dropdown now caps its namespace list at a fixed height and scrolls internally instead of growing unbounded.

Why

With a large number of namespaces, the list grew taller than the viewport, pushing the dropdown past the body height and breaking the page layout.

Changes

  • NamespaceSelector: added max-h-72 overflow-y-auto to the namespace list container so only the list scrolls while the active-namespace header and the Create/Admin footers stay pinned. This matches the existing scroll pattern used by InvitationsMenu (max-h-[360px] overflow-y-auto) and PendingDevices (max-h-[280px] overflow-y-auto).

Testing

Open the selector in an account with enough namespaces to exceed ~5 rows and confirm the list scrolls within the dropdown, the header and footer stay fixed, and the dropdown no longer overflows the viewport.

With many namespaces the dropdown grew past the viewport and broke the
page layout. Constrain the list to a max height and scroll it instead.
@luizhf42 luizhf42 requested a review from a team as a code owner June 1, 2026 21:20
@luizhf42 luizhf42 self-assigned this Jun 1, 2026
@luizhf42 luizhf42 added kind/bug Something isn't working area/ui labels Jun 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Claude finished @luizhf42's task in 1m 43s —— View job


Code Review Complete

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

The change correctly applies overflow-y-auto max-h-72 to the namespace list container, consistent with the existing scroll patterns in InvitationsMenu (max-h-[360px] overflow-y-auto) and PendingDevices (max-h-[280px] overflow-y-auto). The footer actions (Admin Console link, Create namespace) remain outside the scrollable area as intended.


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 159279f into master Jun 1, 2026
23 checks passed
@gustavosbarreto gustavosbarreto deleted the fix/ui-react/namespace-selector-list-height branch June 1, 2026 21:49
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