-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Add the focus state related methods to the platform dispatcher #49841
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 "@test-exemption-reviewer" in 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. |
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.
I like the structure of this API now. I mostly have suggestions for improving the docs.
@gspencergoog Should also take a look at this in case he ends up implementing the framework side that will consume this API.
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.
API LGTM
lib/web_ui/test/engine/platform_dispatcher/platform_dispatcher_test.dart
Show resolved
Hide resolved
lib/ui/platform_dispatcher.dart
Outdated
|
||
/// Represents the focus state of a given [FlutterView]. | ||
/// | ||
/// This enum will be associated with a [FlutterView] by instantiating a [ViewFocusEvent]. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This PR is causing analysis to fail in snippet code on rolling to the framework: https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/73029/overview. I added the |
|
…er" (#50268) Reverts #49841 Initiated by: zanderso This change reverts the following previous change: Original Description: This change augments the platform dispatcher to allow the engine <===> framework to communicate flutter and platform focus changes. Relevant Issues are: * Design doc link: https://github.com/flutter/website/actions/runs/7560898849/job/20588395967 * Design doc: flutter/flutter#141711 * Focus in web multiview: flutter/flutter#137443 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Oops, thanks for catching this. @zanderso is there any reason we don't have those linter checks enabled as part of the engine commit process? |
…142783) flutter/engine@dd4c79a...b35153d 2024-02-02 skia-flutter-autoroll@skia.org Manual roll Dart SDK from 82936dcdaf4f to 5a5d4c262200 (2 revisions) (flutter/engine#50264) 2024-02-01 dkwingsmt@users.noreply.github.com Remove number of arguments from defining Dart FFI (flutter/engine#50153) 2024-02-01 32242716+ricardoamador@users.noreply.github.com Refactor the linux_android targets to make use of recent changes to android virtual device params (flutter/engine#50099) 2024-02-01 goderbauer@google.com Re-add tests deleted on accident (flutter/engine#50223) 2024-02-01 30870216+gaaclarke@users.noreply.github.com [Impeller] updated todos from opengles golden work (flutter/engine#50218) 2024-02-01 flar@google.com Get bounds from RTree in DLBuilder::Build() (flutter/engine#50253) 2024-02-01 chinmaygarde@google.com [Impeller] Remove unused define. (flutter/engine#50250) 2024-02-01 tugorez@users.noreply.github.com Add the focus state related methods to the platform dispatcher (flutter/engine#49841) 2024-02-01 jason-simmons@users.noreply.github.com Fix the output paths of the Web esbuild GN template (flutter/engine#50188) 2024-02-01 chinmaygarde@google.com [Impeller] Delete unnecessary special casing for Vulkan in framebuffer fetch. (flutter/engine#50251) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC matanl@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Also is there an easy way to verify these things locally? |
I'm not familiar with how the snippet analysis is implemented. I vaguely recall that @gspencergoog might know more about this. |
These changes were originally landed on #49841 but reverted in 0eb7b10. I fixed the offending dart snippets and (think) they now will work without issues (I think I was able to verify them locally by manually patching my bin/cache/... copy of these files with these changes). Relevant Issues are: * Design doc link: https://github.com/flutter/website/actions/runs/7560898849/job/20588395967 * Design doc: flutter/flutter#141711 * Focus in web multiview: flutter/flutter#137443 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
Snippet analysis happens in Perhaps that script should be added as part of the presumbits that the engine runs on the Flutter repo? |
…0177) Make the flutter web engine publish view focus events. Relevant Issues are: * Design doc link: https://github.com/flutter/website/actions/runs/7560898849/job/20588395967 * Design doc: flutter/flutter#141711 * Focus in web multiview: flutter/flutter#137443 * Platform dispatcher changes: #49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
#50533) Rename [ViewFocusDirection.backwards] to [ViewFocusDirection.backward] Relevant Issues are: Design doc link: https://github.com/flutter/website/actions/runs/7560898849/job/20588395967 Design doc: flutter/flutter#141711 Focus in web multiview: flutter/flutter#137443 Platform dispatcher changes: #49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Move the accesibility placeholder to the platform dispatcher. This change makes the platform dispatcher append a single accesibility placeholder, per app, to the `<body />`. Previous behavior was to insert a placeholder inside each `<flutter-view />` Relevant Issues are: * Design doc: https://flutter.dev/go/focus-management * Focus in web multiview: flutter/flutter#137443 * Platform dispatcher changes: #49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
…#50610) Make the view focus binding report focus transitions across elements. Previously the web engine reported all the focusin/focusout events as if the elements were first blurred before moving the focus. Relevant Issues are: * Design doc: https://flutter.dev/go/focus-management * Focus in web multiview: flutter/flutter#137443 * Platform dispatcher changes: #49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Add view focus direction detection to flutter web. Relevant Issues are: * Design doc: https://flutter.dev/go/focus-management * Focus in web multiview: flutter/flutter#137443 * Platform dispatcher changes: #49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Prepends the accesibility placeholder. Previously it was being appended (last child) to the body. Relevant Issues are: * Design doc: https://flutter.dev/go/focus-management * Focus in web multiview: flutter/flutter#137443 * Platform dispatcher changes: #49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
) Mark the Flutter View as focusable by setting a tabindex value. * When a given flutter view is focused its tabindex will be `-1` * When a given flutter view is not focused its tabindex will be `0` * When semantics are enabled no tabindex will be set. Relevant Issues are: * Design doc: https://flutter.dev/go/focus-management * Focus in web multiview: flutter/flutter#137443 * Platform dispatcher changes: #49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Implement PlatformDispatcher.requestViewFocusChange on web. Relevant Issues are: * Design doc: https://flutter.dev/go/focus-management * Focus in web multiview: flutter/flutter#137443 * Platform dispatcher changes: #49841 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This change augments the platform dispatcher to allow the engine <===> framework to communicate flutter and platform focus changes.
Relevant Issues are:
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.