Skip to content

fix: improve DialogShell scroll, PageHeader layout, add HideBottomNav widget#19

Merged
anilcancakir merged 3 commits intomainfrom
fix/ui-widget-improvements
Apr 4, 2026
Merged

fix: improve DialogShell scroll, PageHeader layout, add HideBottomNav widget#19
anilcancakir merged 3 commits intomainfrom
fix/ui-widget-improvements

Conversation

@anilcancakir
Copy link
Copy Markdown
Contributor

@anilcancakir anilcancakir commented Apr 4, 2026

Summary

  • MagicStarterHideBottomNav: New InheritedWidget that signals MagicStarterAppLayout to hide bottom navigation for fullscreen routes (e.g., chat views, media players). Wired into AppLayout.bottomNavigationBar check and exported from the public barrel.

Note: DialogShell and PageHeader changes from the original commit were reverted after review — they broke existing tests and documented behavior. Those improvements will be revisited in a separate PR with proper test updates.

Test plan

  • Verify MagicStarterHideBottomNav.of(context) returns false by default
  • Verify wrapping a route with MagicStarterHideBottomNav hides bottom nav on mobile
  • Verify existing DialogShell tests pass (21/21 ✅)
  • Verify existing PageHeader tests pass (21/21 ✅)
  • Run flutter analyze --no-fatal-infos — no issues
  • Run flutter test — all 578 tests pass

… widget

- DialogShell: replace ListView with SingleChildScrollView for simpler
  scroll behavior, add ClipRRect to prevent body content overflow on
  rounded corners
- PageHeader: refactor from nested WDiv flex layout to native Flutter
  Row + Expanded for more predictable sizing, add flex-wrap on actions
- HideBottomNav: new InheritedWidget that signals AppLayout to hide
  bottom navigation for fullscreen routes
Copilot AI review requested due to automatic review settings April 4, 2026 19:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve UI behavior in the Magic Starter Flutter plugin by adjusting dialog scrolling/clipping, refactoring the PageHeader layout for more predictable sizing, and introducing an inherited signal for hiding the bottom navigation in fullscreen routes.

Changes:

  • Refactors MagicStarterPageHeader layout from Wind flex classes to a Flutter Row/Expanded structure and adds wrapping on actions.
  • Updates MagicStarterDialogShell body scrolling from ListView(shrinkWrap: true) to SingleChildScrollView and adds rounded-corner clipping.
  • Adds a new HideBottomNav InheritedWidget intended to signal fullscreen layouts.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
lib/src/ui/widgets/magic_starter_page_header.dart Refactors header layout and actions container behavior.
lib/src/ui/widgets/magic_starter_dialog_shell.dart Changes dialog body scrolling approach and adds clipping for rounded corners.
lib/src/ui/widgets/hide_bottom_nav.dart Adds an inherited flag intended to hide bottom navigation for subtree routes.

…omNav

- Revert DialogShell to ListView(shrinkWrap: true) + structural classes,
  removing ClipRRect with hardcoded radius — fixes test expectation and
  preserves theme compatibility
- Revert PageHeader to responsive Wind UI layout (flex-col sm:flex-row),
  restoring responsive behavior on small screens — fixes test expectation
- Rename HideBottomNav → MagicStarterHideBottomNav with proper file
  naming (magic_starter_hide_bottom_nav.dart), add usage docs showing
  how to wire into layout
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

- AppLayout now checks MagicStarterHideBottomNav.of(context) before
  rendering bottomNavigationBar on mobile
- Export MagicStarterHideBottomNav from magic_starter.dart barrel
- Fix docblock: use backtick reference instead of unresolvable bracket link
@anilcancakir anilcancakir merged commit a34649f into main Apr 4, 2026
1 check passed
@anilcancakir anilcancakir mentioned this pull request Apr 4, 2026
4 tasks
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.

2 participants