Skip to content

[v3] Fix horizontal list dynamic heights#397

Open
zoriya wants to merge 1 commit intoLegendApp:webfrom
zoriya:fix/dynamic
Open

[v3] Fix horizontal list dynamic heights#397
zoriya wants to merge 1 commit intoLegendApp:webfrom
zoriya:fix/dynamic

Conversation

@zoriya
Copy link

@zoriya zoriya commented Feb 15, 2026

I removed the needsOtherAxisSize state 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines 130 to +133
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);

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant