Skip to content

Correct the default errata in the YGConfigSetErrata comment (#2141) - #60547

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
javache:export-D135541201
Dec 4, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
javache:export-D135541201

Conversation

@javache

@javache javache commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Differential Revision: https://www.internalfb.com/diff/D135541201

Summary:
Why

The comment on YGConfigSetErrata in yoga/YGConfig.h says "By default Yoga will prioritize W3C conformance". A new config has had YGErrataMinSizeUndefinedInsteadOfAuto set since #1968 and YGErrataFlexFirstPassUsesRunningTotals since #2021 (errata_ in yoga/config/Config.h), so a reader who wants conformant layout and trusts the comment does not clear them. #2116 corrected the same statement on the website's configuring page.

How

The comment now says that a new config has some errata set and where to find them, without listing them: two open changes each add another default erratum, and a list here would go stale as the old sentence did. It also says that YGConfigSetErrata replaces the whole set. The old example, YGConfigSetErrata(config, YGErrataStretchFlexBasis), reads as adding one erratum but clears the defaults, so the new example combines the erratum with YGConfigGetErrata(config).

Test Plan

A comment-only change: cmake --build tests/build compiles and yarn format-check passes. No image: there is no layout or structure to show.

Changelog: [Internal]

Signed-off-by: James Ide ide@expo.dev

@meta-codesync

meta-codesync Bot commented Dec 4, 2026

Copy link
Copy Markdown

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

…2141)

Differential Revision: https://www.internalfb.com/diff/D135541201

Summary:
Why
===

The comment on `YGConfigSetErrata` in `yoga/YGConfig.h` says "By default Yoga will prioritize W3C conformance". A new config has had `YGErrataMinSizeUndefinedInsteadOfAuto` set since react#1968 and `YGErrataFlexFirstPassUsesRunningTotals` since react#2021 (`errata_` in `yoga/config/Config.h`), so a reader who wants conformant layout and trusts the comment does not clear them. react#2116 corrected the same statement on the website's configuring page.

How
===

The comment now says that a new config has some errata set and where to find them, without listing them: two open changes each add another default erratum, and a list here would go stale as the old sentence did. It also says that `YGConfigSetErrata` replaces the whole set. The old example, `YGConfigSetErrata(config, YGErrataStretchFlexBasis)`, reads as adding one erratum but clears the defaults, so the new example combines the erratum with `YGConfigGetErrata(config)`.

Test Plan
=========

A comment-only change: `cmake --build tests/build` compiles and `yarn format-check` passes. No image: there is no layout or structure to show.

Changelog: [Internal]
Signed-off-by: James Ide <ide@expo.dev>
@meta-codesync
meta-codesync Bot merged commit 5b77b40 into react:main Dec 4, 2026
48 of 51 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @javache in 5b77b40

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged This PR has been merged. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants