Skip to content
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

Recommended implementation of combining characters implementation. #7758

Merged

Conversation

matthew-carroll
Copy link
Contributor

This is a recommended approach to achieve the behavior in #7722 without introducing state into the KeyEventChannel.

The approach in this recommendation roughly follows the breakdown that can be seen between TextInputPlugin and TextInputChannel as well as AccessibilityBridge and AccessibilityChannel. At the moment those examples are only visible, themselves, in another PR:
#7738

Specific recommendations in this PR:

  • Utilize channels as stateless definitions of boundary APIs and message structures
  • Introduce a dedicated class responsible for mutating information over time that flows through a given channel
  • Define a FlutterKeyEvent which explicitly declares all of the information that Flutter might want for a key event, regardless of what Android reports in its standard KeyEvent
  • Don't use Hungarian notation (mSomething, sSomething)
  • I also renamed combiningCharacters to baseCharacter based on my reading of the javadocs. That might be wrong. The crux of the issue is that I'm not (and probably most people are not) familiar with this level of key encoding behavior. Therefore, I would recommend excessively commenting this new code with links to relevant docs and/or explanations of these concepts that an average reader may have never heard of.

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all makes sense, thanks! Did you want to finish it, or would you rather I moved this into my PR and finished it up? Either way is fine for me.

@matthew-carroll
Copy link
Contributor Author

@gspencergoog I can go ahead and clean this up and pending your final review we can merge this in. Other than your comments above, is there anything else that needs to be addressed before you'd be happy with a merge?

@gspencergoog
Copy link
Contributor

Ok, sounds good. The only other thing I can think of to address is having a test.

@matthew-carroll
Copy link
Contributor Author

Unfortunately, we still have no testing infrastructure in the engine embedding. Literally none of the Java code is tested....

@gspencergoog
Copy link
Contributor

OK, then that's it, I guess. Thanks!

@matthew-carroll
Copy link
Contributor Author

@gspencergoog I gave it another pass. Please let me know if the comments, names, and implementation look acceptable.

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modulo the one small nit. Thanks!

@matthew-carroll matthew-carroll merged commit 4663d35 into flutter:master Feb 11, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 12, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Feb 12, 2019
flutter/engine@3a1a604...4663d35

git log 3a1a604..4663d35 --no-merges --oneline
4663d35 Recommended implementation of combining characters implementation. (flutter/engine#7758)
d521212 Revert "Roll src/third_party/dart fdfe40ea95..de2e7e7721 (7 commits)" (flutter/engine#7789)
a003c46 Roll src/third_party/dart fdfe40ea95..de2e7e7721 (7 commits)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff (chinmaygarde@google.com), and stop
the roller if necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants