fix: dialog mobile overflow — safe area-aware maxHeight (#13)#14
Merged
anilcancakir merged 2 commits intomainfrom Mar 30, 2026
Merged
fix: dialog mobile overflow — safe area-aware maxHeight (#13)#14anilcancakir merged 2 commits intomainfrom
anilcancakir merged 2 commits intomainfrom
Conversation
All three dialog widgets now compute maxHeight from safe area (MediaQuery.viewPaddingOf) instead of raw screen height, and add vertical insetPadding (24px) to prevent edge-to-edge on mobile.
There was a problem hiding this comment.
Pull request overview
Fixes mobile dialog overflow by making dialog height constraints safe-area aware and adding vertical padding so dialogs don’t render edge-to-edge on small screens.
Changes:
- Compute dialog
maxHeightfrom safe-area-adjusted screen height (MediaQuery.viewPaddingOf) acrossMagicStarterDialogShell,MagicStarterPasswordConfirmDialog, andMagicStarterTwoFactorModal. - Add vertical
insetPaddingto dialogs to prevent edge-to-edge rendering on mobile. - Add widget tests covering safe-area
maxHeightcalculation andinsetPaddingacross all affected dialogs.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/ui/widgets/magic_starter_dialog_shell.dart | Uses safe-area-derived safeHeight for maxHeight and adds vertical insetPadding. |
| lib/src/ui/widgets/magic_starter_password_confirm_dialog.dart | Replaces hardcoded maxHeight with safe-area-derived value; adds vertical insetPadding. |
| lib/src/ui/widgets/magic_starter_two_factor_modal.dart | Replaces hardcoded maxHeight with safe-area-derived value; adds vertical insetPadding. |
| test/ui/widgets/magic_starter_dialog_shell_test.dart | Adds tests for vertical insetPadding and safe-area-aware maxHeight calculations. |
| test/ui/widgets/magic_starter_password_confirm_dialog_test.dart | Adds tests for vertical insetPadding and safe-area-aware maxHeight calculations. |
| test/ui/widgets/magic_starter_two_factor_modal_test.dart | Adds tests for vertical insetPadding and safe-area-aware maxHeight calculations. |
| CHANGELOG.md | Documents the mobile overflow fix under [Unreleased]. |
| .claude/rules/widgets.md | Documents the new dialog safe-area sizing rule. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MagicStarterDialogShell,MagicStarterPasswordConfirmDialog,MagicStarterTwoFactorModal) now computemaxHeightfrom safe area viaMediaQuery.viewPaddingOf()instead of raw screen height or hardcoded values (600/800)insetPadding: 24to prevent dialogs from extending to screen edges on mobileTest plan
flutter test— 578/578 passflutter analyze --no-fatal-infos— no issuesdart format --set-exit-if-changed .— 0 changesCloses #13