Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make it work for RTL? #8

Open
mehulgecg opened this issue Apr 6, 2021 · 15 comments
Open

How to make it work for RTL? #8

mehulgecg opened this issue Apr 6, 2021 · 15 comments

Comments

@mehulgecg
Copy link

Really very good component, I've used this component in one of my apps but don't know how to make it work for RTL? any reference and help would be highly appreciated. Thank you so much.

@tsdmrfth
Copy link
Owner

tsdmrfth commented Apr 6, 2021

Hi. I'll have a look for what we can do to add rtl support

@mehulgecg
Copy link
Author

@tsdmrfth thanks for your consideration.

@tsdmrfth
Copy link
Owner

Fixed in #14

@tsdmrfth
Copy link
Owner

@mehulgecg New version released now. Let me know if that works now

@tsdmrfth
Copy link
Owner

This feature available now

@rajc-hkis
Copy link

rajc-hkis commented Apr 14, 2021

@tsdmrfth Great work with RTL but unfortunately it doesn't work as expected.

  1. In RTL, all things should be reversed and starting from right side. In your component list starts from left side even when I set isRTL to true.
  2. When we swipe from left to right, whole list goes out of screen.
  3. In RTL mode, list item is showed in new line if there is not enough space available in the screen, which is not what this component is made for right? It should show horizontal scrolling.

@tsdmrfth
Copy link
Owner

tsdmrfth commented Apr 14, 2021

Hi @rajc-hkis. Which version of react-native-steve component are you using?

@rajc-hkis
Copy link

@tsdmrfth I am on latest 0.4.1

@tsdmrfth
Copy link
Owner

This is from current version. Seems work correctly. What is the wrong about that?

Screen.Recording.2021-04-14.at.16.41.42.mov

@rajc-hkis
Copy link

@tsdmrfth Looks like it works for you which is good sign.

I use forceRTL(true) in my app, you think that can cause issue? Since you use row-reverse when isRTL is set to true, I think that could be it. I attached video, so you can have better idea of the issue I am facing. :)

Screen.Recording.2021-04-16.at.11.01.13.AM.mov

@tsdmrfth
Copy link
Owner

Hi @rajc-hkis can you also provide some code about you issue?

@rajc-hkis
Copy link

@tsdmrfth Code is same as provided in README file of this repo.
There is only one difference and that is I use I18nManager.forceRTL(true); to make my whole app in RTL layout.

@tsdmrfth
Copy link
Owner

I think that is the reason for the issue. forceRTL function call makes row reversed twice. RTL layout check should be done in component instead of expecting prop.

@rajc-hkis
Copy link

@tsdmrfth Yes, agreed.

You can check whether app is RTL or not by I18nManager.isRTL property.
Plus, I think you should keep the prop there in case someone wants to have RTL layout without forceRTL. What do you think? ;)

@tsdmrfth
Copy link
Owner

tsdmrfth commented Apr 16, 2021

@rajc-hkis That makes sense 👊🏿

@tsdmrfth tsdmrfth reopened this Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants