-
Notifications
You must be signed in to change notification settings - Fork 29.7k
SelectionArea on iOS should toggle the context menu when tapping on the previous selection #132851
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
Conversation
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, just have a question
| () => TapGestureRecognizer(debugOwner: this), | ||
| (TapGestureRecognizer instance) { | ||
| instance.onTap = _clearSelection; | ||
| instance.onTapUp = (TapUpDetails details) { |
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 would this interact with the tap to collapse selection in the previous pr?
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.
It would look something like this, replacing the else branch with the _clearSelection.
instance.onTapUp = (TapUpDetails details) {
if (defaultTargetPlatform == TargetPlatform.iOS && _positionIsOnActiveSelection(globalPosition: details.globalPosition)) {
// On iOS when the tap occurs on the previous selection instead of
// moving the selection, the context menu will be toggled.
final bool toolbarIsVisible = _selectionOverlay?.toolbarIsVisible ?? false;
if (toolbarIsVisible) {
hideToolbar(false);
} else {
_showToolbar(location: details.globalPosition);
}
} else {
hideToolbar();
_selectPositionAt(offset: details.globalPosition);
}
};This toggle behavior still holds true even with the collapsing selection at single tap pr.
justinmc
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 👍
| instance.onTap = _clearSelection; | ||
| instance.onTapUp = (TapUpDetails details) { | ||
| if (defaultTargetPlatform == TargetPlatform.iOS && _positionIsOnActiveSelection(globalPosition: details.globalPosition)) { | ||
| // On iOS when the tap occurs on the previous selection instead of |
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.
Super readability nit:
| // On iOS when the tap occurs on the previous selection instead of | |
| // On iOS when the tap occurs on the previous selection, instead of |
|
auto label is removed for flutter/flutter/132851, due to - The status or check suite Linux web_canvaskit_tests_0 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…ing on the previous selection (flutter/flutter#132851)
…ing on the previous selection (flutter/flutter#132851)
flutter/flutter@5a556f8...6f227c0 2023-08-19 [email protected] Space character should be optional when tree shaking fonts (flutter/flutter#132880) 2023-08-19 [email protected] Roll Flutter Engine from 654d3a2c8494 to f4bffdcf8536 (5 revisions) (flutter/flutter#132876) 2023-08-18 [email protected] SelectionArea on iOS should toggle the context menu when tapping on the previous selection (flutter/flutter#132851) 2023-08-18 [email protected] Forward port API docs creation realm handling from prior script (flutter/flutter#132867) 2023-08-18 [email protected] Roll Flutter Engine from 72c4e61fdbfa to 654d3a2c8494 (3 revisions) (flutter/flutter#132868) 2023-08-18 [email protected] Roll Flutter Engine from 83fdadaf12f0 to 72c4e61fdbfa (2 revisions) (flutter/flutter#132861) 2023-08-18 [email protected] Updates app link gradle tasks and remove vm services (flutter/flutter#131805) 2023-08-18 [email protected] Roll Flutter Engine from 58f7d8ee3e2c to 83fdadaf12f0 (7 revisions) (flutter/flutter#132857) 2023-08-18 [email protected] doc: add flag params (flutter/flutter#132485) 2023-08-18 [email protected] Add a new MatrixTransition and refactor ScaleTransition and RotationT� (flutter/flutter#131084) 2023-08-18 [email protected] fixes l10n for CupertinoDatePicker in monthYear mode (flutter/flutter#130934) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…ing on the previous selection (flutter/flutter#132851)
Screen.Recording.2023-08-18.at.2.34.33.AM.mov
Related: #129583
Pre-launch Checklist
///).