Skip to content

Conversation

@benji-farquhar
Copy link
Contributor

@benji-farquhar benji-farquhar commented Sep 14, 2024

@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.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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. 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.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Sep 14, 2024
Copy link
Contributor

@nate-thegrate nate-thegrate left a comment

Choose a reason for hiding this comment

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

Set ExpansionPanel.canTapOnHeader = true, then hover over the ExpansionPanel header on web, the mouse cursor will change from the "hand" to the usual mouse arrow shape while hovering over the expand/collapse icon.

It would be great if we had a test for this! That way, it won't be possible to factor out the IgnorePointer widget in the future without breaking the test.

Since adding an IgnorePointer is a semantic change to the widget tree, this PR will need tests in order to be approved. (Feel free to take a look at the Tree Hygiene wiki page to see which types of changes do/don't qualify for test exemptions.)



Fix undesirable side effects of your refactor away from my solution during your code review of my PR

Flutter has a very strict code of conduct; disrespecting someone else's work is not tolerated.

I often struggle to find ways to get my point across while maintaining respect & dignity, especially when I feel that the other person is in the wrong. But at the same time, I'm also amazed by everything the Flutter team has been able to do so far. Overall, I think it's important to recognize & appreciate the valuable contributions that others make, rather than drawing attention to mistakes & shortcomings.



Let me know if you have any questions or additional thoughts!

@benji-farquhar

This comment was marked as resolved.

@nate-thegrate

This comment was marked as resolved.

@Piinks
Copy link
Contributor

Piinks commented Oct 16, 2024

Hey @BenjiFarquhar do you plan to continue working on this change?

@benji-farquhar
Copy link
Contributor Author

Hey @BenjiFarquhar do you plan to continue working on this change?

Hey @Piinks, I'd appreciate if someone can add a test for this. I may be able to do it soon if there are no takers.

@nate-thegrate
Copy link
Contributor

Yeah, if you'd be able to add the test at some point that'd be great!

I believe generally, test changes are up to the PR author. If you're not able to get around to it, we can close this pull request and keep #155207 open, and we'll see if anyone decides to pick it up!

Copy link
Contributor

@nate-thegrate nate-thegrate left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for following up with the test!

(feel free to take a look at a few optional suggestions below.)

@nate-thegrate

This comment was marked as resolved.

@nate-thegrate nate-thegrate self-requested a review October 25, 2024 18:24
@benji-farquhar
Copy link
Contributor Author

benji-farquhar commented Oct 25, 2024

@nate-thegrate Should be all good now. I think the test failure was saying the expansion panel header is in an enabled state, and the semantics represent this with the isEnabled flag. Adding isEnabled: true to the expansion panel header semantics test made it happy. Disabling the IconButton must have caused the isEnabled flag to be false in the semantics tree (which would be misleading to assistive technologies since the whole header is enabled). Let me know if you want any changes or are not sure about my test fix.

CC: @Piinks

Copy link
Contributor

@nate-thegrate nate-thegrate left a comment

Choose a reason for hiding this comment

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

This looks fantastic, thank you @BenjiFarquhar!

I'll unresolve 1 thread with an optional suggestion but otherwise I got nothing 🙂

@victorsanni
Copy link
Contributor

My understanding is the approach in #147098 was taken to avoid Google testing failures? But it has undesired side effects and this PR is reverting it?

@benji-farquhar
Copy link
Contributor Author

benji-farquhar commented Oct 30, 2024

@victorsanni yeah, original issue was it disabled the IconButton when canTapOnHeader is true to give button tap control over to the whole ExpansionPanel header, and the fix from #147098 was to address the disabled icon color showing, by changing the disabled color to be the enabled color. but still, when the IconButton was disabled, it broke the mouse pointer when hovering on the expansion panel header, specifically on the IconButton it became the triangle shape, and on the rest of the header it was the hand to express a tappable area. Disabled button changes the mouse pointer to express that it is not tappable. Disabled button also removed isEnabled from the Semantics and the semantics test was not including isEnabled, since it was technically disabled with the old way, so my change broke a semantics test, and i fixed it by adding isEnabled to the test. So I have fixed it here in a different way that fixes all of those things.

@victorsanni
Copy link
Contributor

@BenjiFarquhar so basically this PR allows the icon to look enabled (i.e darker) instead of disabled (i.e lighter) when canTapOnHeader is set to true?

@benji-farquhar
Copy link
Contributor Author

benji-farquhar commented Oct 30, 2024

@victorsanni Yes. When canTapOnHeader is true, the IconButton now behaves merely as an Icon (appearing enabled), signalling to the user that the header can expand/collapse, and doesn't interfere with hovering effects on the expansion panel header.

@victorsanni
Copy link
Contributor

LGTM pending review from @TahaTesser.

Copy link
Member

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

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

LGTM

@nate-thegrate nate-thegrate added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2024
@auto-submit auto-submit bot merged commit b01558c into flutter:master Oct 31, 2024
73 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 31, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 31, 2024
Manual roll requested by [email protected]

flutter/flutter@fe71cad...0fe6153

2024-10-31 [email protected] Roll Flutter Engine from c40b0b602822 to f2154ef3e31c (8 revisions) (flutter/flutter#157926)
2024-10-31 [email protected] Hides added routes before top-most route finishes pushing (flutter/flutter#156104)
2024-10-31 [email protected] Fix cursor on hover expand/collapse icon (#155207) (flutter/flutter#155209)
2024-10-31 [email protected] Add test for `media_query_data.system_gesture_insets.0.dart` (flutter/flutter#157854)
2024-10-31 [email protected] Add and plumb `useImplicitPubspecResolution` across `flutter_tools`. (flutter/flutter#157879)
2024-10-31 [email protected] Roll Flutter Engine from 090c33aeae83 to c40b0b602822 (1 revision) (flutter/flutter#157896)
2024-10-31 [email protected] Roll Flutter Engine from 9295eeb6d3ce to 090c33aeae83 (4 revisions) (flutter/flutter#157893)
2024-10-30 [email protected] Roll Flutter Engine from 2bd854e23b61 to 9295eeb6d3ce (5 revisions) (flutter/flutter#157882)
2024-10-30 [email protected] Adds a new helpful tool exit message for SocketExceptions thrown during mdns discovery (flutter/flutter#157638)
2024-10-30 [email protected] Fix `GlowingOverscrollIndicator` examples (flutter/flutter#155203)
2024-10-30 [email protected] Roll Flutter Engine from 906a7ad88052 to 2bd854e23b61 (1 revision) (flutter/flutter#157878)
2024-10-30 [email protected] Upgrade templates to AGP 8.7/Gradle 8.10.2 (flutter/flutter#157872)
2024-10-30 [email protected] Roll Flutter Engine from 57ed5d338e7e to 906a7ad88052 (13 revisions) (flutter/flutter#157875)
2024-10-30 [email protected] Update Material 3  `LinearProgressIndicator` for new visual style (flutter/flutter#154817)
2024-10-30 [email protected] Roll Flutter Engine from 999797a2f690 to 57ed5d338e7e (5 revisions) (flutter/flutter#157833)
2024-10-30 [email protected] Add hidden `--no-implicit-pubspec-resolution` flag for one stable release. (flutter/flutter#157635)
2024-10-30 [email protected] Roll Packages from 028027e to 7cc1caa (5 revisions) (flutter/flutter#157864)
2024-10-30 [email protected] Mention partial PRs in the contributing docs (flutter/flutter#157863)

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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants