Skip to content

Commit

Permalink
Set errata level in RN Paper, Litho, and Native Templates
Browse files Browse the repository at this point in the history
Summary:
This searches fbsource for the following strings corresponding to node or config creation using Yoga Java bindings.
1. `YogaNodeFactory.create`
2. `YogaConfigFactory.create`

Apart from benchmarks/tests, thie leaves RN Paper, Litho and Native Templates. These are opted into compatibility with current Yoga behavior, using either `YogaErrata.CLASSIC`, or `YogaErrata.ALL` where `UseLegacyStretchBehaviour` is currently set.

Differential Revision: https://internalfb.com/D45299721

fbshipit-source-id: 9724588b9df1bf7b2e62eaf9b74e73015ed0bf1a
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Apr 27, 2023
1 parent f5a1ad9 commit c687e96
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import com.facebook.yoga.YogaConfig;
import com.facebook.yoga.YogaConfigFactory;
import com.facebook.yoga.YogaErrata;

public class ReactYogaConfigProvider {

Expand All @@ -18,7 +19,7 @@ public static YogaConfig get() {
if (YOGA_CONFIG == null) {
YOGA_CONFIG = YogaConfigFactory.create();
YOGA_CONFIG.setPointScaleFactor(0f);
YOGA_CONFIG.setUseLegacyStretchBehaviour(true);
YOGA_CONFIG.setErrata(YogaErrata.ALL);
}
return YOGA_CONFIG;
}
Expand Down

0 comments on commit c687e96

Please sign in to comment.