Skip to content

Conversation

@Mairramer
Copy link
Contributor

@Mairramer Mairramer commented Aug 14, 2024

This change addresses bug #153418 by ensuring that nodes are handled correctly when closing their children.

Fixes #153418

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.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Aug 14, 2024
@Mairramer Mairramer changed the title fix TreeSliver collapsing not working Fix TreeSliver collapsing not working Aug 14, 2024
@Mairramer Mairramer changed the title Fix TreeSliver collapsing not working Fixes TreeSliver collapsing not working Aug 14, 2024
@Mairramer
Copy link
Contributor Author

@Piinks

@goderbauer goderbauer requested a review from Piinks August 20, 2024 22:06
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.

Hi @Mairramer thanks for sending another PR!
It looks like this is trying to fix two issues. Would you be willing to separate them into two PRs? That way if one introduces a regression and we need to revert it, we won;t end up reverting the other fix as well.

@Piinks
Copy link
Contributor

Piinks commented Aug 21, 2024

We should also follow up on the TreeView side, the code is almost identical so we should make the same fix there.

@Mairramer
Copy link
Contributor Author

We should also follow up on the TreeView side, the code is almost identical so we should make the same fix there.

Ok, I'll check.

@Mairramer
Copy link
Contributor Author

Splited PR #153890

@Mairramer Mairramer requested a review from Piinks September 4, 2024 14:04
@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.

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.

Unfortunately, we won't be able to merge this without test coverage.

@Mairramer
Copy link
Contributor Author

Mairramer commented Sep 20, 2024

@Piinks I tested it in several ways, and the problem turned out to be purely visual. The node is indeed collapsed, and the children are inactive, but when used in an app, they still appear on the screen despite not being able to interact with them.

Would it be possible to write a golden test for this?

Edit:
I wrote the golden test, but I got the same result with the bug and the fix. I'm probably missing something. Can I be exempt from testing in this PR? The same scenario happens with flutter/packages#7474 .

@Piinks
Copy link
Contributor

Piinks commented Sep 24, 2024

Can I be exempt from testing in this PR?

No, this is not something that would be test exempt. Perhaps you can check that the render object paints the children as expected?

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.

LGTM

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 17, 2024
@auto-submit auto-submit bot merged commit 6acc591 into flutter:master Oct 17, 2024
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: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TreeSliver - collapsing not working on web

3 participants