Skip to content

Adds set text semantics action to render editable#77024

Merged
chunhtai merged 8 commits into
flutter:masterfrom
chunhtai:issues/76827-type
Mar 10, 2021
Merged

Adds set text semantics action to render editable#77024
chunhtai merged 8 commits into
flutter:masterfrom
chunhtai:issues/76827-type

Conversation

@chunhtai

@chunhtai chunhtai commented Mar 2, 2021

Copy link
Copy Markdown
Contributor

Adds set text semantics action, this is required to support typing in voice access

This requires engine pr: flutter-team-archive/engine#24734

fixes #77271

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard Bot added a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) framework flutter/packages/flutter repository. See also f: labels. labels Mar 2, 2021
@google-cla google-cla Bot added the cla: yes label Mar 2, 2021
@chunhtai chunhtai requested a review from justinmc March 2, 2021 19:39

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Could you remove this assert and make the value parameter's type non-nullable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The setter and getter need to match, dart won't let you make a non-nullable with nullable getter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line is indented too far.

Comment on lines 3041 to 3042

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Weird indentation here, and commas are missing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does selection refer to here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: remove "either"?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if value is null, do we still need to addAction?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(This looks also buggy in the setter above)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Think a little bit more, I think not allowing null value makes more sense, it does not make sense for developer to assign action to semantics configuration in describeSemanticsConfigruation and later on remove it in the same method.

@chunhtai chunhtai force-pushed the issues/76827-type branch 3 times, most recently from 3b4ba51 to 428417d Compare March 10, 2021 17:52

@goderbauer goderbauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you use Object? instead of dynamic as type here?

@chunhtai chunhtai force-pushed the issues/76827-type branch from 8fadc3e to 1557a0e Compare March 10, 2021 22:54
@chunhtai chunhtai merged commit f91ed2a into flutter:master Mar 10, 2021
@chunhtai

Copy link
Copy Markdown
Contributor Author

google test fail because it is running against old version of engine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entering text does not work in android voice access

3 participants