Skip to content

[bug] Sidebar: No collapsible visibility on Mobile. #366

Description

@x-N0

OK
Image

BAD
Image

Steps to reproduce:

  1. Use Sidebar.Provider with default collapsible behavior.

  2. Render Sidebar with several Sidebar.Group collapsible blocks, each with Sidebar.GroupLabel + Sidebar.GroupContent + nav links (defaultOpen is fine).

  3. Resize to width ≤ 767px.

  4. Open the mobile sidebar.

Result: You won't be able to view the items inside collapsible groups.

Why is this?
grid-template-rows does not resolve to 1fr, instead resolves to 0fr. No space to display the items.

Doing the change to the class in the browser's developer tools fixes it.

Impact:
emdash-cms/admin uses this:
emdash-cms/emdash#101

Suggested fix:
Treat the open mobile drawer like the expanded desktop sidebar: Either put the same group/sidebar + data-state="expanded" on its root, or stop tying collapsible group height to group-data-[state=expanded]/sidebar when you’re on the mobile sheet.

Do you think @ask-bonk could take this one up? 👀

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions