-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Fix ExpandIcon color when ExpansionPanel.canTapOnHeader true (#147097) #147098
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 before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). 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. |
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. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@TahaTesser trailing space is fixed. Not sure why some tests (see test commands below) failed in the remote build, as they pass when I run them locally with:
Any idea why they failed in this build? |
There seems to be a bug on master which doesn't update code so i couldn't test your change. I can confirm it works now.
These test files are unrelated to I've updated your fix to mitigate the changing semantics and avoid adding We can assign child: ExpandIcon(
color: widget.expandIconColor,
disabledColor: child.canTapOnHeader ? widget.expandIconColor : null,
isExpanded: _isChildExpanded(index),
padding: _kExpandIconPadding,
onPressed: !child.canTapOnHeader
? (bool isExpanded) => _handlePressed(isExpanded, index)
: null,
), If you still need help testing the changes. let me know. This requires checking icon color when using |
@TahaTesser Thanks. I have implemented the changes with tests. Let me know if it requires any changes. |
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!
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!
auto label is removed for flutter/flutter/147098, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
flutter/flutter@00f4066...2bfb1b0 2024-05-09 goderbauer@google.com Bump flutter_lints to 4.0 (flutter/flutter#148020) 2024-05-09 104349824+huycozy@users.noreply.github.com Add Badge example (flutter/flutter#148053) 2024-05-09 farquhar.benji@gmail.com Fix ExpandIcon color when ExpansionPanel.canTapOnHeader true (#147097) (flutter/flutter#147098) 2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from c2e874fdc164 to c0fd3386d018 (1 revision) (flutter/flutter#148040) 2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from fe08238f5a52 to c2e874fdc164 (1 revision) (flutter/flutter#148038) 2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 69f2d9610a18 to fe08238f5a52 (1 revision) (flutter/flutter#148034) 2024-05-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#148011) 2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from bd58d2b2d655 to 69f2d9610a18 (7 revisions) (flutter/flutter#148030) 2024-05-09 kevmoo@users.noreply.github.com [web] Update wasm CLI details to be clear JavaScript is ALSO compiled (flutter/flutter#147944) 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 bmparr@google.com,rmistry@google.com,stuartmorgan@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
flutter/flutter@00f4066...2bfb1b0 2024-05-09 goderbauer@google.com Bump flutter_lints to 4.0 (flutter/flutter#148020) 2024-05-09 104349824+huycozy@users.noreply.github.com Add Badge example (flutter/flutter#148053) 2024-05-09 farquhar.benji@gmail.com Fix ExpandIcon color when ExpansionPanel.canTapOnHeader true (#147097) (flutter/flutter#147098) 2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from c2e874fdc164 to c0fd3386d018 (1 revision) (flutter/flutter#148040) 2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from fe08238f5a52 to c2e874fdc164 (1 revision) (flutter/flutter#148038) 2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from 69f2d9610a18 to fe08238f5a52 (1 revision) (flutter/flutter#148034) 2024-05-09 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#148011) 2024-05-09 engine-flutter-autoroll@skia.org Roll Flutter Engine from bd58d2b2d655 to 69f2d9610a18 (7 revisions) (flutter/flutter#148030) 2024-05-09 kevmoo@users.noreply.github.com [web] Update wasm CLI details to be clear JavaScript is ALSO compiled (flutter/flutter#147944) 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 bmparr@google.com,rmistry@google.com,stuartmorgan@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
Relates to #147098 and #147097 Aside from fixing the expland/collapse icon color in the other PR, I noticed the splash color on both the icon button and the full expansion panel (if ExpansionPanel.canTapOnHeader is set to true) is just `Theme.of(context).splashColor` on the `InkWell` and `Theme.of(context).highlightColor` on the `IconButton` which may not suit the color scheme of the `ExpansionPanel`, so I have added a custom field `splashColor`, which will effect both the `IconButton` and the full panel `Inkwell`.
Relates to flutter#147098 and flutter#147097 Aside from fixing the expland/collapse icon color in the other PR, I noticed the splash color on both the icon button and the full expansion panel (if ExpansionPanel.canTapOnHeader is set to true) is just `Theme.of(context).splashColor` on the `InkWell` and `Theme.of(context).highlightColor` on the `IconButton` which may not suit the color scheme of the `ExpansionPanel`, so I have added a custom field `splashColor`, which will effect both the `IconButton` and the full panel `Inkwell`.
@TahaTesser Fix undesirable side effects of your refactor away from my solution to add `IgnorePointer` during your code review of my PR #147098. I don't have time to implement my whole initial fix a second time, and update the tests that were added to verify your disabled color change. The issue is resolved with only adding the IgnorePointer. See [155207](#155207).
Fixes #147097. The expand/collapse icon should not be the disabled color when ExpansionPanel.canTapOnHeader is true because the ExpansionPanel is active, and we may want to keep the icon there as a visual indicator to the user that it is expandable/collapsable.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.