fix(settings): keep Settings modal within the viewport on short windows#1137
fix(settings): keep Settings modal within the viewport on short windows#1137jSydorowicz21 wants to merge 1 commit into
Conversation
The modal box used a fixed h-[900px] with no max-height inside a centered overlay (items-center). On any window shorter than 900px it stayed 900px tall and centered, overflowing above the viewport with the top cut off and unreachable (the inner panels scroll, but the modal header did not). Cap height to calc(100vh - 2rem) and add overlay padding so it shrinks to fit and stays fully reachable; inner content keeps its existing overflow-y-auto scrolling.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTwo styling changes to ChangesSettingsModal Overlay Styling
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR keeps the Settings modal reachable on short windows. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(settings): keep Settings modal withi..." | Re-trigger Greptile |
Summary
On a window shorter than the modal, the Settings pane overflowed off the top of the screen and the cut-off top was unreachable.
Root cause: the modal box used a fixed
h-[900px]with nomax-height, inside a centered overlay (flex items-center justify-center). When the viewport was shorter than 900px the modal stayed 900px tall and centered, so it overflowed equally above and below; the header (search + close) scrolled off the top with no way to reach it. The inner sidebar/content panels already scroll, but the outer box did not shrink.Changes
SettingsModal.tsx: cap the modal box height atcalc(100vh - 2rem)via the existingstyleobject, and addp-4padding to the overlay so the dialog shrinks to fit short windows and stays fully reachable. On tall windows it is unchanged (still 900px). Inner panels keep their existingoverflow-y-autoscrolling.Verification
npm run lint(tsc x3): clean.Summary by CodeRabbit