Skip to content

Collapse main app sidebar to icon rail with in-sidebar toggle#4723

Open
dcrjodle wants to merge 5 commits into
developmentfrom
claude/chrome-sidebar-redesign
Open

Collapse main app sidebar to icon rail with in-sidebar toggle#4723
dcrjodle wants to merge 5 commits into
developmentfrom
claude/chrome-sidebar-redesign

Conversation

@dcrjodle

@dcrjodle dcrjodle commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator
Screenshot 2026-07-17 at 14 44 59

Summary

Redesigns the main app sidebar collapse behavior (part of the Tendril chrome redesign; companion PR in Ivy-Tendril):

  • Icon rail on desktop: collapsing the main app sidebar now shrinks it to a 48px icon rail instead of sliding it fully offscreen. Menu items render icon-only with right-side tooltips (icon-less items fall back to the label's initial), group headers fade/collapse, badges fade, and clicking a collapsed section expands the sidebar with that section open. Icons keep their x-position through the 300ms width transition, so the collapse is seamless.
  • Toggle inside the sidebar: the sidebar toggle moved from floating over the main content into the bottom of the sidebar (desktop). The floating toggle remains only for the mobile drawer, whose behavior is unchanged. The tab bar row no longer reserves space for the floating button on desktop (pl-10md:pl-2).
  • New collapsed slots: SidebarLayout gains optional SidebarHeaderCollapsed / SidebarFooterCollapsed slots (C# + frontend) so shells can provide rail-sized header/footer content (e.g. an icon-only primary action). Without them, header/footer hide while collapsed.
  • Context for sidebar widgets: new SidebarLayoutContext (useSidebarLayout()) exposes {collapsed, expand, toggle}; SidebarMenuWidget uses it for rail rendering. Search-result rendering is suppressed while collapsed (results would otherwise render clipped inside the 48px rail).

Notes for reviewers

  • DefaultSidebarAppShell consumers get the rail by default with hidden header/search/footer while collapsed; menu icons (or letter fallbacks) plus the in-rail toggle keep it functional. Wiring collapsed slots into DefaultSidebarAppShell could be a follow-up.
  • Standalone TabsLayout widgets using the Tabs variant lose 32px of left padding on desktop (pl-10 existed to clear the floating toggle).
  • Non-main-app sidebars (MainAppSidebar unset) are unchanged.

Testing

  • Frontend: tsc + vite build clean, 1289 vitest tests pass, lint clean.
  • C#: Ivy.Test 1365 tests pass.
  • Manual browser verification of the Samples app (tabs + rail + toggle) and Ivy Tendril (rail, tooltips, navigation, New Plan dialog from rail, settings dropdown from rail, mobile drawer) on desktop and mobile viewports.

🤖 Generated with Claude Code

On desktop the main app sidebar now collapses to a 48px icon rail
instead of sliding fully offscreen: menu items render icon-only with
tooltips (label-initial fallback for icon-less items), group headers
fade out, and clicking a collapsed section expands the sidebar with
that section open. The toggle button moves from floating over the main
content into the bottom of the sidebar; the floating toggle remains
only for the mobile drawer, and the tab bar no longer reserves space
for it on desktop (pl-10 -> md:pl-2).

New optional SidebarLayout slots SidebarHeaderCollapsed and
SidebarFooterCollapsed let shells swap in rail-sized header/footer
content; without them the header/footer hide while collapsed. A new
SidebarLayoutContext exposes {collapsed, expand, toggle} to sidebar
widgets. Search-result rendering is suppressed while collapsed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dcrjodle and others added 3 commits July 17, 2026 12:54
The collapsed rail now aligns the menu-item icons with the New Plan
button and toggle icons: labels collapse to zero width (not just
opacity) so each button shrinks to icon width and centers cleanly, the
SidebarContent wrapper is width-constrained so centering isn't thrown
off by the scroll gutter, and collapsed menu buttons drop their inline
padding/gap. The sidebar toggle moves from the bottom of the sidebar to
the top-right (top-center in the rail).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
When expanded, the toggle now overlays the top-right corner of the
header area (aligned with the top of the title) instead of occupying
its own row above the header, which had pushed the title down. In the
rail it stays a centered row at the top. Extracted the shared button
markup into SidebarToggleButton.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Widen the icon rail from 48px to 54px so it matches the menu item icon
box (icons no longer clipped), and add spacing below the toggle button
so it isn't flush against the collapsed header's first action.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dcrjodle

Copy link
Copy Markdown
Collaborator Author

Uploading Screen Recording 2026-07-17 at 13.52.04.mov…

@dcrjodle
dcrjodle marked this pull request as ready for review July 17, 2026 11:54
Collapsing the sidebar left the sticky group headers (e.g. "Concepts",
"Client Extensions") at their natural width, which forced the whole
menu column wider than the 54px rail and pushed icons off-center for
apps with long group labels. Give the header w-0 when collapsed so it
no longer sets the column min-width. Also drop the desktop tab bar's
left padding entirely (md:pl-2 -> md:pl-0) now that the toggle no
longer floats over the content.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@artem-ivy-ai

Copy link
Copy Markdown
Collaborator

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.

2 participants