fix(sidebar): make height fit parent container
Overview
Fixed the sidebar component to properly fit the height of its parent element.
Changes
- Changed from
fixedpositioning withh-svhtorelativepositioning withh-full - Modified the sidebar height to properly adapt to parent container constraints
Affected Files
-
apps/www/registry/default/ui/sidebar.tsx -
apps/www/registry/new-york/ui/sidebar.tsx
Completed Tasks
- [x] Applied changes to both styles (default, new-york)
- [x] Successfully built the registry
- [x] Used proper commit message convention
Related Issue
Fixes #5629
@Mikoshiba-Kyu is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
This breaks for a collapsable sidebar - the sidebar collapses but the content stays in place.
https://github.com/user-attachments/assets/784cf555-8a59-403e-b89f-ff27e04dcb74
Putting in
This breaks for a collapsable sidebar - the sidebar collapses but the content stays in place. Screen.Recording.2025-09-19.at.2.15.06.PM.mov
Putting in absolute instead of relative seems to fix that issue
A much better improvement has arrived, so I'll be closing my PR. A "godlike" fix has descended! https://github.com/shadcn-ui/ui/issues/5629#issuecomment-3636703682 I'm really glad that there are people addressing this issue—wishing you all the best with it.