Closed NickGerleman closed 2 weeks ago
@NickGerleman Hi, I just stumbled over that open issue. As I heavily contributed to https://github.com/facebook/yoga a few years ago, my recommendation would be to use YGExperimentalFeature*
+ YGConfigSetExperimentalFeatureEnabled
for that, as it doesn't require a preprocessor. We actually added that behavior exactly for those cases.
You simply extend the sequence in YGEnum.h
+ adding the logic around that. You could then enable that behavior only for affected (sub-)trees.
It looks like https://github.com/microsoft/react-native-macos/pull/100 patch was accidentally deleted in the 9/20/23 Integration (#12165). Yoga.cpp has since been deleted, so if this change is still needed, we will need to fork CalculateLayout.cpp.
We patched Yoga to change measurement behavior with https://github.com/microsoft/react-native/pull/100. This requires us to maintain a separate copy of Yoga in react-native-windows. We should upstream our patch into facebook/react-native.
@acoates-ms was of the opinion we may want to put the change behind a preprocessor definition we would enable in RNW to avoid changing iOS/Android behavior.