nativescript-rtl / ui

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

CSS "direction" property seems to have no effect on GridLayout #13

Open steinerj opened 4 years ago

steinerj commented 4 years ago

Hey @xlmnxp - great plugin!

The "direction" CSS property does not seem to have any effect on GridLayout.

The displayed content for the sample below is always: "RIGHT LEFT". It does not make a difference if the style is inline or in app.css.

The isRtl property works fine and swaps the output, if set to false.

Can you reproduce or am I missing something? Thank you for any help.

Sample xml

<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:rtl="@nativescript-rtl/ui" navigatingTo="navigatingTo">
    <ActionBar title="My App" icon=""></ActionBar>
    <rtl:GridLayout columns="*, *" class="testclass" style="direction:ltr;">
        <Label col="0" text="LEFT" class="h1"/>
        <Label col="1" text="RIGHT" class="h1"/>
    </rtl:GridLayout>
</Page>

app.css

.testclass {
    direction: ltr;
}

package.json

"dependencies": {
    "@nativescript/core": "~6.5.0",
    "@nativescript/theme": "~2.3.0",
    "tns-core-modules": "6.5.8",
    "@nativescript-rtl/ui": "~0.1.6"
  },

EDIT: Test platform is Android 29 Emulator.

xlmnxp commented 4 years ago

~Is it show any invalid message on console?~


Edit: I will fix it

steinerj commented 4 years ago

Sorry, should've mentioned in original post. There is no console output and the valueConverter in the directionProperty is never called. This might well be an upstream issue.

xlmnxp commented 4 years ago

@steinerj It works on older versions of NativeScript I don't know what they changed in NativeScript, which doesn't make it work!

This might well be an upstream issue

I think so, I will work to fix it

steinerj commented 4 years ago

@xlmnxp Thank you! Do you have any rough idea which commit/core modules version it was working with last?

xlmnxp commented 4 years ago

@xlmnxp Thank you! Do you have any rough idea which commit/core modules version it was working with last?

3.2.0