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

Incorrect/Reversed back arrow direction in rtl with native stack #2156

Closed
itsramiel opened this issue May 23, 2024 · 4 comments
Closed

Incorrect/Reversed back arrow direction in rtl with native stack #2156

itsramiel opened this issue May 23, 2024 · 4 comments
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@itsramiel
Copy link

itsramiel commented May 23, 2024

Description

I would like to make a react native app that support rlt languages, but an issue I am experiencing is that the back arrow in the native stack header is incorrect. The arrow is pointing left, but it should be pointing right.

Here is a video recording from the example app after triggering rtl:

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-05-23.at.18.09.24.mp4

Steps to reproduce

  1. Start the example from the repo
  2. Press on Right to Left to make it true
  3. Test stack presentation and notice how the back arrow in the header is pointing left when it should point the opposite direction(right)

Snack or a link to a repository

https://github.com/itsramiel/react-native-screens/tree/main/Example

Screens version

3.31.1

React Native version

0.74.1

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iPhone 15 Pro iOS 17.2 simulator

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Missing repro This issue need minimum repro scenario Repro provided A reproduction with a snack or repo is provided and removed Missing repro This issue need minimum repro scenario labels May 23, 2024
@kkafar
Copy link
Member

kkafar commented May 25, 2024

Is that only react-native-screens behavior or is that the case also in native applications? Do you have knowledge of this @itsramiel?

@itsramiel
Copy link
Author

@kkafar I thought that to myself too, so I investigated how rtl is manage in a vanilla ios app.

As far as I can tell and from popular apps that I tested that support rtl, the language is always changed from the ios settings for the app.

So when I added a rtl language support in xcode and switched the language to an rtl language(eg: arabic) the layout correctly switched including the back button. There is also no need to use I18nManager.

Screen.Recording.2024-05-26.at.10.32.02.AM.mov

If you have no other insights here I guess we can close it

@kkafar
Copy link
Member

kkafar commented May 27, 2024

Thanks for verifying this. I guess I will want to look into it, cause it should work in our example too, but I'm glad to hear that it does work in production env (when the RTL is forced by the user and not by I18nManager).

@tboba
Copy link
Member

tboba commented May 27, 2024

Hi @itsramiel, I believe this is a duplicate of #1884. Hence, I'll close this issue and move the discussion there! If you have any questions, please let us know.

Cheers!

@tboba tboba closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

3 participants