Repository navigation
feat: add TextField text_input_action keyword - #30
Merged
Merged
Conversation
Accept text_input_action on the Material, Cupertino and platform TextField schemas so Ruby can choose the keyboard return key and move focus to the next field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Engine counterpart: AdamMusa/ruflet-engine#14
What
Adds the
text_input_actionkeyword to TextField so a Ruby app can choose the keyboard's return key and chain fields with Next/Done.Keywords and events
text_input_action(String or Symbol; nil means the platform default). Values:done go search send next previous newline unspecified none continueAction join route emergencyCall, in camelCase or snake_case.TextFieldControland the legacyCupertinoTextFieldControlKEYWORDS (sorted). The platformTextFieldControlcontract unions both, sotext_field(...)andcupertino_text_field(...)accept it.on_submitreceives the text and now also fires when the keyboard moves to the next field.Material vs Cupertino (client side, see engine PR)
Both renderers pass the action to the native field. Actions the device keyboard does not support fall back to the default: Android drops
continueAction join route emergencyCall, iOS dropsnone previous.next/previousmove focus to the adjacent field.multiline: trueplus an ending action (for exampledoneorsend) submits on Return instead of inserting a newline.Tests
test/text_input_action_compatibility_test.rb(6 runs, 19 assertions) covers:text_fieldserializestext_input_actionfor strings and symbols, and omits it by default.cupertino_text_fieldstill emits wire typeTextField.on_submitkeeps the handler.ArgumentError.verify_pr.shwith the engine PR: