microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.24k stars 1.14k forks source link

Right-to-left Text example incorrectly displayed on Fabric app #12716

Open Yajur-Grover opened 7 months ago

Yajur-Grover commented 7 months ago

On the Text example page in the testFabric Gallery app, the right-to-left text example is displaying as left-to-right as shown below:

Current Paper Gallery: image

Fabric Gallery app: image

Labeled as enhancement as it looks like a feature that we will likely add in the future.

chrisglein commented 7 months ago

@Yajur-Grover can you add a note of which specific prop is being set? This is happening due to prop on the control and not region setting. We need both to work.

Yajur-Grover commented 7 months ago

Looks like the writingDirection prop is being set to: writingDirection: 'rtl' in the Right-to-left example. Code sample from example page is this:

        <Text
          style={{
            textTransform: 'uppercase',
            backgroundColor: colors.border,
            writingDirection: 'rtl',
          }}>
          Here is a line of capitalized text with Right-to-Left writing
          direction and background color.
        </Text>
danielayala94 commented 2 months ago

@Yajur-Grover is this a dupe of #13114?