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

feat!: add a direction prop to NavigationContainer to specify rtl #11393

Merged
merged 4 commits into from
Sep 4, 2023

Conversation

satya164
Copy link
Member

BREAKING CHANGE: Previously the navigators tried to detect RTL automatically and
adjust the UI. However this is problematic since we cannot detect RTL in all cases
(e.g. on Web).

This adds an optional direction prop to NavigationContainer instead
so that user can specify when React Navigation's UI needs to be adjusted for RTL. It defaults to the value from I18nManager on native platforms, however it needs to be explicitly passed for Web.

@netlify
Copy link

netlify bot commented May 31, 2023

Deploy Preview for react-navigation-example ready!

Name Link
🔨 Latest commit 0577497
🔍 Latest deploy log https://app.netlify.com/sites/react-navigation-example/deploys/64f6006e5466a1000824acea
😎 Deploy Preview https://deploy-preview-11393--react-navigation-example.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 70.45% and project coverage change: +0.16 🎉

Comparison is base (7d8b515) 75.43% compared to head (57017e0) 75.59%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11393      +/-   ##
==========================================
+ Coverage   75.43%   75.59%   +0.16%     
==========================================
  Files         189      191       +2     
  Lines        5712     5713       +1     
  Branches     2254     2238      -16     
==========================================
+ Hits         4309     4319      +10     
+ Misses       1353     1344       -9     
  Partials       50       50              
Impacted Files Coverage Δ
packages/stack/src/views/Stack/StackView.tsx 54.24% <ø> (ø)
...src/TransitionConfigs/HeaderStyleInterpolators.tsx 13.79% <16.66%> (+1.29%) ⬆️
packages/elements/src/Header/HeaderBackButton.tsx 70.58% <50.00%> (-2.89%) ⬇️
packages/stack/src/utils/getInvertedMultiplier.tsx 40.00% <50.00%> (ø)
packages/stack/src/views/Stack/Card.tsx 61.90% <60.00%> (ø)
...kages/drawer/src/views/DrawerContentScrollView.tsx 91.66% <75.00%> (+0.75%) ⬆️
packages/native/src/useLocale.tsx 80.00% <80.00%> (ø)
packages/drawer/src/views/DrawerView.tsx 64.63% <100.00%> (+0.43%) ⬆️
packages/native-stack/src/views/HeaderConfig.tsx 63.46% <100.00%> (ø)
packages/native/src/LocaleDirContext.tsx 100.00% <100.00%> (ø)
... and 7 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

…/ltr

BREAKING CHANGE: Previously the navigators tried to detect RTL automatically and
adjust the UI. However this is problematic since we cannot detect RTL in all cases
(e.g. on Web).

This adds an optional `direction` prop to `NavigationContainer` instead
so that user can specify when React Navigation's UI needs to be adjusted for RTL.
@satya164 satya164 enabled auto-merge (squash) September 4, 2023 16:06
@satya164 satya164 merged commit 8309636 into main Sep 4, 2023
8 checks passed
@satya164 satya164 deleted the @satya164/locale-dir branch September 4, 2023 16:09
@a-eid
Copy link

a-eid commented Feb 1, 2024

@satya164 I can't find such direction prop on NavigationContainer ?

Copy link

github-actions bot commented Feb 1, 2024

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

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.

None yet

3 participants