Commit Graph

2 Commits

Author SHA1 Message Date
Tim Yung 1977dd6596 RN: Sort Pragmas in Headers (#51554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51554

Sorts pragma directives file headers in React Native.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D75264593

fbshipit-source-id: 9e4b253dd0fc94dc2fc469d7114b93a8aae305f4
2025-05-22 21:18:53 -07:00
Nick Gerleman 06751aa0d1 "experimental_layoutConformance" ViewProp -> "experimental_LayoutConformance" component (#48188)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48188

Yoga is full of bugs! Some of these bugs cannot be fixed without breaking large swaths of product code. To get around this, we introduced "errata" to Yoga as a mechanism to preserve bug compatibility, and an `experimental_layoutConformance` prop in React Native to create layout conformance contexts. This has allowed us to create more compliant layout behavior for XPR.

This prop was originally designed as a context-like component, so you could set a conformance level at the root of your app, and individual components could change it for compatibility. This was difficult to achieve at the time, without introducing a primitive like `LayoutConformanceView`, which itself participated in the view tree. This prop has not been the desired end-goal, since it does not make clear that it is setting a whole new context, effecting children as well!

Now that we've landed support for `display: contents`, we can achieve this desired API pretty easily.

**Before**

```
import {View} from 'react-native';

// Root of the app
<View {...props} experimental_layoutConformance="strict">
  {content}
</View>

```

**After**

```
import {View, experimental_LayoutConformance as LayoutConformance} from 'react-native';

// Root of the app
<LayoutConformance mode="strict">
  <View {...props}>
    {content}
  </View>
</LayoutConformance>

```

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D66910054

fbshipit-source-id: e6a304b5c30ad3c5845a7ce2d1021996a74c2f34
2024-12-12 14:57:04 -08:00