react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

[Fabric] ActivityIndicator missing transform prop

Open jonthysell opened this issue 2 years ago • 3 comments

Problem Description

In #12115, the code for the transform prop was moved in into CompositionBaseComponentView to be used by all components, but the call to updateTransformProps() was not added to ActivityIndicatorComponentView.

Steps To Reproduce

  1. Set a transform style prop on an ActivityIndicator

Expected Results

Transform is applied

CLI version

npx react-native -v

Environment

npx react-native info

Target Platform Version

10.0.19041

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

None

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

No response

jonthysell avatar Oct 03 '23 17:10 jonthysell

I tried to repro this issue locally but the transform prop seemed to be working when I tested it on the ActivityIndicatorExample.js file:

Code sample (from ActivityIndicatorExample):

title: 'Default (small, white)',
render(): Node {
  return (
    <ActivityIndicator
      style={[styles.centering, styles.gray, {transform: [{scaleX: 1}]}]}
      color="white"
    />
  );
},

Screenshot with scaleX:1: image

Screenshot with scaleX:0.5: image

Screenshot with scaleX:2: image

@jonthysell how did you repro the issue? For reference, the example file I used was in @react-native-windows/tester/js/examples.

Note: Tried to repro on repo checked out on the commit from #12163 since #12170 was the commit right after and that appears to be breaking the ActivityIndicator page in playground. Don't think it should be an issue since the change is after the change for backfaceVisibility and transform (#12115).

YajurG avatar Oct 05 '23 23:10 YajurG

@YajurG I just saw that the fabric ActivityIndicatorComponentView doesn't call updateTransformProps().

jonthysell avatar Oct 11 '23 17:10 jonthysell

When I was implementing this, I noticed Activity Indictor was already getting these props and was going through the View's updateProps method. We should find out why it's going through the ViewComponentView method and change it to call updateTransformProps() to match the other components.

TatianaKapos avatar Oct 13 '23 17:10 TatianaKapos

Unassigning, not a priority since Activity Indicator is still working with transform props, more of a question is why it's working without calling the method directly

TatianaKapos avatar May 17 '24 22:05 TatianaKapos