Spec-correct CSS Flexbox §4.5 auto-min-size opt-in on YGConfig (re-land) (#1966)#1967
Closed
adityasharat wants to merge 1 commit into
Closed
Spec-correct CSS Flexbox §4.5 auto-min-size opt-in on YGConfig (re-land) (#1966)#1967adityasharat wants to merge 1 commit into
adityasharat wants to merge 1 commit into
Conversation
…nd) (facebook#1966) Summary: X-link: facebook/react-native#57036 Re-land of D105720159, originally reverted (revert: 0e642b96c7e2) due to a latent NPE in `ReactProgressBarViewManager.kt` and `ReactSwitchManager.kt` (instagram-internal) — both fixed in the prior diffs in this stack. Crash and broken e2e tests reported in T273821098 / P2359486686. Original summary: X-link: facebook/react-native#57015 Implements CSS Flexbox §4.5 automatic minimum sizing in Yoga. When opted in on a `YGConfig`, every flex item whose main-axis `min-{width,height}` is undefined receives a content-derived floor — `min(min-content, specified-size, max-size)` plus any aspect-ratio-transferred lower bound — so it cannot shrink below the size CSS browsers would honor. How to opt in: clear the new `YGErrataMinSizeUndefinedInsteadOfAuto` errata bit on the config. Default configs carry the bit (preserves today's behaviour); existing trees see no change. The bit is added to `YGErrataClassic` so consumers using that constant continue to get the same default. See D105720159 for full details on precedence rules, container recursion semantics, and per-item opt-outs. Changelog: [General][Added] - Add CSS Flexbox §4.5 automatic minimum sizing. Opt in by clearing the new `YGErrataMinSizeUndefinedInsteadOfAuto` errata bit on `YGConfig`. Differential Revision: D107181739
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@adityasharat has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107181739. |
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.
Summary:
X-link: facebook/react-native#57036
Re-land of D105720159, originally reverted (revert: 0e642b96c7e2) due to a latent NPE in
ReactProgressBarViewManager.ktandReactSwitchManager.kt(instagram-internal) — both fixed in the prior diffs in this stack. Crash and broken e2e tests reported in T273821098 / P2359486686.Original summary:
X-link: facebook/react-native#57015
Implements CSS Flexbox §4.5 automatic minimum sizing in Yoga. When opted in on a
YGConfig, every flex item whose main-axismin-{width,height}is undefined receives a content-derived floor —min(min-content, specified-size, max-size)plus any aspect-ratio-transferred lower bound — so it cannot shrink below the size CSS browsers would honor.How to opt in: clear the new
YGErrataMinSizeUndefinedInsteadOfAutoerrata bit on the config. Default configs carry the bit (preserves today's behaviour); existing trees see no change. The bit is added toYGErrataClassicso consumers using that constant continue to get the same default.See D105720159 for full details on precedence rules, container recursion semantics, and per-item opt-outs.
Changelog:
[General][Added] - Add CSS Flexbox §4.5 automatic minimum sizing. Opt in by clearing the new
YGErrataMinSizeUndefinedInsteadOfAutoerrata bit onYGConfig.Differential Revision: D107181739