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

chore: Prevent setting RTL mode in test examples #2130

Merged
merged 4 commits into from
May 14, 2024
Merged

Conversation

tboba
Copy link
Member

@tboba tboba commented May 13, 2024

Description

This PR is a follow-up to #2084 that fixes setting incorrect RTL mode in our example apps.
The reason why it is being forced is that I18nManager.forceRTL(true) is being called from the global scope, which causes to force RTL, even if we're only importing the component from file.

Changes

  • Moved I18nManager.forceRTL(true); to inner scope of App components.

Test code and steps to reproduce

Just run TestsExample & FabricTestExample ¯_(ツ)_/¯

Checklist

  • Ensured that CI passes

@tboba tboba requested a review from kkafar May 13, 2024 13:57
@tboba tboba changed the title fix: Prevent setting RTL mode in test examples chore: Prevent setting RTL mode in test examples May 13, 2024
@tboba tboba requested a review from maciekstosio May 13, 2024 13:59
Copy link
Contributor

@maciekstosio maciekstosio left a comment

Choose a reason for hiding this comment

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

One idea open for discussion, but in general looks good!

FabricTestExample/App.js Outdated Show resolved Hide resolved
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

Just single question?

FabricTestExample/src/Test654.js Outdated Show resolved Hide resolved
@tboba tboba merged commit 56f7bb5 into main May 14, 2024
5 checks passed
@tboba tboba deleted the @tboba/fix-rtl-examples branch May 14, 2024 11:34
ja1ns pushed a commit to WiseOwlTech/react-native-screens that referenced this pull request Oct 9, 2024
## Description

This PR is a follow-up to software-mansion#2084 that fixes setting incorrect RTL mode in
our example apps.
The reason why it is being forced is that `I18nManager.forceRTL(true)`
is being called from the global scope, which causes to force RTL, even
if we're only importing the component **from file**.

## Changes

- Moved `I18nManager.forceRTL(true);` to inner scope of App components.

## Test code and steps to reproduce

Just run TestsExample & FabricTestExample ¯\_(ツ)_/¯

## Checklist

- [X] Ensured that CI passes
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.

3 participants