Skip to content

Conversation

@dleyba042
Copy link
Contributor

This PR addresses the issue detailed here: #74114 . The boolean isExpanded returned by the expansion panel callback now reflects the state of the panel that the user is seeing. If it's expanded on screen then the callback returns true. When you close the panel the callback returns false. When another panel is open and you open a different one, the callback executes twice. It returns isExpanded == false for the panel you are closing and true for the panel that is being opened.
I had to change the code in a couple existing tests because some tests are using the old behavior of the callback.

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.
  • 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] All existing and new tests are passing.

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

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels May 30, 2023
@github-actions github-actions bot removed the framework flutter/packages/flutter repository. See also f: labels. label May 30, 2023
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Hey @dleyba042, this is the cause of the analysis failure:

flutter sdk/packages/flutter/test/material/expansion_panel_test.dart:681: no space after flow control

I am looking at the other tests right now to see why they are failing

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

As for the other tests, it looks like some other existing tests are failing. There is an expansion panel demo that appears to be affected.
For reference, looking at one of these under the Checks tab on Github, there is a link out to the flutter dashboard:

image

Which takes you here: https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20framework_tests_widgets/38980/overview
From there, you can see the std out of the test run:

Screenshot 2023-06-01 at 2 40 09 PM

Which leads here: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8779640494112136513/+/u/run_test.dart_for_framework_tests_shard_and_subshard_widgets/test_stdout

I would check this test out with your change and see if the test needs updating, or if something unexpected broke: flutter/dev/integration_tests/flutter_gallery/test/demo/material/expansion_panels_demo_test.dart

:-)

@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Jun 1, 2023
@dleyba042 dleyba042 closed this Jun 1, 2023
auto-submit bot pushed a commit that referenced this pull request Jun 9, 2023
Fixes #74114

This PR addresses the issue detailed here: #74114 . The boolean isExpanded returned by the expansion panel callback now reflects the state of the panel that the user is seeing. If it's expanded on screen then the callback returns true. When you close the panel the callback returns false. When another panel is open and you open a different one, the callback executes twice. It returns isExpanded == false for the panel you are closing and true for the panel that is being opened.
I had to change the code in a couple existing tests because some tests are using the old behavior of the callback. This PR addresses feedback listed in closed PR -> #127876 . The reasone the original PR is closed is that I was having some struggles with git. A couple of the commits in this PR are just reverts of commits I meant not to happen.
Pre-launch Checklist

    [ X] I read the [Contributor Guide](https://github.com/flutter/flutter/wiki/Tree-hygiene#overview) and followed the process outlined there for submitting PRs.
    [ X] I read the [Tree Hygiene](https://github.com/flutter/flutter/wiki/Tree-hygiene) wiki page, which explains my responsibilities.
    [ X] I read and followed the [Flutter Style Guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo), including [Features we expect every widget to implement](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement).
    [ X] I signed the [CLA](https://cla.developers.google.com/).
    [ X] I listed at least one issue that this PR fixes in the description above.
    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](https://github.com/flutter/flutter/wiki/Tree-hygiene#tests).
    [ X] All existing and new tests are passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants