fix: export DialogShell, fix button layout, add footerBuilder, fix body spacing#8
Merged
Merged
Conversation
…dy spacing (#7) - Export MagicStarterDialogShell publicly from barrel - Replace footer: Widget? with footerBuilder: Widget Function(BuildContext) so external callers can Navigator.pop with the dialog's own context - Fix ConfirmDialog and PasswordConfirmDialog buttons from full-width (flex-1) to compact right-aligned (justify-end gap-2 wrap) - Fix DialogShell body gap by replacing SingleChildScrollView with ListView(shrinkWrap: true) for shrink-to-content behavior
The export line for hide_bottom_nav.dart was in the working tree before this PR and got included accidentally — the file does not exist in the repository yet.
There was a problem hiding this comment.
Pull request overview
This PR updates the Magic Starter dialog system to make MagicStarterDialogShell a public, reusable building block, while fixing footer context safety, button layout consistency, and short-body spacing behavior.
Changes:
- Export
MagicStarterDialogShellfrom the public barrel and document the new dialog-shell contract. - Replace
footerwithfooterBuilder(BuildContext dialogContext)so footer actions can safely pop the dialog. - Update confirm/password-confirm dialog footers to use compact, right-aligned button layout and adjust DialogShell body scrolling to avoid short-content gaps.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/ui/widgets/magic_starter_dialog_shell.dart | Makes the shell reusable + switches body scrolling to ListView(shrinkWrap: true) + adds footerBuilder. |
| lib/src/ui/widgets/magic_starter_confirm_dialog.dart | Uses footerBuilder and updates footer layout to compact right-aligned buttons. |
| lib/src/ui/widgets/magic_starter_password_confirm_dialog.dart | Updates footer layout to compact right-aligned buttons. |
| lib/magic_starter.dart | Exports MagicStarterDialogShell (and adds an export that currently appears invalid). |
| test/ui/widgets/magic_starter_dialog_shell_test.dart | Updates tests for footerBuilder and adds coverage for builder context/body scrolling change. |
| test/ui/widgets/magic_starter_confirm_dialog_test.dart | Adds a test for the new compact/right-aligned footer behavior. |
| test/ui/widgets/magic_starter_password_confirm_dialog_test.dart | Adds tests for compact/right-aligned footer behavior. |
| .claude/rules/widgets.md | Updates widget rules to reflect the new DialogShell API and footer layout convention. |
| CLAUDE.md | Updates documented widget exports and DialogShell behavior. |
| CHANGELOG.md | Records the API change (footerBuilder) and the layout fixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Scope flex-1/w-full assertions to footer container (not entire subtree) - Add geometry assertion for body-footer gap regression test - Add flex-1 and w-full absence checks in confirm dialog test - Bump version to 0.0.1-alpha.5 for release
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
Closes #7 — fixes 4 dialog system issues discovered during kodizm-app migration to alpha.4:
MagicStarterDialogShell— now public from barrel, enabling apps to compose custom dialogs (pickers, forms) with consistent theme stylingfooter→footerBuilder—Widget Function(BuildContext dialogContext)?provides the dialog's own context so external callers can safelyNavigator.pop(dialogContext)without popping the underlying routeMagicStarterConfirmDialogandMagicStarterPasswordConfirmDialogbuttons changed from full-width (flex-1) to compact right-aligned (justify-end gap-2 wrap), matchingTwoFactorModal's existing patternFlexible+SingleChildScrollViewwithFlexible+ListView(shrinkWrap: true)so body doesn't create a gap between content and footer when content is shortTest plan
flutter test --coverage)dart analyze --no-fatal-infos— 0 errors, 0 warningsjustify-end gap-2 wrapbutton pattern