Skip to content

Make the sidebar resizable, scrollable, and icon-tabbed - #124

Merged
ctoth merged 2 commits into
masterfrom
feature/123-sidebar-responsiveness
Aug 26, 2026
Merged

Make the sidebar resizable, scrollable, and icon-tabbed#124
ctoth merged 2 commits into
masterfrom
feature/123-sidebar-responsiveness

Conversation

@ctoth

@ctoth ctoth commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Closes #123.

The sidebar dreamed of being responsive; this grants all three wishes.

Width-resizable

  • New resize handle along the sidebar's left edge. Drag it with the mouse/touch, or focus it and use Arrow keys (24px steps), Home (minimum), or End (maximum).
  • Implemented as an ARIA window splitter (role="separator", aria-orientation="vertical", aria-valuenow/min/max) so screen readers announce the width as it changes.
  • Width is clamped to 180px–60vw and persisted to localStorage (versioned via the shared persistence envelope), so it survives reloads. Persistence is debounced so drags don't hammer localStorage.
  • Width transitions are suppressed while dragging so the sidebar tracks the pointer instantly.

Icon tabs

  • Every tab now has an icon (Room 📍, Inventory 📦, Users 👥, Server 🖥, MIDI 🎵, Haptics 🎮, Files 📁, Audio 🎧 — via react-icons, already a dependency).
  • The tab bar is a CSS container: when it has room, tabs show icon + label; when squished, labels collapse and tabs become evenly-spread icons with tooltips. The label text stays in the accessibility tree either way (clip pattern), so tab names still announce and Ctrl+Shift+N switching is unaffected.
  • The shared Tabs component keeps icons optional, so the preferences dialog is unchanged.

Scrollable top-to-bottom

  • Desktop tab panels already scrolled; mobile did not — the aside's max-height: 40vh clipped content because max-height on an auto-height container can't shrink its children. Tab panels now cap their own height on mobile and scroll.

Bonus fix uncovered along the way

src/components/sidebar.css was never imported anywhere — every rule in it was dead. It's now imported by sidebar.tsx, with the two rules that would have caused regressions neutralized (double panel padding; display: flex overriding the hidden attribute on the collapsed sidebar rail).

Verification

  • tsc --noEmit clean; all 1104 vitest tests pass.
  • Playwright end-to-end checks against the live dev server, all passing: handle present; drag widen/narrow; min-clamp at 180px; keyboard resize; ARIA values; label collapse when narrow; width persistence across reload; desktop panel scroll; mobile sidebar bounded with scrollable panel.
  • Visual screenshots reviewed at default/wide/narrow/collapsed/mobile states.

🤖 Generated with Claude Code

https://claude.ai/code/session_0175eEy1tMaz2woc7cqjwCGe

Closes #123.

- Add a resize handle on the sidebar's left edge: drag with the pointer,
  or focus it and use arrow keys / Home / End (ARIA window splitter with
  aria-valuenow announcements). Width is clamped to 180px-60vw and
  persisted to localStorage.
- Give every sidebar tab an icon. Labels show alongside icons when the
  bar has room and collapse to icon-only (with tooltips) when squished;
  the label text stays in the accessibility tree either way.
- Fix mobile sidebar clipping: tab panels now cap their own height and
  scroll top-to-bottom instead of being cut off by the aside's
  max-height.
- Import sidebar.css, which was never actually imported anywhere - all
  its rules were dead. Neutralize the rules that would have conflicted
  now that they're live (double panel padding, display:flex overriding
  the hidden attribute on the collapsed sidebar).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175eEy1tMaz2woc7cqjwCGe
@ctoth ctoth closed this Aug 26, 2026
@ctoth ctoth reopened this Aug 26, 2026
The pull_request event for the original push never produced a workflow
run; empty commit to fire a synchronize event.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175eEy1tMaz2woc7cqjwCGe
@ctoth
ctoth merged commit f0a4a48 into master Aug 26, 2026
1 check passed
@ctoth
ctoth deleted the feature/123-sidebar-responsiveness branch August 26, 2026 17:09
github-actions Bot pushed a commit that referenced this pull request Aug 26, 2026
…veness

Make the sidebar resizable, scrollable, and icon-tabbed f0a4a48
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.

Sidebar Responsiveness

1 participant