Windows icon indicating copy to clipboard operation
Windows copied to clipboard

Fix WrapLayout sometimes will collapsing

Open h82258652 opened this issue 7 months ago • 1 comments

Fixes #690

This PR fixes the WrapLayout sometimes will collapsing all the items.

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Sometimes, all the items in the WrapLayout will be collapsed together.

What is the new behavior?

All the items should be positioned correctly.

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • [x] Based off latest main branch of toolkit
  • [ ] Tested code with current supported SDKs
  • [ ] New component
    • [ ] Documentation has been added
    • [ ] Sample in sample app has been added
    • [ ] Analyzers are passing for documentation and samples
    • [ ] Icon has been created (if new sample) following the Thumbnail Style Guide and templates
  • [ ] Tests for the changes have been added (if applicable)
  • [ ] Header has been added to all new source files
  • [x] Contains NO breaking changes

Other information

h82258652 avatar Jun 12 '25 03:06 h82258652

@h82258652 thanks for the PR, would you mind adding some more detail here about why this was causing the issue and how this resolves it (behaviorally)? It could be good to add a test case as well that exhibits the issue and then gets resolved by the fix.

Looking at the original PR from @skendrot, https://github.com/CommunityToolkit/WindowsCommunityToolkit/pull/3160/files#diff-17bbc9815eb822dd6326ef64483a5d0cfa07a46b1085227ce7299819b0c61956R200-R208 - it seems like the continue wasn't originally here, so I wonder where it was added and what that was trying to resolve for some other issue maybe?

A different fix had added this continue by @Poker-sang here: https://github.com/CommunityToolkit/Windows/pull/187 - It'd be good to add some various tests to these underlying issues and ensure we're covering all the scenarios between bug #690 and #70.

michael-hawker avatar Oct 06 '25 18:10 michael-hawker