Skip to content

ux(sidebar): move the collapse toggle above the profile row + restyle - #168

Merged
gkhngyk merged 1 commit into
mainfrom
ux/sidebar-collapse-toggle-position
Jun 4, 2026
Merged

gkhngyk merged 1 commit into
mainfrom
ux/sidebar-collapse-toggle-position

Conversation

@gkhngyk

@gkhngyk gkhngyk commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

The sidebar collapse toggle was the bottom-most element (below the user-profile row) and styled as a bordered, full-width, centered icon button — reading as a third nav surface rather than a small utility. This moves it above the profile row and restyles it to blend into the nav stack.

Closes #163.

Changes

In web/src/components/layout/sidebar.tsx:

  • Order — collapse-toggle container now sits above the user-profile container (the profile row is the natural footer).
  • Border — dropped border-t on the toggle container (border-t p-2 → p-2); the profile row keeps its border-t, giving the footer a single seam in the right place.
  • Style — regular ghost button, h-9 w-full with justify-start expanded / justify-center collapsed, matching the nav rows' height + horizontal rhythm.
  • Icons — PanelLeftClose / PanelLeftOpen → ChevronsLeft / ChevronsRight; import block updated.

The store action (toggleCollapse) is unchanged.

Acceptance criteria

  • Collapse toggle renders above the user-profile row (expanded + collapsed)
  • No top border on the toggle container; profile row keeps its border-t
  • Expanded: chevron left-aligned; collapsed: centered
  • Clicking toggles collapse exactly as before (store action unchanged)
  • tsc --noEmit + eslint clean

Out of scope

Hiding the toggle on mobile / reworking mobile nav; persisting collapse state anywhere new; reworking the user-profile row.

Made with Cursor

The collapse toggle was the bottom-most element, below the profile row,
styled as a bordered full-width centered icon button that read as a third
nav surface. Move it above the profile row (the natural footer), drop its
top border so the footer has a single seam at the profile row, and
restyle it as a left-aligned h-9 ghost row (centered only when collapsed)
matching the nav rows. Swap PanelLeftClose/Open for ChevronsLeft/Right.

Closes #163

Co-authored-by: Cursor <[email protected]>
@gkhngyk
gkhngyk merged commit 34e52f8 into main Jun 4, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 37e42c72 Deployed Jun 4, 2026 by vercel[bot]
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.

ux(sidebar): move the collapse toggle above the profile row + restyle

1 participant