Skip to content

fix(ui): make dialogs fit a narrow viewport - #472

Open
pat-s wants to merge 1 commit into
abhinavxd:mainfrom
pat-s:pr/dialog-narrow-viewport
Open

fix(ui): make dialogs fit a narrow viewport#472
pat-s wants to merge 1 commit into
abhinavxd:mainfrom
pat-s:pr/dialog-narrow-viewport

Conversation

@pat-s

@pat-s pat-s commented Aug 6, 2026

Copy link
Copy Markdown

DialogContent and AlertDialogContent are w-full max-w-lg with no side inset, no max-h and no overflow-y-auto, and sm:rounded-lg only applies from 640px. Below that they render edge-to-edge with square corners, and can't scroll when taller than the viewport.

Adds a 1rem side inset, max-h-[calc(100dvh-2rem)] + overflow-y-auto, and makes the radius unconditional. At ≥640px max-w-lg still governs, so nothing changes there.

Two files, covers all 17 dialog call sites. Refs #470

Summary by CodeRabbit

  • Style
    • Improved alert dialogs and standard dialogs with responsive horizontal spacing and sizing.
    • Added viewport-aware maximum heights and vertical scrolling for content-heavy dialogs.
    • Applied rounded corners consistently across screen sizes.

`DialogContent` and `AlertDialogContent` are `w-full max-w-lg` with no side
inset, no max height and no vertical scrolling, and `sm:rounded-lg` only
applies from 640px. In a window narrower than that they render edge to
edge with square corners, and cannot be scrolled when taller than the
viewport.

Add a 1rem side inset, `max-h-[calc(100dvh-2rem)]` with `overflow-y-auto`,
and make the radius unconditional. At 640px and above `max-w-lg` still
governs the width, so nothing changes there.

Fixing the two primitives covers all 17 dialog call sites.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6da98d0b-7e20-4152-9753-0985a590831e

📥 Commits

Reviewing files that changed from the base of the PR and between a482f07 and 7882375.

📒 Files selected for processing (2)
  • frontend/shared-ui/components/ui/alert-dialog/AlertDialogContent.vue
  • frontend/shared-ui/components/ui/dialog/DialogContent.vue

📝 Walkthrough

Walkthrough

Dialog and alert dialog content styling now uses viewport-aware sizing, vertical scrolling, and consistent rounded corners.

Changes

Dialog content styling

Layer / File(s) Summary
Responsive content layout
frontend/shared-ui/components/ui/alert-dialog/AlertDialogContent.vue, frontend/shared-ui/components/ui/dialog/DialogContent.vue
Dialog content uses responsive horizontal sizing, dynamic viewport-height limits, vertical scrolling, and unconditional rounded corners.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making dialogs fit narrow viewports.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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