[autofill] opt-out instead of opt-in#86312
Conversation
- fixes flutter#85554 To opt-out, specify a null `autofillHints`. Additionally, allows high-level text input widgets to pass an `AutofillClient` to `EditableText`. This allows these widgets to provide additional autofill information that `EditableTextState` usually does not have access to (for instance, the placeholder text).
bab644c to
2f07d16
Compare
|
Gold has detected about 4 new digest(s) on patchset 3. |
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
justinmc
left a comment
There was a problem hiding this comment.
LGTM. One question about hintText. I really think making this opt-out is a great idea, it should make many Flutter apps much more likely to have working autofill.
| uniqueIdentifier: autofillId, | ||
| autofillHints: autofillHints, | ||
| currentEditingValue: _effectiveController.value, | ||
| hintText: widget.placeholder, |
There was a problem hiding this comment.
What is hintText actually used for, I guess somewhere in the engine already? I understand autofillHints is the main list of hints that's used by the platform to determine what to autofill.
There was a problem hiding this comment.
AFAIK currently we don't send the hint text (expect maybe for semantics). The reason the text input plugin needs it is when the autofill hints list is empty it's a good indication for what the text field is actually for: #85554
| /// The optional hint text placed on the view that typically suggests what | ||
| /// sort of input the field accepts. |
There was a problem hiding this comment.
I asked about hintText above, maybe these docs need some more info. I could see someone confusing this for autofillHints if they saw this first.
|
@LongCatIsLooong I think the Linux failures may be infrastructure flakes? Not sure about Google testing failures. Also you have conflicts FYI. |
a06ab7e to
876dcb3
Compare
876dcb3 to
e57b3d3
Compare
To opt-out, specify a null
autofillHints.Additionally, allows high-level text input widgets to pass an
AutofillClienttoEditableText. This allows these widgets to provideadditional autofill information that
EditableTextStateusually doesnot have access to (for instance, the placeholder text).
Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.
List which issues are fixed by this PR. You must list at least one issue.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.