ui icon indicating copy to clipboard operation
ui copied to clipboard

`isRtl` flag reverses text

Open williamjuan027 opened this issue 5 years ago • 4 comments

isRtl flag when binded to a dynamic value reverses the layout consistently but also reverses the content of the text (the text becomes backwards).

<!-- Breaks -->
<RStackLayout [isRtl]="isRtl">
  <Label text="some text"></Label> <!-- Gets reversed --> 
</RStackLayout>

<!-- Works -->
<RStackLayout></RStackLayout>
<RStackLayout isRtl="false"></RStackLayout>
<RStackLayout isRtl="true"></RStackLayout>

Screenshot Notice that the text in the above screenshot is reversed

williamjuan027 avatar Aug 27 '20 13:08 williamjuan027

I will work to embed RTL support to NativeScript main repo

xlmnxp avatar Aug 31 '20 17:08 xlmnxp

isRtl flag when binded to a dynamic value reverses the layout consistently but also reverses the content of the text (the text becomes backwards).

<!-- Breaks -->
<RStackLayout [isRtl]="isRtl">
  <Label text="some text"></Label> <!-- Gets reversed --> 
</RStackLayout>

<!-- Works -->
<RStackLayout></RStackLayout>
<RStackLayout isRtl="false"></RStackLayout>
<RStackLayout isRtl="true"></RStackLayout>

Screenshot Notice that the text in the above screenshot is reversed

is it happen now? text should reversed back

xlmnxp avatar Jun 14 '21 05:06 xlmnxp

For me, the text gets reversed when I nest some layout inside a RGridLayout <RGirdLayout [isRtl]="isRtl"> <FlexboxLayout> <Label text="some text"></Label> <!-- Gets reversed --> </FlexboxLayout> </RGridLayout>

boris01 avatar Jun 15 '21 13:06 boris01

For me, the text gets reversed when I nest some layout inside a RGridLayout <RGirdLayout [isRtl]="isRtl"> <FlexboxLayout> <Label text="some text"></Label> <!-- Gets reversed --> </FlexboxLayout> </RGridLayout>

for now, @nativescript-rtl/ui not loop to inner components, I will make it loop to nested elements

xlmnxp avatar Jun 16 '21 02:06 xlmnxp