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

TransformOrigin Props not parsed or updated #13451

Open
sharath2727 opened this issue Jul 16, 2024 · 1 comment
Open

TransformOrigin Props not parsed or updated #13451

sharath2727 opened this issue Jul 16, 2024 · 1 comment
Labels
Area: Fabric Support Facebook Fabric Area: View Style Props https://reactnative.dev/docs/view-style-props Area: View bug New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric
Milestone

Comments

@sharath2727
Copy link
Contributor

sharath2727 commented Jul 16, 2024

### Problem Description

I can see that while applying transform and transformOrigin props, the transform prop is propagated into the platform but transformOrigin is not being propagated into the platform.

Steps To Reproduce

Use the below tsx file and notice the transformOrigin not taking effect:

import` React from 'react';
import { AppRegistry, View, Animated, StyleSheet } from 'react-native';

export default class Bootstrap extends React.Component {
  render() {
    return (
      <View style={styles.container}>
            <View style={styles.transformOriginWrapper} >
                <Animated.View
                    style={styles.transformOriginView} />
            </View>
      </View>
    );
  }
}
const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center', // Center vertically
        alignItems: 'center', // Center horizontally
        backgroundColor: 'white', // Optional: set a background color for the parent container
    },
    transformOriginWrapper: {
        borderWidth: 1
    },
    transformOriginView: {
        backgroundColor: 'gray',
        width: 100,
        height: 100,
        transform: [
            { rotate: '-45deg' }
        ],
        transformOrigin: 'bottom right'
    },
});
AppRegistry.registerComponent('Bootstrap', () => Bootstrap);

Expected Results

Expected: 45 deg transform should happen at bottom right

CLI version

14.0.0-alpha.2

Environment

info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.26252
  CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
  Memory: 14.55 GB / 31.85 GB
Binaries:
  Node:
    version: 18.18.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.19
    path: C:\Program Files (x86)\Yarn\bin\yarn.CMD
  npm:
    version: 9.8.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
    Versions:
      - 10.0.17763.0
      - 10.0.18362.0
      - 10.0.19041.0
      - 10.0.22000.0
      - 10.0.22621.0
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.10.35013.160 (Visual Studio Enterprise 2022)
Languages:
  Java: Not Found
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Community Modules

No response

Target Platform Version

10.0.22621

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

Snack, code example, screenshot, or link to a repository

No response

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Jul 16, 2024
@sharath2727 sharath2727 added Area: Fabric Support Facebook Fabric and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Jul 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric label Jul 16, 2024
@sharath2727 sharath2727 self-assigned this Jul 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Invalid Triage https://github.com/microsoft/react-native-windows/wiki/Triage-Process (label applied by bot) label Jul 17, 2024
@sharath2727 sharath2727 removed their assignment Jul 17, 2024
@chrisglein
Copy link
Member

chrisglein commented Jul 22, 2024

Only handling of transformOrigin today seems to be in the JS. Was it not handled in Paper? Or does it get transformed into some other props that come through differently? Needs some investigation of whether this worked before and how it is supposed to propagate from the JS.

https://reactnative.dev/docs/next/transforms

On UWP XAML I would have expected this to set something like this: https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.uielement.rendertransformorigin?view=winrt-26100

@chrisglein chrisglein added this to the Next milestone Jul 22, 2024
@chrisglein chrisglein added Area: View Area: View Style Props https://reactnative.dev/docs/view-style-props and removed Invalid Triage https://github.com/microsoft/react-native-windows/wiki/Triage-Process (label applied by bot) labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Fabric Support Facebook Fabric Area: View Style Props https://reactnative.dev/docs/view-style-props Area: View bug New Architecture Broad category for issues that apply to the RN "new" architecture of Turbo Modules + Fabric
Projects
None yet
Development

No branches or pull requests

2 participants