Skip to content

fix(desktop): centre the brand and project tiles on the collapsed icon rail - #98

Merged
pyramation merged 1 commit into
mainfrom
fix/collapsed-sidebar-icons
Aug 9, 2026
Merged

fix(desktop): centre the brand and project tiles on the collapsed icon rail#98
pyramation merged 1 commit into
mainfrom
fix/collapsed-sidebar-icons

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

On the collapsed rail the Wavegrid logo and the project switcher sat right of every nav icon — measured in the DOM, their glyph centres were at x=32 against the nav icons' x=24.

Both are size='lg' sidebar buttons, and that variant's collapsed p-0! never applies: it and the base group-data-[collapsible=icon]:p-2! both survive cn() (this tailwind-merge doesn't treat Tailwind v4's trailing-! important syntax as a conflict), so p-2 wins on stylesheet order. That leaves a 16px content box holding a 32px tile, which overflows to the right by exactly the padding.

Rather than fight the merge, the tile is pulled back by that padding when collapsed, and the label/chevron — which have no room on a 48px rail anyway — are hidden:

-<div className='… flex size-8 shrink-0 …'>            {/* logo / folder tile */}
+<div className='… flex size-8 shrink-0 … group-data-[collapsible=icon]:-ml-2'>
-<div className='grid min-w-0 flex-1 …'>              {/* name + subtitle */}
+<div className='grid min-w-0 flex-1 … group-data-[collapsible=icon]:hidden'>

Verified by rendering the shell against a throwaway Vite entry and reading getBoundingClientRect() for every sidebar icon: all eleven now centre at x=24. Expanded layout is unchanged.

Link to Devin session: https://app.devin.ai/sessions/972698f89f494b86828010666a002b8f
Requested by: @pyramation

@pyramation pyramation self-assigned this Aug 9, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation
pyramation merged commit fb6be8b into main Aug 9, 2026
5 checks passed
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.

1 participant