astryx icon indicating copy to clipboard operation
astryx copied to clipboard

[Bug] SideNav shows empty container at bottom when collapsible.hasButton is false

Open timwehrle opened this issue 5 months ago • 1 comments

Description

When rendering SideNav with collapsible={{ hasButton: false }}, an empty container is still rendered at the bottom of the side nav. Since the collapse button is intentionally hidden (rendered manually in the header instead via SideNavCollapseButton), this leaves unwanted empty space in the layout.

Reproduction

  • Render an AppShell with a SideNav as shown below.
  • Set collapsible={{ hasButton: false }} on SideNav.
  • Move the collapse button into the header via SideNavCollapseButton.
  • Observe the bottom of the side nav -> an empty container is still present.
<AppShell
  height="fill"
  contentPadding={6}
  sideNav={
    <SideNav
      collapsible={{ hasButton: false }}
      header={
        <div style={{ display: 'flex', alignItems: 'center' }}>
          <SideNavHeading heading="Test" headingHref="/" />
          <SideNavCollapseButton />
        </div>
      }
    >
      <SideNavSection title="Main">
        <SideNavItem
          icon={<Home16Regular />}
          label="Dashboard"
          isSelected
          href="/dashboard"
        />
        <SideNavItem label="Projects" href="/projects" />
      </SideNavSection>
    </SideNav>
  }
>
  {children}
</AppShell>

Astryx Version

@astryxdesign/[email protected]

Environment

Firefox 152.0.4 (aarch64)

timwehrle avatar Jul 05 '26 10:07 timwehrle

hi i would like to pick this up, if no one is working on this, thanks!

Geervan avatar Jul 05 '26 19:07 Geervan