-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix the scrolling layout deviation of CupertinoActionSheet
#149439
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
Merged
Merged
Conversation
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
123f495 to
4a00b77
Compare
chunhtai
approved these changes
Jun 3, 2024
Contributor
chunhtai
left a comment
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.
LGTM
Contributor
|
auto label is removed for flutter/flutter/149439, due to - The status or check suite Windows build_tests_1_7 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
hello-coder-xu
pushed a commit
to hello-coder-xu/flutter
that referenced
this pull request
Jun 4, 2024
…pdate * master: (168 commits) Fix the scrolling layout deviation of `CupertinoActionSheet` (flutter#149439) Roll Flutter Engine from 60a7bb2353b6 to a6aa5d826649 (2 revisions) (flutter#149627) Roll Flutter Engine from ea72558be758 to 60a7bb2353b6 (2 revisions) (flutter#149623) Place `flutter_gpu` in the package cache. (flutter#149299) Switch to triage-* labels for platform package triage (flutter#149614) Roll pub packages (flutter#149617) Fixes multi line textfield hint text gets ellipsized (flutter#148423) Support failures-only and silent reporters in `flutter test` (flutter#148739) [CupertinoActionSheet] Fix overflow of the overscroll section when the user scrolls far (flutter#149542) Fix InputDecorator.prefixIcon color when disabled (flutter#149595) Added filter callback on dropdown menu (flutter#143939) update generated localized message files in the stocks test app (flutter#148741) Add a simplified SimpleCascadingMenuApp example (flutter#149147) Reland "Prevent LayoutBuilder from rebuilding more than once (flutter#147856)" (flutter#149303) Move some benchmarks from MotoG4 to Mokey (flutter#149567) Roll Packages from d8e8e8c to 11e192a (2 revisions) (flutter#149596) Cleanup triage reports from docs/ (flutter#149545) Roll Flutter Engine from d81edf635a9f to ea72558be758 (1 revision) (flutter#149590) Roll Flutter Engine from b0f4d7459708 to d81edf635a9f (1 revision) (flutter#149468) Roll Flutter Engine from 40b868efcc46 to b0f4d7459708 (1 revision) (flutter#149467) ...
hello-coder-xu
added a commit
to hello-coder-xu/flutter
that referenced
this pull request
Jun 6, 2024
…pdate * master: (168 commits) Fix the scrolling layout deviation of `CupertinoActionSheet` (flutter#149439) Roll Flutter Engine from 60a7bb2353b6 to a6aa5d826649 (2 revisions) (flutter#149627) Roll Flutter Engine from ea72558be758 to 60a7bb2353b6 (2 revisions) (flutter#149623) Place `flutter_gpu` in the package cache. (flutter#149299) Switch to triage-* labels for platform package triage (flutter#149614) Roll pub packages (flutter#149617) Fixes multi line textfield hint text gets ellipsized (flutter#148423) Support failures-only and silent reporters in `flutter test` (flutter#148739) [CupertinoActionSheet] Fix overflow of the overscroll section when the user scrolls far (flutter#149542) Fix InputDecorator.prefixIcon color when disabled (flutter#149595) Added filter callback on dropdown menu (flutter#143939) update generated localized message files in the stocks test app (flutter#148741) Add a simplified SimpleCascadingMenuApp example (flutter#149147) Reland "Prevent LayoutBuilder from rebuilding more than once (flutter#147856)" (flutter#149303) Move some benchmarks from MotoG4 to Mokey (flutter#149567) Roll Packages from d8e8e8c to 11e192a (2 revisions) (flutter#149596) Cleanup triage reports from docs/ (flutter#149545) Roll Flutter Engine from d81edf635a9f to ea72558be758 (1 revision) (flutter#149590) Roll Flutter Engine from b0f4d7459708 to d81edf635a9f (1 revision) (flutter#149468) Roll Flutter Engine from 40b868efcc46 to b0f4d7459708 (1 revision) (flutter#149467) ...
hello-coder-xu
added a commit
to hello-coder-xu/flutter
that referenced
this pull request
Jun 9, 2024
…pdate * master: (181 commits) Fix the scrolling layout deviation of `CupertinoActionSheet` (flutter#149439) Roll Flutter Engine from 60a7bb2353b6 to a6aa5d826649 (2 revisions) (flutter#149627) Roll Flutter Engine from ea72558be758 to 60a7bb2353b6 (2 revisions) (flutter#149623) Place `flutter_gpu` in the package cache. (flutter#149299) Switch to triage-* labels for platform package triage (flutter#149614) Roll pub packages (flutter#149617) Fixes multi line textfield hint text gets ellipsized (flutter#148423) Support failures-only and silent reporters in `flutter test` (flutter#148739) [CupertinoActionSheet] Fix overflow of the overscroll section when the user scrolls far (flutter#149542) Fix InputDecorator.prefixIcon color when disabled (flutter#149595) Added filter callback on dropdown menu (flutter#143939) update generated localized message files in the stocks test app (flutter#148741) Add a simplified SimpleCascadingMenuApp example (flutter#149147) Reland "Prevent LayoutBuilder from rebuilding more than once (flutter#147856)" (flutter#149303) Move some benchmarks from MotoG4 to Mokey (flutter#149567) Roll Packages from d8e8e8c to 11e192a (2 revisions) (flutter#149596) Cleanup triage reports from docs/ (flutter#149545) Roll Flutter Engine from d81edf635a9f to ea72558be758 (1 revision) (flutter#149590) Roll Flutter Engine from b0f4d7459708 to d81edf635a9f (1 revision) (flutter#149468) Roll Flutter Engine from 40b868efcc46 to b0f4d7459708 (1 revision) (flutter#149467) ...
hello-coder-xu
added a commit
to hello-coder-xu/flutter
that referenced
this pull request
Jun 11, 2024
* master: (181 commits) Fix the scrolling layout deviation of `CupertinoActionSheet` (flutter#149439) Roll Flutter Engine from 60a7bb2353b6 to a6aa5d826649 (2 revisions) (flutter#149627) Roll Flutter Engine from ea72558be758 to 60a7bb2353b6 (2 revisions) (flutter#149623) Place `flutter_gpu` in the package cache. (flutter#149299) Switch to triage-* labels for platform package triage (flutter#149614) Roll pub packages (flutter#149617) Fixes multi line textfield hint text gets ellipsized (flutter#148423) Support failures-only and silent reporters in `flutter test` (flutter#148739) [CupertinoActionSheet] Fix overflow of the overscroll section when the user scrolls far (flutter#149542) Fix InputDecorator.prefixIcon color when disabled (flutter#149595) Added filter callback on dropdown menu (flutter#143939) update generated localized message files in the stocks test app (flutter#148741) Add a simplified SimpleCascadingMenuApp example (flutter#149147) Reland "Prevent LayoutBuilder from rebuilding more than once (flutter#147856)" (flutter#149303) Move some benchmarks from MotoG4 to Mokey (flutter#149567) Roll Packages from d8e8e8c to 11e192a (2 revisions) (flutter#149596) Cleanup triage reports from docs/ (flutter#149545) Roll Flutter Engine from d81edf635a9f to ea72558be758 (1 revision) (flutter#149590) Roll Flutter Engine from b0f4d7459708 to d81edf635a9f (1 revision) (flutter#149468) Roll Flutter Engine from 40b868efcc46 to b0f4d7459708 (1 revision) (flutter#149467) ...
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
autosubmit
Merge PR when tree becomes green via auto submit App
f: cupertino
flutter/packages/flutter/cupertino repository
framework
flutter/packages/flutter repository. See also f: labels.
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.
This PR changes
CupertinoActionSheet's layout algorithm, so that the actions section always has the lower priority to take up vertical space with a fixed minimum height of 84.3 px.Currently
CupertinoActionSheetuses a very complicated rule the determine the sizes of various sections:actionsMinHeightfor the actions section.This has been the case since
CupertinoActionSheetwas first introduced (first PR). Maybe it was the case before, but it's no longer reproducible on the latest SwiftUI.The following images for comparison (left to right: Current Flutter, Flutter after this PR, SwiftUI). Pay attention to whether the actions section scrolls. (There are also some height/padding issues, which will be fixed in a future PR.)
Two buttons:

Three buttons:

Four buttons:

In SwiftUI, the action section seems to always have a minimum height of ~84 pixels regardless of the number of buttons. Therefore this PR also fixed this behavior, and adjusted the related tests.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.