Skip to content

Conversation

@zemanux
Copy link
Contributor

@zemanux zemanux commented Jan 5, 2026

Fix #180534

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 this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) f: scrolling Viewports, list views, slivers, etc. labels Jan 5, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the semantics testing matchers by introducing a new isSemantics matcher and deprecating the existing containsSemantics matcher. The isSemantics function is a rename of containsSemantics to better align with Dart's matcher naming conventions. The deprecated containsSemantics now delegates to isSemantics for backward compatibility. All usages across the test suite have been updated to the new isSemantics matcher.

@loic-sharma
Copy link
Member

Thanks for going the extra mile! Could you also add an automated fix for this migration?

You'll need to add or edit a YAML file in this directory: https://github.com/flutter/flutter/tree/master/packages/flutter_test/lib/fix_data/fix_flutter_test

Here are the instructions for a renamed function: https://github.com/flutter/flutter/blob/master/docs/contributing/Data-driven-Fixes.md#rename-a-method

@zemanux zemanux force-pushed the rename_contains_semantics branch from 60fe9a6 to 791c162 Compare January 6, 2026 07:52
@github-actions github-actions bot added the c: tech-debt Technical debt, code quality, testing, etc. label Jan 6, 2026
@zemanux
Copy link
Contributor Author

zemanux commented Jan 6, 2026

Thanks for going the extra mile! Could you also add an automated fix for this migration?

You'll need to add or edit a YAML file in this directory: https://github.com/flutter/flutter/tree/master/packages/flutter_test/lib/fix_data/fix_flutter_test

Here are the instructions for a renamed function: https://github.com/flutter/flutter/blob/master/docs/contributing/Data-driven-Fixes.md#rename-a-method

Done.

@zemanux zemanux force-pushed the rename_contains_semantics branch 3 times, most recently from 89be0f2 to 38d522b Compare January 6, 2026 13:22
@zemanux zemanux force-pushed the rename_contains_semantics branch from 38d522b to a671104 Compare January 6, 2026 14:07
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM, according to our breaking change policy, you also need to add a migration guide in here https://github.com/flutter/website/tree/main/src/content/release/breaking-changes

Here is the policy just FYI https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes

@loic-sharma
Copy link
Member

Google testing failures look unrelated to this change. Rerunning...

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up, excellent work!

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 6, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Jan 6, 2026
@chunhtai chunhtai removed this pull request from the merge queue due to a manual request Jan 6, 2026
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 6, 2026
@chunhtai
Copy link
Contributor

chunhtai commented Jan 6, 2026

I think we need to wait for the migration guide to land first

@chunhtai
Copy link
Contributor

chunhtai commented Jan 6, 2026

oh nvm, looks like the breaking change policy says the land the change first

@zemanux
Copy link
Contributor Author

zemanux commented Jan 7, 2026

LGTM, according to our breaking change policy, you also need to add a migration guide in here https://github.com/flutter/website/tree/main/src/content/release/breaking-changes

Here is the policy just FYI https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes

PR flutter/website#12891 created.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 7, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Jan 7, 2026
sfshaza2 pushed a commit to flutter/website that referenced this pull request Jan 7, 2026
_Issues fixed by this PR (if any):_
flutter/flutter#180534
_PRs or commits this PR depends on (if any):_
flutter/flutter#180538

cc @loic-sharma @chunhtai 

## Presubmit checklist

- [X] If you are unwilling, or unable, to sign the CLA, even for a
_tiny_, one-word PR, please file an issue instead of a PR.
- [X] If this PR is not meant to land until a future stable release,
mark it as draft with an explanation.
- [X] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style)—for example, it doesn't
use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first-person
pronouns).
- [X] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
  of 80 characters or fewer.

---------

Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
Merged via the queue into flutter:master with commit 5d46d0f Jan 7, 2026
73 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 7, 2026
@zemanux zemanux deleted the rename_contains_semantics branch January 8, 2026 06:17
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 8, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 8, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 8, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 8, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 9, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 9, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 9, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 9, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 10, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 10, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 10, 2026
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) a: tests "flutter test", flutter_test, or one of our tests a: text input Entering text in a text field or keyboard related problems c: tech-debt Technical debt, code quality, testing, etc. f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal] Create naming conventions for partial & exact matchers

3 participants