[v3] Fix horizontal list dynamic heights#397
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f390b554c7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const cur = peek$(ctx, "otherAxisSize"); | ||
| if (!cur || maxOtherAxisSize > cur) { | ||
| set$(ctx, "otherAxisSize", maxOtherAxisSize); | ||
| const otherAxisSize = horizontal ? sizeObj.height : sizeObj.width; | ||
| if (!cur || otherAxisSize > cur) { | ||
| set$(ctx, "otherAxisSize", otherAxisSize); |
There was a problem hiding this comment.
Gate cross-axis growth to lists lacking intrinsic size
updateItemSize now always grows otherAxisSize from measured item width/height, but Containers uses that signal as minHeight/minWidth; this bypasses the previous intrinsic-size guard and lets any oversized item permanently ratchet the cross-axis size even when the list already has a valid measured cross-axis. In fixed-height horizontal lists (or fixed-width vertical lists), a transiently larger item can force the content container to expand unexpectedly because this value only ever increases.
Useful? React with 👍 / 👎.
I removed the
needsOtherAxisSizestate that caused dynamic height to not be calculated but i didn't remove the tests about it, not sure if i misunderstood the use of this property.