Skip to content

Fix issue with flexShrink#1855

Open
rozele wants to merge 1 commit into
react:mainfrom
rozele:export-D82313674
Open

Fix issue with flexShrink#1855
rozele wants to merge 1 commit into
react:mainfrom
rozele:export-D82313674

Conversation

@rozele

@rozele rozele commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

Summary:
X-link: react/react-native#53758

In cases where the remaining space for flex shrink is negative, we can get into a state where the totalFlexShrinkScaledFactors get's infintesimally small, but likely should just be floored to zero.

This manifests in issues where flexShrink nodes are suddenly given way too much space, and generally only manifests in an issue if these flexShrink nodes have self-measuring children (such as text).

Checking if the value is approximately zero appears to fix bugs for flexShrink.

Reviewed By: andrewdacenko

Differential Revision: D82313674

@vercel

vercel Bot commented Sep 15, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
yoga-website Ready Ready Preview Comment Sep 15, 2025 3:42pm

@meta-cla meta-cla Bot added the CLA Signed label Sep 15, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@rozele has exported this pull request. If you are a Meta employee, you can view the originating diff in D82313674.

rozele added a commit to rozele/yoga that referenced this pull request Oct 11, 2025
Summary:

X-link: react/react-native#53758

In cases where the remaining space for flex shrink is negative, we can get into a state where the `totalFlexShrinkScaledFactors` get's infintesimally small, but likely should just be floored to zero.

This manifests in issues where flexShrink nodes are suddenly given way too much space, and generally only manifests in an issue if these flexShrink nodes have self-measuring children (such as text).

Checking if the value is approximately zero appears to fix bugs for flexShrink.

Reviewed By: andrewdacenko

Differential Revision: D82313674
@vercel

vercel Bot commented Oct 11, 2025

Copy link
Copy Markdown

@rozele is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

rozele added a commit to rozele/react-native-macos that referenced this pull request Oct 11, 2025
Summary:
X-link: react/yoga#1855


In cases where the remaining space for flex shrink is negative, we can get into a state where the `totalFlexShrinkScaledFactors` get's infintesimally small, but likely should just be floored to zero.

This manifests in issues where flexShrink nodes are suddenly given way too much space, and generally only manifests in an issue if these flexShrink nodes have self-measuring children (such as text).

Checking if the value is approximately zero appears to fix bugs for flexShrink.

Reviewed By: andrewdacenko

Differential Revision: D82313674
Summary:

X-link: react/react-native#53758

In cases where the remaining space for flex shrink is negative, we can get into a state where the `totalFlexShrinkScaledFactors` get's infintesimally small, but likely should just be floored to zero.

This manifests in issues where flexShrink nodes are suddenly given way too much space, and generally only manifests in an issue if these flexShrink nodes have self-measuring children (such as text).

Checking if the value is approximately zero appears to fix bugs for flexShrink.

Reviewed By: andrewdacenko

Differential Revision: D82313674
@meta-codesync

meta-codesync Bot commented Oct 11, 2025

Copy link
Copy Markdown

@rozele has exported this pull request. If you are a Meta employee, you can view the originating Diff in D82313674.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants