ui icon indicating copy to clipboard operation
ui copied to clipboard

fix(sidebar): make height fit parent container

Open Mikoshiba-Kyu opened this issue 5 months ago • 3 comments

Overview

Fixed the sidebar component to properly fit the height of its parent element.

Changes

  • Changed from fixed positioning with h-svh to relative positioning with h-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 avatar Aug 08 '25 00:08 Mikoshiba-Kyu

@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.

vercel[bot] avatar Aug 08 '25 00:08 vercel[bot]

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

swalker326 avatar Sep 19 '25 19:09 swalker326

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

Arsabutispik avatar Nov 14 '25 13:11 Arsabutispik

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.

Mikoshiba-Kyu avatar Dec 13 '25 00:12 Mikoshiba-Kyu