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

fix(ios): Fix vertical list scroll directionin rtl #885

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DrRefactor
Copy link
Contributor

@DrRefactor DrRefactor commented Oct 8, 2024

Summary

When in RTL, vertical pager view is scrolling backwards. This is unwanted behavior (only horizontal axis should be inverted in RTL).

Test Plan

Test LTR & RTL in legacy pager view.

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)

@troZee
Copy link
Member

troZee commented Oct 16, 2024

@DrRefactor could you provide any documentation for the RTL, when the component is scrollable vertically?

@DrRefactor
Copy link
Contributor Author

@troZee For vertically scrolled lists, there's basically no change in layout in RTL vs LTR. The only one difference in this case is when the vertically scrolled list is a grid, then the first element should be aligned to the right edge.
See: https://developer.apple.com/design/human-interface-guidelines/right-to-left

@@ -309,6 +309,10 @@ - (BOOL)isLtrLayout {
return [_layoutDirection isEqualToString: @"ltr"];
}

- (BOOL)isHorizontalRtlLayout {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you extract this function to a separate file? It is used in two places.

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

Successfully merging this pull request may close these issues.

2 participants