-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Prepare ShortcutActivator and ShortcutManager to migrate to KeyEvent from RawKeyEvent.
#136854
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
1d89e14 to
440bd00
Compare
0907ccc to
f1162dd
Compare
|
Okay, I updated this so that it just breaks things. I have to say that it seems cleaner than the other way. I didn't implement the accepts on |
|
Thanks for changing If we really want to enable auto fixing, we can:
|
Since the two functions have the same signature, and only differ in implementation, any "quick fix" applied would just rename the call, and wouldn't be able to address any difference in functionality anyhow. For instance, if I have a subclass that always returns true from |
|
I'm a little worried that the triggers change might be too subtle for people to understand easily and make it hard to migrate. I mean, it's not too complicated, but I find it hard to justify the churn for the benefit. It is nice to make the triggers optional, and I like that it opens up the algorithm possibilities in the accepts function, but it's a small change that will take a lot of explaining. |
92a7157 to
5ca625f
Compare
5ca625f to
8a88a9e
Compare
a54486c to
da944a2
Compare
|
@goderbauer and @dkwingsmt can you take another look here: I think this is ready to be submitted. I'll be commenting out the super_editor customer tests and passing the presubmit before I submit, followed by submitting the fix to super_editor before I turn them back on. I wanted to make sure you're OK with this change before I started that process, however, to keep them commented out for as short a time as possible. |
goderbauer
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
## Description This temporarily disables the super_editor tests while flutter/flutter#136854 and Flutter-Bounty-Hunters/super_editor#1593 are landed, to avoid a lot of churn in the super_editor repo. ## Related Issues - flutter/flutter#136419
da944a2 to
075d0dd
Compare
075d0dd to
41d2a46
Compare
…to `KeyEvent` from `RawKeyEvent`. (flutter/flutter#136854)
Roll Flutter from e8c2bb1 to 53a57ad (39 revisions) flutter/flutter@e8c2bb1...53a57ad 2023-11-16 [email protected] Roll Flutter Engine from 8ab189b77b8d to 2e9f0df868b3 (1 revision) (flutter/flutter#138543) 2023-11-16 [email protected] Roll Flutter Engine from 622fa0614412 to 8ab189b77b8d (1 revision) (flutter/flutter#138533) 2023-11-16 [email protected] [flutter_tools] - Add `queries` section to Android manifest file (flutter/flutter#137207) 2023-11-16 [email protected] Roll Flutter Engine from 8aff9c134b8f to 622fa0614412 (1 revision) (flutter/flutter#138532) 2023-11-16 [email protected] Roll Flutter Engine from 3cfcdebe8623 to 8aff9c134b8f (18 revisions) (flutter/flutter#138529) 2023-11-16 [email protected] Roll Flutter Engine from 30327eae0802 to 3cfcdebe8623 (1 revision) (flutter/flutter#138515) 2023-11-15 [email protected] Catch error for missing directory in `FontConfigManager` (flutter/flutter#138496) 2023-11-15 [email protected] Make `UnderlineInputBorder` consistent (flutter/flutter#124153) 2023-11-15 [email protected] Prepare `ShortcutActivator` and `ShortcutManager` to migrate to `KeyEvent` from `RawKeyEvent`. (flutter/flutter#136854) 2023-11-15 [email protected] Pin package:web 0.4.0 (flutter/flutter#138428) 2023-11-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland VelocityTracker update (#132291)" (flutter/flutter#138512) 2023-11-15 [email protected] [web] skip flaky overflow_clipbehavior_none.cupertino.0.png golden check (flutter/flutter#138498) 2023-11-15 [email protected] Roll Flutter Engine from 7c2b8d520b3d to 30327eae0802 (2 revisions) (flutter/flutter#138502) 2023-11-15 [email protected] Reland VelocityTracker update (#132291) (flutter/flutter#137381) 2023-11-15 [email protected] Roll Flutter Engine from f58dac64ad1a to 7c2b8d520b3d (1 revision) (flutter/flutter#138499) 2023-11-15 [email protected] Fix 2D tap to stop scrolling (flutter/flutter#138442) 2023-11-15 [email protected] Roll Flutter Engine from d22d063ac9f6 to f58dac64ad1a (2 revisions) (flutter/flutter#138494) 2023-11-15 [email protected] SemanticOwner should dispatch creation and disposal events (flutter/flutter#138388) 2023-11-15 [email protected] Roll Flutter Engine from ecaf9442034d to d22d063ac9f6 (5 revisions) (flutter/flutter#138489) 2023-11-15 [email protected] Roll Packages from 428ba3e to 0cd2378 (1 revision) (flutter/flutter#138482) 2023-11-15 [email protected] Marks Mac_android hot_mode_dev_cycle__benchmark to be unflaky (flutter/flutter#138472) 2023-11-15 [email protected] Roll Flutter Engine from a7a48a68e6f8 to ecaf9442034d (1 revision) (flutter/flutter#138468) 2023-11-15 [email protected] Roll Flutter Engine from 976edd5192d1 to a7a48a68e6f8 (3 revisions) (flutter/flutter#138463) 2023-11-15 [email protected] Roll Flutter Engine from a7f2267dd1f4 to 976edd5192d1 (1 revision) (flutter/flutter#138462) 2023-11-15 [email protected] Roll Flutter Engine from bc5bbd3b9ebe to a7f2267dd1f4 (1 revision) (flutter/flutter#138459) 2023-11-15 [email protected] Roll Flutter Engine from d7ca057b891f to bc5bbd3b9ebe (2 revisions) (flutter/flutter#138457) 2023-11-15 [email protected] Roll Flutter Engine from 1347413470b7 to d7ca057b891f (1 revision) (flutter/flutter#138456) 2023-11-15 [email protected] Roll Flutter Engine from c5a067b637f4 to 1347413470b7 (5 revisions) (flutter/flutter#138452) 2023-11-15 [email protected] Reland [SingleChildScrollView] Correct the offset pixels if it is out of range during layout (flutter/flutter#136871) 2023-11-14 [email protected] Add to TableCell docs (flutter/flutter#138258) 2023-11-14 [email protected] Roll Flutter Engine from f15b259fe98c to c5a067b637f4 (4 revisions) (flutter/flutter#138441) 2023-11-14 49699333+dependabot[bot]@users.noreply.github.com Bump dessant/lock-threads from 4.0.1 to 5.0.0 (flutter/flutter#138437) 2023-11-14 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.5 to 2.22.6 (flutter/flutter#138438) 2023-11-14 [email protected] Roll Flutter Engine from eba757803a6f to f15b259fe98c (1 revision) (flutter/flutter#138429) 2023-11-14 [email protected] Roll Flutter Engine from 603bdd48df8a to eba757803a6f (3 revisions) (flutter/flutter#138425) 2023-11-14 [email protected] Unified analytics migration for `CodeSizeAnalysis` (flutter/flutter#138351) 2023-11-14 [email protected] Roll Flutter Engine from 777dcb99f6e0 to 603bdd48df8a (1 revision) (flutter/flutter#138421) 2023-11-14 [email protected] Run all tests in examples/ (flutter/flutter#138374) 2023-11-14 [email protected] Roll Flutter Engine from 1b3fd80812c3 to 777dcb99f6e0 (2 revisions) (flutter/flutter#138420) 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 `KeyEvent` from `RawKeyEvent`. (flutter/flutter#136854)
Description
This modifies methods in
ShortcutActivatorandShortcutManagerto takeKeyEventevents instead ofRawKeyEventevents, introducing a breaking change.Changes in this PR:
ShortcutActivator.acceptsso it takesKeyEvents instead ofRawKeyEvents.ShortcutActivator.isActivatedBy.ShortcutManager.handleKeypressto handleKeyEvents instead ofRawKeyEvents.Shortcutswidget to callFocus.onKeyEventinstead ofFocus.onKeyinternally.CallbackShortcutsto useKeyEvents instead ofRawKeyEvents.Breaking Change Migration Guide: https://docs.flutter.dev/release/breaking-changes/shortcut-key-event-migration
Related Issues
RawKeyEventandRawKeyboard, et al should be deprecated and removed #136419Tests