Fix auto-sized parent not accounting for child min-width in canSkipFlex path#1905
Open
joshjhargreaves wants to merge 2 commits intofacebook:mainfrom
Open
Fix auto-sized parent not accounting for child min-width in canSkipFlex path#1905joshjhargreaves wants to merge 2 commits intofacebook:mainfrom
joshjhargreaves wants to merge 2 commits intofacebook:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
@joshjhargreaves could you run |
Author
|
@NickGerleman I ran the script & there are no files to check in - this modifies an existing test file & doesn't create a new one, fwiw. |
|
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this in D95177338. |
NickGerleman
pushed a commit
to NickGerleman/react-native
that referenced
this pull request
Mar 20, 2026
…ex path Summary: When a flex container with auto main-axis is measured with a with a known cross dimensions, the `canSkipFlex` optimization in `justifyMainAxis` uses `computedFlexBasis` directly. This doesn't account for the `min` & `max` width constraints, causing the parent to undersize. I have added a `.html` test page here to mirror the C++ test I added to confirm that flexbox does respect the min-width constraint. [minwidth-test.html](https://github.com/user-attachments/files/25695677/minwidth-test.html) Changelog: [internal] X-link: facebook/yoga#1905 Reviewed By: sammy-SC, adityasharat Differential Revision: D95177338 Pulled By: NickGerleman
NickGerleman
pushed a commit
to NickGerleman/react-native
that referenced
this pull request
Mar 20, 2026
…ex path Summary: When a flex container with auto main-axis is measured with a with a known cross dimensions, the `canSkipFlex` optimization in `justifyMainAxis` uses `computedFlexBasis` directly. This doesn't account for the `min` & `max` width constraints, causing the parent to undersize. I have added a `.html` test page here to mirror the C++ test I added to confirm that flexbox does respect the min-width constraint. [minwidth-test.html](https://github.com/user-attachments/files/25695677/minwidth-test.html) Changelog: [Internal] X-link: facebook/yoga#1905 Reviewed By: sammy-SC, adityasharat Differential Revision: D95177338 Pulled By: NickGerleman
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a flex container with auto main-axis is measured with a with a known cross dimensions, the
canSkipFlexoptimization injustifyMainAxisusescomputedFlexBasisdirectly. This doesn't account for themin&maxwidth constraints, causing the parent to undersize.I have added a
.htmltest page here to mirror the C++ test I added to confirm that flexbox does respect the min-width constraint. minwidth-test.html