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
Improve DropdownMenu sample code for requestFocusOnTap on mobile platforms #134867
Improve DropdownMenu sample code for requestFocusOnTap on mobile platforms #134867
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
This looks good. Could you help to add a test in |
55b529f
to
d4d74f7
Compare
@QuncCccccc Thanks for taking a look. I just added a new test at |
Just curious why do we want to create a new file for the same sample file🙂? From my observation, seems there is only on test file for a specific sample file, so maybe we can just follow this pattern:) But let me know if there's any other concerns. |
d4d74f7
to
c2ccdd6
Compare
Ah, I thought it would look neater because I saw |
…screen virtual keyboard on mobile platforms Signed-off-by: Nguyen Huy <huy@nevercode.io>
c2ccdd6
to
aacfe45
Compare
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! Thanks for the improvement:)
flutter/flutter@1b18b13...b7d0e8c 2023-09-18 engine-flutter-autoroll@skia.org Roll Packages from bc8c2f2 to d4e2454 (6 revisions) (flutter/flutter#134945) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4107ee0dc8b1 to be7a039c5451 (1 revision) (flutter/flutter#134937) 2023-09-18 dacoharkes@google.com Native assets support for Linux (flutter/flutter#134031) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 77965cabbaf9 to 4107ee0dc8b1 (1 revision) (flutter/flutter#134927) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 75e5ba3c4671 to 77965cabbaf9 (1 revision) (flutter/flutter#134925) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 573e44b91887 to 75e5ba3c4671 (1 revision) (flutter/flutter#134923) 2023-09-18 104349824+huycozy@users.noreply.github.com Improve DropdownMenu sample code for requestFocusOnTap on mobile platforms (flutter/flutter#134867) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 51a402860f5b to 573e44b91887 (1 revision) (flutter/flutter#134920) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from f53681fb2220 to 51a402860f5b (1 revision) (flutter/flutter#134918) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9f3e46a21e51 to f53681fb2220 (1 revision) (flutter/flutter#134916) 2023-09-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 57a4ff3c7ff8 to 9f3e46a21e51 (1 revision) (flutter/flutter#134909) 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 dit@google.com,rmistry@google.com,stuartmorgan@google.com 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
…forms (flutter#134867) ### Description This PR is to improve `DropdownMenu` sample code. By default, `requestFocusOnTap` is false on mobile platforms. When users run API sample code on mobile platforms, they can not edit the text field and think it is a bug. Although it is detailed at https://api.flutter.dev/flutter/material/DropdownMenu/requestFocusOnTap.html, users often do not pay attention to it. ### Related issue Fixes flutter#127672
…r#4944) flutter/flutter@1b18b13...b7d0e8c 2023-09-18 engine-flutter-autoroll@skia.org Roll Packages from bc8c2f2 to d4e2454 (6 revisions) (flutter/flutter#134945) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4107ee0dc8b1 to be7a039c5451 (1 revision) (flutter/flutter#134937) 2023-09-18 dacoharkes@google.com Native assets support for Linux (flutter/flutter#134031) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 77965cabbaf9 to 4107ee0dc8b1 (1 revision) (flutter/flutter#134927) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 75e5ba3c4671 to 77965cabbaf9 (1 revision) (flutter/flutter#134925) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 573e44b91887 to 75e5ba3c4671 (1 revision) (flutter/flutter#134923) 2023-09-18 104349824+huycozy@users.noreply.github.com Improve DropdownMenu sample code for requestFocusOnTap on mobile platforms (flutter/flutter#134867) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 51a402860f5b to 573e44b91887 (1 revision) (flutter/flutter#134920) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from f53681fb2220 to 51a402860f5b (1 revision) (flutter/flutter#134918) 2023-09-18 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9f3e46a21e51 to f53681fb2220 (1 revision) (flutter/flutter#134916) 2023-09-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 57a4ff3c7ff8 to 9f3e46a21e51 (1 revision) (flutter/flutter#134909) 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 dit@google.com,rmistry@google.com,stuartmorgan@google.com 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
Description
This PR is to improve
DropdownMenu
sample code. By default,requestFocusOnTap
is false on mobile platforms. When users run API sample code on mobile platforms, they can not edit the text field and think it is a bug. Although it is detailed at https://api.flutter.dev/flutter/material/DropdownMenu/requestFocusOnTap.html, users often do not pay attention to it.Related issue
Fixes #127672
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.