fix(Sidebar): center item icons when collapsed - #830
Draft
NagariaHussain wants to merge 1 commit into
Draft
Conversation
The label span kept flex-1 in the collapsed state, and its flex-basis of 0% takes precedence over w-0 — the grow factor expanded the invisible label to fill the row, pushing the icon hard left and leaving a large empty area inside the active pill. Swap to flex-none when collapsed so justify-center can actually center the icon in the rail. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012PXJnZXUyt5vyE7DiuLnD3
Contributor
|
@NagariaHussain screenshots? |
Member
Author
|
It is not ready for review yet, hence in draft 😅 |
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.
Problem
When the sidebar is collapsed, item icons sit hard left in the rail instead of centered, and the active item's pill shows a large empty area to the right of the icon.
The label span keeps
flex-1in the collapsed state. Itsflex-basis: 0%takes precedence overw-0, so the grow factor expands the invisible label to fill the row —justify-centeron the link has no free space left to center in.Solution
Apply
flex-noneto the label span when collapsed (andflex-1only when expanded), so the hidden label truly collapses to zero width and the icon centers in the rail.🤖 Generated with Claude Code
https://claude.ai/code/session_012PXJnZXUyt5vyE7DiuLnD3
Coverage: 68.82% (±0.00% vs
main)