nativescript-rtl / ui

Add right-to-left support to the NativeScript framework
MIT License
24 stars 3 forks source link

`isRtl` flag reverses text #16

Open williamjuan027 opened 4 years ago

williamjuan027 commented 4 years ago

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

xlmnxp commented 4 years ago

I will work to embed RTL support to NativeScript main repo

xlmnxp commented 3 years ago

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

boris01 commented 3 years ago

For me, the text gets reversed when I nest some layout inside a RGridLayout `<RGirdLayout [isRtl]="isRtl">

`

xlmnxp commented 3 years ago

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