-
-
Notifications
You must be signed in to change notification settings - Fork 368
fix: Add staticContent to SmoothModalSheet and constrain navbar reord… #6482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @TapItNinja!
Please
- revert what was coded in fix: Fixed issue 'DraggableScrollableSheet assertion error' #6441 #6443 first, in order to fix The reordering system in the navbar is broken #6451 (and check it does work)
- on top of that, fix again Product list selection modal shows 'DraggableScrollableSheet assertion error:' on small devices #6441 the way it was coded but without impacting The reordering system in the navbar is broken #6451 - as discussed before, just adding a
bool
parameter that would make the navbar work exactly as it used to work and the static content exactly as coded in fix: Fixed issue 'DraggableScrollableSheet assertion error' #6441 #6443
@@ -60,12 +64,17 @@ class ProductFooterSettingsButton extends StatelessWidget { | |||
/// Header + list padding + for each action: height + separator | |||
/// + bottom padding (nav bar) | |||
double _computeContentSize(BuildContext context) { | |||
return SmoothModalSheetHeader.MIN_HEIGHT + | |||
final double availableHeight = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep your comments to the very very very minimum, in general for this PR.
@@ -49,8 +49,12 @@ class ProductFooterSettingsButton extends StatelessWidget { | |||
title: appLocalizations.product_page_action_bar_setting_modal_title, | |||
prefixIndicator: true, | |||
closeButton: true, | |||
expandBody: true, | |||
body: const _ProductActionBarModal(), | |||
expandBody: false, // Avoid unbounded expansion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I were you I wouldn't recode this part with your personal tastes.
The point here is not to change the way it used to be, the point is to put it how it was before.
The only thing you should do here is say "btw it's dynamic content" (or "not static", whatever), with an additional parameter.
@@ -318,6 +318,7 @@ class SmoothModalSheet extends StatelessWidget { | |||
Color? headerForegroundColor, | |||
this.bodyPadding, | |||
this.expandBody = false, | |||
this.staticContent = false, // New parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come is it false
by default?
Most of the time it's stupid static content like "blablabla click-ok", isn't it?
Fixes navbar reordering crash (#6451) due to unbounded height post-#6443:
staticContent
toSmoothModalSheet
(@monsieurtanuki’s suggestion)._computeContentSize
at 80% screen height.SmoothAnimatedList
withListView.separated
(shrinkWrap: true).Tested across devices—no errors. Balances #6443’s fix with functionality. Open to reverting #6443 if @g123k prefers!
Fixes #6451, updates #6462.
Simulator.Screen.Recording.-.iPhone.16.-.2025-03-27.at.16.22.45.mp4