-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flexbox: pass correct cross-axis available space when computing an item's intrinsic main size (+misc fixes) #522
Conversation
…m's intrinsic main size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me to merge these fixes, even if the original Bevy issue is not fixed.
To be clear: this PR does fix the original Bevy issue. It just also includes some fixes that are only tangentially related to that issue. |
…em's intrinsic main size (+misc fixes) (#522) * Add tests for bevyengine/bevy#9350 * Pass accurate cross-axis available space when computing a flexbox item's intrinsic main size * Subtract child margin not parent margin when computing stretch-alignment known size * Add extra debug logs to flexbox algorithm * Apply margins to leaf nodes when computing available space for measure functions (cherry picked from commit dab541d)
…em's intrinsic main size (+misc fixes) (#522) * Add tests for bevyengine/bevy#9350 * Pass accurate cross-axis available space when computing a flexbox item's intrinsic main size * Subtract child margin not parent margin when computing stretch-alignment known size * Add extra debug logs to flexbox algorithm * Apply margins to leaf nodes when computing available space for measure functions (cherry picked from commit dab541d)
…em's intrinsic main size (+misc fixes) (#522) * Add tests for bevyengine/bevy#9350 * Pass accurate cross-axis available space when computing a flexbox item's intrinsic main size * Subtract child margin not parent margin when computing stretch-alignment known size * Add extra debug logs to flexbox algorithm * Apply margins to leaf nodes when computing available space for measure functions (cherry picked from commit dab541d)
…em's intrinsic main size (+misc fixes) (#522) * Add tests for bevyengine/bevy#9350 * Pass accurate cross-axis available space when computing a flexbox item's intrinsic main size * Subtract child margin not parent margin when computing stretch-alignment known size * Add extra debug logs to flexbox algorithm * Apply margins to leaf nodes when computing available space for measure functions (cherry picked from commit dab541d)
…em's intrinsic main size (+misc fixes) (#522) * Add tests for bevyengine/bevy#9350 * Pass accurate cross-axis available space when computing a flexbox item's intrinsic main size * Subtract child margin not parent margin when computing stretch-alignment known size * Add extra debug logs to flexbox algorithm * Apply margins to leaf nodes when computing available space for measure functions (cherry picked from commit dab541d)
…em's intrinsic main size (+misc fixes) (#522) * Add tests for bevyengine/bevy#9350 * Pass accurate cross-axis available space when computing a flexbox item's intrinsic main size * Subtract child margin not parent margin when computing stretch-alignment known size * Add extra debug logs to flexbox algorithm * Apply margins to leaf nodes when computing available space for measure functions (cherry picked from commit dab541d)
…em's intrinsic main size (+misc fixes) (#522) * Add tests for bevyengine/bevy#9350 * Pass accurate cross-axis available space when computing a flexbox item's intrinsic main size * Subtract child margin not parent margin when computing stretch-alignment known size * Add extra debug logs to flexbox algorithm * Apply margins to leaf nodes when computing available space for measure functions (cherry picked from commit dab541d)
Objective
Changes made
bevyengine/bevy#9350 turned out to be caused by a number of separate issues:
^ this is the bug that is most directly related to the reported bevy bug. However, the supplied test case also revealed:
available_space
to their childrenFeedback wanted
Popping this up now as I've reached a natural pause and it does actually fix the bevy issue, but arguably this ought to be three separate PRs and the "reduced" test cases ought to be renamed to something more descriptive. I would be interested in whether others consider this important / worthwhile.