Skip to content

[kumo] Fix horizontal scroll in Sidebar.Content#583

Open
hkfoster wants to merge 1 commit into
cloudflare:mainfrom
hkfoster:kfoster/fix-sidebar-horizontal-scroll
Open

[kumo] Fix horizontal scroll in Sidebar.Content#583
hkfoster wants to merge 1 commit into
cloudflare:mainfrom
hkfoster:kfoster/fix-sidebar-horizontal-scroll

Conversation

@hkfoster

@hkfoster hkfoster commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Fix horizontal scroll in Sidebar.Content

Problem

Sidebar.Content wraps Base UI's ScrollArea. The scroll viewport ([data-sidebar="content"] > div) receives overflow: scroll as an inline style from Base UI, and the inner content div gets style="min-width: fit-content". Together, these create ~14px of horizontal overflow in sidebar panes, allowing users to scroll horizontally when they shouldn't be able to.

This is observable in the Cloudflare dashboard sidebar where consumer content (search buttons with ⌘K keyboard shortcuts, shortcut items with pin buttons, etc.) pushes the intrinsic content width slightly beyond the viewport.

Root Cause

The existing overflow-x-hidden! override on the viewport was scoped to collapsed state only (group-data-[state=collapsed]/sidebar:overflow-x-hidden!), leaving horizontal scrolling enabled in the expanded state.

Fix

Apply overflow-x-hidden! unconditionally on the ScrollArea.Viewport, so overflow-x: hidden !important always overrides Base UI's inline overflow: scroll regardless of sidebar state. The ScrollArea.Scrollbar was already set to orientation="vertical" and the ScrollArea.Content already had min-w-0! — this change completes the fix.

One-line change: group-data-[state=collapsed]/sidebar:overflow-x-hidden!overflow-x-hidden!


  • Reviews
    • bonk has reviewed the change
    • automated review not possible because: single-line CSS class change, no logic or API surface affected
  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: CSS-only change that broadens an existing !important override from collapsed-only to all states. Existing sidebar tests (701 passing) cover component behavior. The overflow is caused by Base UI's inline styles interacting with consumer content and cannot be reproduced with Kumo's own sidebar components alone.

Always apply overflow-x: hidden on the ScrollArea.Viewport, not just
when collapsed. Base UI sets overflow: scroll as an inline style on the
viewport, which allowed ~14px of horizontal overflow when consumer
content exceeded the sidebar width.
@pkg-pr-new

pkg-pr-new Bot commented Jun 11, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@cloudflare/kumo@583

commit: 894c617

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