ui icon indicating copy to clipboard operation
ui copied to clipboard

fix: issue #16 - dialogue overflow

Open squishydough opened this issue 2 years ago • 4 comments

Potential fix for Issue #16 . Added an overflow-y-auto and max-h-[500px] to the DialogPrimitive.Content. Solution doesn't consider screens less than 500px in height. Could always add some responsive options there.

squishydough avatar Jan 25 '23 23:01 squishydough

Someone is attempting to deploy a commit to a Personal Account owned by @shadcn on Vercel.

@shadcn first needs to authorize it.

vercel[bot] avatar Jan 25 '23 23:01 vercel[bot]

This would not be the desired behavior imo. It is undesirable to have the scroll bar inside of the dialog and to cut at a specific height.

(consider having content of height 550px and then having to scroll for the last 50px given that the screen has height > 550px)

Rather display the dialog in full height but make its parent handle the overflow. This way the scroll bar will not be inside the content and the dialogs content doesn’t get cut.

jnsdrssn avatar Jan 26 '23 19:01 jnsdrssn

This seems to shed some light on a possible solution: https://github.com/radix-ui/primitives/issues/887

Looks like converting the <DialogOverlay> component to accept children is the suggestion, and that does provide the scrollbar outside of the Dialog as intended. However, I'm not sure how to best handle having the dialog centered for small content, without then having that same content overflow the top and bottom of the window when the content is lengthy.

Will keep plugging away at it.

squishydough avatar Jan 31 '23 02:01 squishydough

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
next-template ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 4, 2023 at 6:47AM (UTC)

vercel[bot] avatar Feb 04 '23 06:02 vercel[bot]