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

RTL support #69

Closed
Tracked by #70
Mohamed-kassim opened this issue Jan 4, 2022 · 12 comments
Closed
Tracked by #70

RTL support #69

Mohamed-kassim opened this issue Jan 4, 2022 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@Mohamed-kassim
Copy link

Thanks for the amazing performance and effort in creating this package.
I saw the previous issue but it needs to reopen again
in react native on change layout direction to RTL, the component should start and be animated from right to left
also by default react-native inverts the dimensions from right to left for most of the styles and this should be considered if the user is using RTL Device
This is a 2 recorded videos for the basic "parallax" mode on LTR and RTL on IOS

  • On LTR Working great
ltr.mov
  • On RTL the issue appears
rtl.mov

you can reproduce the issue with the basic example by converting to RTL, it think I18nManager.forceRTL(false); and then restarting the app is enough

@dohooo
Copy link
Owner

dohooo commented Jan 4, 2022

OK, let me think~ 🍺

@dohooo dohooo self-assigned this Jan 4, 2022
@dohooo dohooo added the enhancement New feature or request label Jan 4, 2022
@Mohamed-kassim
Copy link
Author

@dohooo snap carousel wasn't great in this and have issues as they were restricted with their implementation, but also they provided different workarounds
U can check their repo for their recommenditions and issues

@dohooo
Copy link
Owner

dohooo commented Jan 4, 2022

@dohooo snap carousel wasn't great in this and have issues as they were restricted with their implementation, but also they provided different workarounds
U can check their repo for their recommenditions and issues

haha ok

dohooo added a commit that referenced this issue Jan 4, 2022
@dohooo
Copy link
Owner

dohooo commented Jan 4, 2022

1.2.0-beta.0
Try it. We'll be releasing the official version over the weekend!~ Thanks for your advice and letting me know there is this mode lol

@dohooo dohooo closed this as completed Jan 4, 2022
@dohooo dohooo mentioned this issue Jan 4, 2022
2 tasks
@dohooo
Copy link
Owner

dohooo commented Jan 4, 2022

RTL.mov

@dohooo
Copy link
Owner

dohooo commented Jan 4, 2022

in react native on change layout direction to RTL, the component should start and be animated from right to left

If you use autoplay props, I think you can set autoplayReverse props. I don't think we should do this on behalf of the user because I think it will cause some problems that are hard to find

@Mohamed-kassim
Copy link
Author

in react native on change layout direction to RTL, the component should start and be animated from right to left

If you use autoplay props, I think you can set autoplayReverse props. I don't think we should do this on behalf of the user because I think it will cause some problems that are hard to find

yes, you are right about this.
also after installing 1.2.0-beta.1 the animation and parallax effect works great, thanks a lot tested on android and ios

but I found that the item layout changed like this, as it has no height although the item container have flex:1
Screen Shot 2022-01-04 at 2 07 57 PM

I checked my code and I found I am not giving the carousel component height as mentioned in the docs that it has default with '100%', and my parent container has a fixed width and height
so I tried to give it '100%' manually, and I got this
Screen Shot 2022-01-04 at 2 03 45 PM
so it tried to give it constant height manually and it works well
also, there's a typescript error that height type is only number | undefined,.
I don't know if this is on purpose and the API changed but the documentation is still not or that's something new
my previous version was ^1.0.11

@dohooo
Copy link
Owner

dohooo commented Jan 4, 2022

I checked my code and I found I am not giving the carousel component height as mentioned in the docs that it has default with '100%', and my parent container has a fixed width and height
so I tried to give it '100%' manually, and I got this

It's true that I didn't update the document here, and the current way no longer supports strings.

BTW. Is there a chat room for us to communicate more quickly?

@dohooo dohooo reopened this Jan 4, 2022
@Mohamed-kassim
Copy link
Author

Mohamed-kassim commented Jan 4, 2022

It's true that I didn't update the document here, and the current way no longer supports strings.

aah, okay

BTW. Is there a chat room for us to communicate more quickly?

I am on discord (MohamedKassim#9559), Twitter (@m_kassim90), whatever you prefer

@dohooo
Copy link
Owner

dohooo commented Jan 4, 2022

https://discord.com/invite/KsXRuDs43y

come here :P

@dohooo
Copy link
Owner

dohooo commented Jan 4, 2022

@dohooo dohooo closed this as completed Jan 4, 2022
@Mohamed-kassim
Copy link
Author

try with 1.2.0-beta.2 v1.2.0-beta.2 (release)

solved now, thanks

dohooo added a commit that referenced this issue Jan 5, 2022
re #69

feat: support to RTL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants