Skip to content

fix: constrain dialog panel height and make content scrollable#556

Open
vdovhanych wants to merge 1 commit into
tale:mainfrom
vdovhanych:main
Open

fix: constrain dialog panel height and make content scrollable#556
vdovhanych wants to merge 1 commit into
tale:mainfrom
vdovhanych:main

Conversation

@vdovhanych
Copy link
Copy Markdown

The route approval dialog overflows the viewport when a machine advertises many subnet routes, making it impossible to scroll to routes below the fold or reach the action buttons.

Changes

  • app/components/dialog.tsx
    • Cap AlertDialog.Popup at max-h-[90dvh] with flex flex-col so the panel never exceeds the viewport
    • Add flex min-h-0 flex-1 flex-col to Form to propagate the flex height constraint down
    • Make the children container overflow-y-auto flex-1 min-h-0 — content scrolls, buttons don't
    • Mark the button row shrink-0 so Close/Confirm are always visible regardless of content length
// Before
<AlertDialog.Popup className="w-full max-w-lg rounded-xl p-4 ...">
  <Form ...>
    <div className="flex flex-col gap-4">{children}</div>
    <div className="mt-5 flex justify-end gap-3">
// After
<AlertDialog.Popup className="flex w-full max-w-lg flex-col max-h-[90dvh] rounded-xl p-4 ...">
  <Form className="flex min-h-0 flex-1 flex-col" ...>
    <div className="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto">{children}</div>
    <div className="mt-5 flex shrink-0 justify-end gap-3">

Applies globally to all dialogs, so any future content-heavy dialog gets the same treatment.

see attached screenshots
before:
Screenshot 2026-05-12 at 10 36 46

after:
Screenshot 2026-05-12 at 10 36 55

@vdovhanych vdovhanych requested a review from tale as a code owner May 12, 2026 08:44
@github-actions github-actions Bot added the UI/UX Related to the frontend UI label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI/UX Related to the frontend UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants