-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Update description in _LastFinderMixin to properly describe finding last #174232
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
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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 correctly fixes a typo in the description message for _LastFinderMixin. The original message incorrectly stated it was ignoring all but the 'first' element, when it should be the 'last'. My feedback includes a suggestion to add a regression test to verify this description in failure messages, improving test coverage for finder descriptions.
| String describeMatch(Plurality plurality) { | ||
| return '${parent.describeMatch(plurality)} (ignoring all but first)'; | ||
| return '${parent.describeMatch(plurality)} (ignoring all but last)'; | ||
| } |
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.
This correctly fixes the description for _LastFinderMixin. To prevent this from regressing and to ensure the description is tested, it would be great to add a test case that verifies the finder's description in a failure message.1
For example, a test that expects a widget that doesn't exist using .last and then asserts on the TestFailure.message content. A similar test exists for find.descendant in finders_test.dart which you can use as a reference.
Style Guide References
Footnotes
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.
that's an overkill mr AI
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.
added the test
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 👍 You're right it should say "last". Thanks for fixing.
You'll have to get a test exception. I think you're probably correct that we shouldn't test this... I don't see the test that Gemini is referring to.
|
@FufferKS Are you able to get a test exception? See the bot's comment above. #174232 (comment) |
|
Thanks for the reminder - I was on holidays and forgot about this side quest. Logging into discord now 🫡 |
|
The request for an exemption was rejected, I'll add the test at some point when I find a moment to fork and play around with it... |
|
Sounds good, yeah I would just add a quick test that verifies the string. |
|
@justinmc the tests are now added |
|
@justinmc is there anything else I need to do to get this merged? |
dkwingsmt
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
…10160) Manual roll requested by [email protected] flutter/flutter@c9608e2...7811e89 2025-10-01 [email protected] Migrate to `WidgetStateTextStyle` (flutter/flutter#176330) 2025-10-01 [email protected] Migrate to `WidgetStateOutlinedBorder` (flutter/flutter#176270) 2025-10-01 [email protected] [win32] Runloop should use high resolution timer and avoid deadlock (flutter/flutter#176023) 2025-10-01 [email protected] Roll Packages from 287739d to 321a584 (3 revisions) (flutter/flutter#176357) 2025-10-01 [email protected] Add SwiftUI support for UIScene migration (flutter/flutter#176230) 2025-10-01 [email protected] Roll Skia from ecaff95f51aa to c44a36470d07 (4 revisions) (flutter/flutter#176336) 2025-10-01 [email protected] [native assets] Enable build hooks and code assets on stable (flutter/flutter#176285) 2025-10-01 [email protected] [native assets] Roll dependencies (flutter/flutter#176287) 2025-10-01 [email protected] Roll Dart SDK from 527333cfe4cf to 8ffec1435cf3 (1 revision) (flutter/flutter#176334) 2025-10-01 [email protected] Roll Skia from 6998b06397c5 to ecaff95f51aa (1 revision) (flutter/flutter#176333) 2025-10-01 [email protected] Update description in _LastFinderMixin to properly describe finding last (flutter/flutter#174232) 2025-10-01 [email protected] Roll Skia from b242cc09488d to 6998b06397c5 (2 revisions) (flutter/flutter#176331) 2025-10-01 [email protected] Roll Dart SDK from af31d2637b6b to 527333cfe4cf (17 revisions) (flutter/flutter#176325) 2025-10-01 [email protected] Stop using deprecated analyzer 7.x.y APIs. (flutter/flutter#176242) 2025-10-01 [email protected] Fix docs referencing deprecated radio properties (flutter/flutter#176244) 2025-09-30 [email protected] Roll Skia from bb3b6bd4be0d to b242cc09488d (22 revisions) (flutter/flutter#176320) 2025-09-30 [email protected] Roll Fuchsia Linux SDK from rcOl0yxJb4znJ903Y... to 1Ai6VL4vb_GdGnWhg... (flutter/flutter#176315) 2025-09-30 [email protected] Adds dart ui API for setting application level locale (flutter/flutter#175100) 2025-09-30 [email protected] replace `onPop` usage with `onPopWithResult` in `navigation_bar.2.dart ` (flutter/flutter#174841) 2025-09-30 [email protected] [ Widget Preview ] Forward Widget Inspector navigation events via DTD (flutter/flutter#176218) 2025-09-30 [email protected] Add verbose logs to module_uiscene_test_ios (flutter/flutter#176306) 2025-09-30 [email protected] Web semantics: Fix email field selection/cursor by using type="text" + inputmode="email" (flutter/flutter#175876) 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 [email protected],[email protected] 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
…ast (flutter#174232) <!-- 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 --> *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. An issue is not required if the PR fixes something trivial like a typo.* *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 - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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 --------- Co-authored-by: Tong Mu <[email protected]>
…ast (flutter#174232) <!-- 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 --> *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. An issue is not required if the PR fixes something trivial like a typo.* *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 - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] 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 --------- Co-authored-by: Tong Mu <[email protected]>
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. An issue is not required if the PR fixes something trivial like a typo.
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.
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.