Fix misleading error message for color/decoration conflict#180325
Fix misleading error message for color/decoration conflict#180325nathannewyen wants to merge 2 commits intoflutter:masterfrom
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. |
There was a problem hiding this comment.
Code Review
This pull request improves the developer experience by fixing misleading error messages in CupertinoSearchTextField and Container. The previous assert messages were contradictory, and the new messages clearly explain that one property is a shorthand for another. This change is well-aligned with the Flutter style guide's emphasis on useful error messages. The implementation is correct and consistent. I have reviewed the changes and found no issues.
|
LGTM, though there are merge conflicts. @nathannewyen are you able to resolve them? |
|
Closing this PR - the issue has already been fixed upstream in #178823 with a more complete error message. Thanks for the review @MitchellGoodwin! |
|
Thanks for the review @MitchellGoodwin! While resolving the conflicts, I noticed this issue was already fixed upstream in #178823 with a more complete error message. Closing this PR as it's now redundant. |
|
An existing Git SHA, To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with |
1b3f44b to
5db27c4
Compare
|
Resolved the merge conflict. Apologies for the confusion earlier - I incorrectly closed the PR thinking the issue was already fixed. The conflict has been resolved by accepting the upstream changes. |
MitchellGoodwin
left a comment
There was a problem hiding this comment.
Thank you for addressing the merge conflicts. I think I really like the pattern set in #119484. Can we go with that here as well?
justinmc
left a comment
There was a problem hiding this comment.
@nathannewyen Could you address @MitchellGoodwin's comments? I agree with him about adding that sentence. Otherwise this looks good, thanks for improving these.
|
@nathannewyen I've applied @/MitchellGoodwin 's suggestions. However due to some administrative reasons, can you open a completely new PR? And make sure to not use the same commit or rebase, and instead by copying the code to a new commit. My apology that such a small change went through so many back and forths! Explaination:@/MitchellGoodwin is no longer with Google and his CLA has been revoked, and the commit he has co-authored will be rejected by the CLA bot. |
The error message said 'To provide both' which contradicts 'Cannot provide both'. Updated to match the clearer wording used in Ink and AnimatedContainer widgets. Fixes flutter#119484
Co-authored-by: Mitchell Goodwin <[email protected]>
ba22cf7 to
073e91e
Compare
|
Closing this PR in favor of #181882. |
…180325) (#181882) _This PR is a clone of #180325 and relands it._ ## Description Fixes the contradictory error message that says "Cannot provide both... To provide both". Updated wording to match `Ink` and `AnimatedContainer` widgets which use clearer phrasing. ## Related Issue Fixes #119484 ## 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 --------- Co-authored-by: Nathan Nguyen <[email protected]>
…lutter#180325) (flutter#181882) _This PR is a clone of flutter#180325 and relands it._ ## Description Fixes the contradictory error message that says "Cannot provide both... To provide both". Updated wording to match `Ink` and `AnimatedContainer` widgets which use clearer phrasing. ## Related Issue Fixes flutter#119484 ## 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 --------- Co-authored-by: Nathan Nguyen <[email protected]>
Description
Fixes the contradictory error message that says "Cannot provide both... To provide both".
Updated wording to match
InkandAnimatedContainerwidgets which use clearer phrasing.Related Issue
Fixes #119484