-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Relax assertion for adding semantics locale #178140
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
Conversation
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.
Code Review
This pull request relaxes an assertion related to setting a locale on a SemanticsConfiguration, allowing it to be set even if it's not a semantic boundary. To prevent incorrect merging, a check is added to isCompatibleWith to ensure nodes with different locales are not merged. The changes are logical and are accompanied by a new test case to verify the behavior. I've found one minor issue regarding a documentation comment in a test utility file.
9f8a802 to
204ec0d
Compare
bb1e934 to
c98efb5
Compare
| SemanticsAction.paste, | ||
| SemanticsAction.setText, | ||
| SemanticsAction.moveCursorBackwardByWord, | ||
| children: <TestSemantics>[ |
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.
From the tests, it looks like sometimes there's a empty semantics node added in between the layers, why is that?
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.
it is a semantics node with locale: en-US, which I didn't add the test harness for this kind of semantics tree golden. It is also not the focus of these test. I don't want to make it more noisier than they are now
hannah-hyj
left a comment
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
c98efb5 to
bc0a74c
Compare
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> instead forcing a contain: true, uses isCompatibleWith to prevent implicit merge ## 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. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Manual roll Flutter from 6a1f5b7 to e25d71b (30 revisions) Manual roll requested by tarrinneal@google.com flutter/flutter@6a1f5b7...e25d71b 2025-12-10 jason-simmons@users.noreply.github.com Ensure that the engine converts std::filesystem::path objects to UTF-8 strings on Windows (flutter/flutter#179528) 2025-12-10 ybz975218925@gmail.com Fix the issue with pinned headers in nested SliverMainAxisGroup. (flutter/flutter#179132) 2025-12-10 Akashefrath@gmail.com added onUserInteractionIfError for form (flutter/flutter#175515) 2025-12-10 39942340+prash4931@users.noreply.github.com Fixed RenderFlex overflow in RouteObserver Example (flutter/flutter#170980) 2025-12-10 engine-flutter-autoroll@skia.org Roll Dart SDK from 17749965ec57 to 077062c5e515 (3 revisions) (flutter/flutter#179691) 2025-12-10 carapacik@gmail.com Manually roll characters (flutter/flutter#179447) 2025-12-10 engine-flutter-autoroll@skia.org Roll Packages from 338ecd3 to 74a5a53 (4 revisions) (flutter/flutter#179693) 2025-12-10 fluttergithubbot@gmail.com Marks Mac_ios draw_arcs_all_stroke_styles_perf_ios__timeline_summary to be unflaky (flutter/flutter#179669) 2025-12-10 jason-simmons@users.noreply.github.com Check for a null cached image in SingleFrameCodec::getNextFrame (flutter/flutter#179483) 2025-12-10 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from _pSztGZvEA3-Ry-GW... to u5vxWTRT0HlxOP5_r... (flutter/flutter#179652) 2025-12-10 robert.ancell@canonical.com Implement flutter/accessibility channel (flutter/flutter#179484) 2025-12-10 engine-flutter-autoroll@skia.org Roll Skia from 82fff05cc621 to e61cc6d073fd (4 revisions) (flutter/flutter#179646) 2025-12-10 ahmedsameha1@gmail.com Make sure that a CupertinoDialogAction doesn't crash in 0x0 environment (flutter/flutter#178956) 2025-12-10 matt.boetger@gmail.com Make SettingsChannel configuration queue not static (flutter/flutter#179636) 2025-12-10 ahmedsameha1@gmail.com Make sure that a CupertinoListSection doesn't crash in 0x0 environment (flutter/flutter#179068) 2025-12-10 ahmedsameha1@gmail.com Make sure that a CupertinoFormSection doesn't crash in 0x0 environment (flutter/flutter#179001) 2025-12-10 ahmedsameha1@gmail.com Make sure that a CupertinoMagnifier doesn't crash in 0x0 environment (flutter/flutter#179206) 2025-12-10 ahmedsameha1@gmail.com Make sure that a Tooltip doesn't crash in 0x0 environment (flutter/flutter#178461) 2025-12-10 ahmedsameha1@gmail.com Make sure that a CupertinoSegmentedControl doesn't crash in 0x0 envir… (flutter/flutter#179544) 2025-12-10 ahmedsameha1@gmail.com Make sure that a CupertinoSlider doesn't crash in 0x0 environment (flutter/flutter#179566) 2025-12-10 ahmedsameha1@gmail.com Make sure that a CupertinoPageScaffold doesn't crash in 0x0 environment (flutter/flutter#179245) 2025-12-09 engine-flutter-autoroll@skia.org Roll Skia from f9e32c28c5c5 to 82fff05cc621 (2 revisions) (flutter/flutter#179641) 2025-12-09 engine-flutter-autoroll@skia.org Roll Dart SDK from 019cb923bf62 to 17749965ec57 (5 revisions) (flutter/flutter#179640) 2025-12-09 116356835+AbdeMohlbi@users.noreply.github.com Enhance documentation for `LocalHistoryEntry` class (flutter/flutter#179223) 2025-12-09 Rusino@users.noreply.github.com WebParagrah: ellipsis (flutter/flutter#178748) 2025-12-09 chingjun@google.com Update the doc on Google Testing to reflect the current state (flutter/flutter#177187) 2025-12-09 jacksongardner@google.com [wimp] Initial Impeller on Web implementation. (flutter/flutter#175442) 2025-12-09 47866232+chunhtai@users.noreply.github.com Relax assertion for adding semantics locale (flutter/flutter#178140) 2025-12-09 45459898+RamonFarizel@users.noreply.github.com Fix Scrollbar drag behavior (flutter/flutter#179199) 2025-12-09 engine-flutter-autoroll@skia.org Roll Skia from 502ee6f2a0d7 to f9e32c28c5c5 (6 revisions) (flutter/flutter#179632) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md ...
instead forcing a contain: true, uses isCompatibleWith to prevent implicit merge
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.