馃幆 fix: Center Collapsed Sidebar Icons and Unclip Sidebar Focus Rings - #122
Open
dustinhealy wants to merge 1 commit into
Open
馃幆 fix: Center Collapsed Sidebar Icons and Unclip Sidebar Focus Rings#122dustinhealy wants to merge 1 commit into
dustinhealy wants to merge 1 commit into
Conversation
The collapsed sidebar kept its labels mounted with a gap-2.5 that never collapsed, so the 10px gap next to the zero-width truncated labels pushed the logo, nav icons, and avatar left of center and justify-* had no effect. Rows now drop to gap-0 with justify-center when collapsed, and the user row's flex-1 label container becomes w-0 flex-none so it cannot grow into the free space and offset the avatar. The user row wrapper's overflow-hidden clipped the avatar button's focus ring, which the global convention draws at a 2px offset outside the box. The wrapper no longer clips; the name and email already truncate inside their min-w-0 container and the aside still clips during the width transition. The collapse toggle is w-full and flush with the panel edges and the viewport bottom, so ancestor clipping leaves only the top segment of an outside ring visible. A scoped sidebar-toggle override draws the focus outline inset instead.
dustinhealy
marked this pull request as ready for review
August 11, 2026 23:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three sidebar polish issues, all pre-existing (introduced by the sidebar collapse refactor in #6, not by the click-ui 0.9.1 bump):
gap-2.5between icon and label never collapsed and the truncated label spans kept a shrink-to-fit sliver of width, sojustify-centerhad nothing to center. Collapsed rows now usegap-0withjustify-center, and every label span (logo title, nav labels, user-row name/email container) becomesw-0 flex-none overflow-hiddenwhile collapsed so no residual width orflex-1growth can absorb the free space. Measured result: icon centers moved from x=26.0 (logo x=20.0) to exactly x=27.5, the true center of the 55px inner rail.outline-offset: 2pxoutside the box, and the row wrapper'soverflow-hiddencut it on all sides. The wrapper clip is removed; the labels already truncate and the aside still clips during the width transition..sidebar-toggle:focus-visiblerule draws the ring inset (outline-offset: -2px), following the existing scoped-override convention instyles.css.Change Type
Testing
New
Sidebar.test.tsx(3 cases) asserts the collapsed-state classes (justify-center,gap-0, nooverflow-hiddenon the user row,sidebar-toggleon the toggle) and that the expanded state restoresgap-2.5. Geometry itself is not assertable in jsdom; visual verification below.Manually verified in the app: collapsed icons center in the rail, the avatar focus ring is a full circle, and tabbing to the collapse toggle shows a complete ring.
Before/after proof:
Test Configuration:
Checklist