Repository navigation
Conversation
LocaleProvider only told Paper's components the direction, so on web a subtree under it mixed both directions: Switch and the TextInput label followed it, while rows, start and end styles, and the icons of Button, Chip and List.Item kept the page's direction. A lone endAccessory overlapped the TextInput label. On web, LocaleProvider now also wraps its children in a View with `dir` and `display: contents`: react-native-web reads `dir` for start and end styles, and the browser for rows and text. Portal carries it to content opened from the subtree, such as a Menu. PaperProvider still leaves the layout direction of the app to the page (`<html dir>`), and native is unchanged, since I18nManager sets the layout direction for the whole app.
|
Found potential problems with the pull request:
|
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
This branch has not been deployed
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.
Motivation
On web,
LocaleProvideronly told Paper's components the direction, so under a lone<LocaleProvider direction="rtl">Switch and the TextInput label went right to left while Button, Chip, List.Item and TextInput accessories stayed left to right. A loneendAccessoryoverlapped the label.LocaleProvidernow wraps its children on web in adisplay: contentsView withdir, andPortalcarries it to menus and dialogs.PaperProviderand native are unchanged.Related issue
Follow-up to #5219.
Screenshots / Videos
Web, before and after:
Test plan
LocaleProvidertests fail without the change.LocaleProvidersubtree.