Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transform prop on View component #2102

Merged
merged 5 commits into from
Mar 25, 2024

Conversation

amgleitman
Copy link
Member

@amgleitman amgleitman commented Mar 22, 2024

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.

@amgleitman amgleitman requested a review from a team as a code owner March 22, 2024 23:37
Copy link
Collaborator

@Saadnajmi Saadnajmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some nits. mostly on comments and naming

packages/react-native/React/Views/RCTView.m Show resolved Hide resolved
packages/react-native/React/Views/RCTView.m Outdated Show resolved Hide resolved
packages/react-native/React/Views/UIView+React.h Outdated Show resolved Hide resolved
packages/react-native/React/Views/UIView+React.m Outdated Show resolved Hide resolved
@amgleitman amgleitman merged commit a1ac18a into microsoft:main Mar 25, 2024
16 checks passed
@amgleitman amgleitman deleted the fix-transform-prop branch March 25, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The transform style does not work in version 0.73.*
2 participants