这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@kokoISnoTarget
Copy link
Contributor

@kokoISnoTarget kokoISnoTarget commented Mar 19, 2025

Objective

This fixes a case where a grid item on the primary axis would get put into a wrong track.

Context

This came up in this issue DioxusLabs/blitz#187
Where a gird looked like this
taffy_one

(with commit)
taffy_two

@alice-i-cecile
Copy link
Collaborator

Can you add a test for this? This seems like a reasonable fix, but regression tests are good, since this is clearly an edge case we weren't testing.

@alice-i-cecile alice-i-cecile added the bug Something isn't working label Mar 19, 2025
Copy link
Collaborator

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this! (and thanks for the test).

It looks the fundamental issue here is that the original code gets the "primary" and "secondary" axes mixed up. This code ought to be incrementing the secondary axis (in some cases) but it's actually incrementing the primary axis. I'm guessing this wasn't caught before because layouts that fix the "primary" axis but use auto-placement for the secondary axis are relatively rare.

I'm inclined to accept this as it's a definite improvement on what we have, but there will be some follow-up required to make this completely correct.

@nicoburns nicoburns merged commit 50ff9cb into DioxusLabs:main Mar 19, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants