microsoft / microsoft/react-native-windows
Make I18nManager.swapLeftAndRightInRTL(true) the default for new apps
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
This came out of a discussion with Facebook on the current state of RTL support.
Currently, the "left" and "right" layout properties flip when direction = rtl. This is technically not W3C compliant - they are not supposed to flip. The history goes back to this being the only implementation. Now that we have "begin" and "end" versions of these properties, we could change the behavior of "left" and "right", but this is a behavior breaking change.
There was an I18nManager.swapLeftAndRightInRTL API added to make "left" and "right" behavior W3C compliant (ie not flip in rtl mode). Calling I18nManager.swapLeftAndRightInRTL(true) makes "left" and "right" not flip in rtl. Currently the default is false, because it's a breaking behavior change.
It was pointed out that for new apps, we could make I18nManager.swapLeftAndRightInRTL(true) the default, as there's no behavior change for this scenario.
This task is tracking changing the template apps generated by the CLI to turn this on.
Note that we first need to implement I18nManager.swapLeftAndRightInRTL. That is being tracked by #4662.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the CLI-generated template apps and the implementation tracked by issue #4662 first, since this task depends on I18nManager.swapLeftAndRightInRTL. Update the generated templates so new apps enable swapLeftAndRightInRTL(true), then verify that the templates contain the setting and still generate correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- internationalization, mobile-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100