microsoft / react-native-macos

A framework for building native macOS apps with React.
https://microsoft.github.io/react-native-windows/
MIT License
3.37k stars 129 forks source link

Fix `transform` prop on `View` component #2102

Closed amgleitman closed 3 months ago

amgleitman commented 3 months ago

Summary:

Fixes #2038.

We believe that the bug was introduced when this commit was merged in. This commit refactors how the transform prop is handled on the native side, but we didn't properly adapt it for macOS. We do that now.

Test Plan:

We added a {skewX: '10deg'} transform to the "New App Screen Colors" section on the new app screen example in RNTester. The skew now appears correctly as it did under 0.72-stable.

Before After
Screenshot 2024-03-22 at 4 14 52 PM Screenshot 2024-03-22 at 4 14 12 PM

Also verified that animations involving transformations work as well.