fix: iOS honor RCTI18nUtil RTL on New Architecture#803
Open
kashmiry wants to merge 1 commit intocallstack:mainfrom
Open
fix: iOS honor RCTI18nUtil RTL on New Architecture#803kashmiry wants to merge 1 commit intocallstack:mainfrom
kashmiry wants to merge 1 commit intocallstack:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
On the New Architecture (Fabric) on iOS, the slider follows the device language instead of the app's language.
So if the app is in (RTL) and forced with:
but the device is in English (LTR), the slider appears flipped — the filled side and drag direction don't match the rest of the app's UI. Same problem in reverse: English app on an Arabic device.
This fix makes the slider follow the app's direction (
I18nManager.forceRTL) regardless of what the device is set to.issue.mov
fixed.mov
Test Plan:
Tested on the New Architecture (Fabric) on iOS with all four combinations of device locale × app forced direction. The slider's filled track grows from the value-minimum side as defined by the app's direction in every case:
forceRTL(true))forceRTL(false))Also verified:
tapToSeektaps land at the correct value in all four combinations.invertedprop still works on top of the new baseline direction.Repro steps (before the fix):
I18nManager.forceRTL(true)and restart.