-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
[text_input] introduce TextInputControl #76072
Conversation
I'm still not 100% sure about it, but I have considered autofill a visual thing because the
|
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.
Overall I think this approach looks good and should handle the problems we encountered in the last PR. It's nice that this will make it possible to solve #16863.
I think I definitely want to see an example of what a virtual keyboard would look like using this code. I commented about that. Otherwise my comments are just a few questions and small stuff.
I'm interested in @LongCatIsLooong's opinion from an autofill perspective.
Thank you for the review!
I noticed this comment in Requests the system autofill UI to appear. It would be a problem if multiple text input controls tried to show autofill UI, which is why I ended up placing the autofill functionality to |
(PR triage): @jpnurmi @LongCatIsLooong @justinmc Are there still plans for this before it becomes too stale? |
I'll get back to this. I was waiting for comments/feedback because I hadn't noticed the thumbs up above. |
@jpnurmi Can you fix the conflicts with master? Sorry, that's probably our fault for not giving you a final review fast enough. |
There's a failure but it looks like an infrastructure problem, rerunning... |
Is there anything I could do to get things rolling? |
Sorry for the delay. Looks good to me in general. |
Hi @mdebbar would you like to take a look at this? I think this change may have implications on the web. |
This PR is based on the idea that the In other words, installing a custom text input control on Web blocks platform text input e.g. physical keyboard. |
Would it be an option to change it so that the editing state is controlled from |
A potential web-compatible solution:
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode |
902bde0
to
09a4314
Compare
Experimental engine changes for Linux: jpnurmi/engine@387e5c4 |
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 👍 , but I think we should add a test for the example if you're up for it. The situation with breaking changes looks good now!
@justinmc thank you! 🎉 |
This reverts commit 2fdfa29.
@itsjustkevin so this PR got removed and no follow up? Why does it break? We are longing for this feature. |
@itsjustkevin @jpnurmi Can we/the community help on the related issues on why it causes breakages? |
@Eerey I wasn't aware of the revert but notice that it was closed without merging.
@itsjustkevin What was the problem? Is this change still causing issues somewhere or was it a false alarm? |
This was a breaking change. I'm not sure why this PR didn't fail on the customer testing shard, but it is now blocking Engine rolls into the framework. See: #113666. In particular super_editor is failing due to https://github.com/superlistapp/super_editor/blob/main/super_editor/lib/src/default_editor/document_input_ime.dart#L75. |
The functionality provided by this PR makes it possible to replace the default platform text input control with a custom in-app virtual keyboard on platforms that do not have a system-provided keyboard.
This PR adds:
TextInputControl
, a mixin that receives text input state changes and visual text input control requests from the framework, and communicates user input back to the framework.TextInput.setInputControl()
, a method to set a custom (or null, which solves Request: Add option to not open keyboard on TextField focus #16863) text input controlTextInput.restorePlatformTextInputControl()
, a method to restore the default platform text input controlBased on the lessons learned from the previous failed attempt (#69146), the method channel-based platform text input control continues to receive text input state changes even when a custom text input control is installed. This ensures that after installing a custom input control, the platform text input continues to work and the underlying input model stays in sync.
Fixes #68988
Pre-launch Checklist
///
).