Skip to content

Commit

Permalink
Unfork and modularize Yoga (#12591)
Browse files Browse the repository at this point in the history
* Unfork Yoga

* Change files

* Remove yoga.cpp from react-native-platform-override e2etests

* Update comment reference

* Revert "Remove yoga.cpp from react-native-platform-override e2etests"

This reverts commit a4dbd44.

* re-add yoga to fake overrides.json

* remove react-native-platform-override change file
  • Loading branch information
marlenecota committed Jan 11, 2024
1 parent 7939ac3 commit a948daf
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 955 deletions.
3 changes: 1 addition & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"packages/@react-native-windows/tester",
"packages/react-native-platform-override/src/e2etest/collateral",
"vnext/Folly/TEMP_UntilFollyUpdate",
"vnext/ReactCommon/TEMP_UntilReactCommonUpdate",
"vnext/ReactCommon/Yoga.cpp"
"vnext/ReactCommon/TEMP_UntilReactCommonUpdate"
],
"useGitignore": true,
"ignoreRegExpList": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Unfork Yoga",
"packageName": "react-native-windows",
"email": "email not defined",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion vnext/Microsoft.ReactNative/Modules/NativeUIManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ NativeUIManager::NativeUIManager(winrt::Microsoft::ReactNative::ReactContext con
// To Debug Yoga layout, uncomment the following line.
// YGConfigSetPrintTreeFlag(m_yogaConfig, true);

// Additional logging can be enabled editing yoga.cpp (e.g. gPrintChanges,
// Additional logging can be enabled editing CalculateLayout.cpp (e.g. gPrintChanges,
// gPrintSkips)
#endif
}
Expand Down
9 changes: 5 additions & 4 deletions vnext/ReactCommon/ReactCommon.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\InspectorInterfaces.cpp" />
<ClCompile Include="$(ReactNativeDir)\ReactCommon\logger\react_native_log.cpp" />
<CLCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\BridgeNativeModulePerfLogger.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGConfig.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGEnums.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGNode.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGNodeLayout.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGNodeStyle.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGPixelGrid.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGValue.cpp" />
<ClCompile Include="$(YogaDir)\yoga\algorithm\Baseline.cpp" />
<ClCompile Include="$(YogaDir)\yoga\algorithm\Cache.cpp" />
Expand All @@ -150,10 +155,6 @@
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\mapbuffer\MapBuffer.cpp" />
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\mapbuffer\MapBufferBuilder.cpp" />
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\telemetry\TransactionTelemetry.cpp" />
<!--
Using a patched copy of Yoga due to https://github.com/microsoft/react-native-windows/issues/3994
-->
<ClCompile Include="Yoga.cpp" AdditionalIncludeDirectories="$(YogaDir)\yoga;%(AdditionalIncludeDirectories)" />
<ClCompile Include="$(YogaDir)\yoga\event\event.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
Expand Down
13 changes: 12 additions & 1 deletion vnext/ReactCommon/ReactCommon.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
<ClCompile Include="$(YogaDir)\yoga\Utils.cpp">
<Filter>yoga</Filter>
</ClCompile>
<ClCompile Include="$(YogaDir)\yoga\YGConfig.cpp">
<Filter>yoga</Filter>
</ClCompile>
<ClCompile Include="$(YogaDir)\yoga\YGEnums.cpp">
<Filter>yoga</Filter>
</ClCompile>
Expand All @@ -129,9 +132,18 @@
<ClCompile Include="$(YogaDir)\yoga\YGNode.cpp">
<Filter>yoga</Filter>
</ClCompile>
<ClCompile Include="$(YogaDir)\yoga\YGNodeLayout.cpp">
<Filter>yoga</Filter>
</ClCompile>
<ClCompile Include="$(YogaDir)\yoga\YGNodeStyle.cpp">
<Filter>yoga</Filter>
</ClCompile>
<ClCompile Include="$(YogaDir)\yoga\YGNodePrint.cpp">
<Filter>yoga</Filter>
</ClCompile>
<ClCompile Include="$(YogaDir)\yoga\YGPixelGrid.cpp">
<Filter>yoga</Filter>
</ClCompile>
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsi\jsi\jsi.cpp">
<Filter>jsi\jsi</Filter>
</ClCompile>
Expand Down Expand Up @@ -175,7 +187,6 @@
<Filter>react\renderer\debug</Filter>
</ClCompile>
<ClCompile Include="pch.cpp" />
<ClCompile Include="Yoga.cpp" />
<ClCompile Include="$(ReactNativeDir)\ReactCommon\logger\react_native_log.cpp">
<Filter>logger</Filter>
</ClCompile>
Expand Down
Loading

0 comments on commit a948daf

Please sign in to comment.