Commit 482b782
authored
fix: RTL mode fixes (#3546)
## π― Goal
RTL mode fixes from [QA
test](https://www.notion.so/stream-wiki/RN-QA-New-Design-30d6a5d7f9f680d29ba1f9eadfcc787e)
## π Implementation details
### 1. Mirror icons based on
[Figma](https://www.figma.com/design/Us73erK1xFNcB5EH3hyq6Y/Chat-SDK-Design-System?node-id=13696-41010&t=9ujyMjzsjIngT6jR-0)
All icons from this table should be mirrored after this PR is merged:
| Old name | New name | src | already mirrored |
|----------|----------|-----|------------------|
| `IconArrowBoxLeft` | `leave` | `package/src/icons/leave.tsx`
(`ArrowBoxLeft`) | no |
| `IconArrowLeft` | `arrow-left` |
`examples/SampleApp/src/icons/GoBack.tsx` (`GoBack`) β back chevron; in
core, closest directional stroke icon is
`package/src/icons/chevron-left.tsx` (`ChevronLeft`) | yes (SampleApp
`GoBack` only) |
| `IconArrowRight` | `arrow-right` |
`examples/SampleApp/src/icons/RightArrow.tsx` (`RightArrow`) β arrow
path flipped with a **fixed** `matrix(-1 β¦)`; optional chevron-style:
`examples/SampleApp/src/icons/GoForward.tsx` (`GoForward`) | no for
`RightArrow`; yes for `GoForward` |
| `IconArrowUpRight` | `arrow-left` |
`package/src/icons/arrow-up-right.tsx` (`ArrowUpRight`) | no |
| `IconBubbles` | `message-bubbles` | No `message-bubbles` file. Closest
in SampleApp: `examples/SampleApp/src/icons/ChatsTab.tsx` (overlapping
chat bubbles). In core, only single-outline bubble:
`package/src/icons/message-bubble.tsx` (`MessageBubbleEmpty`) | no |
| `IconBubbleText6ChatMessage` | `thread` |
`package/src/icons/thread.tsx` (`ThreadReply`) | no |
| `IconBubbleText6Solid` | `thread-fill` | *(none β no filled thread /
`thread-fill` icon in these folders)* | β |
| `IconBubble2` | `message-bubble` |
`package/src/icons/message-bubble.tsx` (`MessageBubbleEmpty`) | no |
| `IconBubble2Solid` | `message-bubble-fill` | *(none β no filled
`message-bubble` variant in these folders)* | β |
| `IconChevronLeft` | `chevron-left` |
`package/src/icons/chevron-left.tsx` (`ChevronLeft`) β not re-exported
from `package/src/icons/index.ts` but used via direct import | no |
| `IconChevronRight` | `chevron-right` | No `chevron-right` in core
icons. `examples/SampleApp/src/icons/GoForward.tsx` (`GoForward`)
matches chevron-right behavior | yes |
| `IconArrowShareLeft` | `reply` | `package/src/icons/reply.tsx`
(`CurveLineLeftUp` / alias `ArrowShareLeft`) | no |
| `IconLayoutLeft` | `sidebar` | *(none β no sidebar / layout-left icon
in these folders)* | β |
| `IconMagnifyingGlassSearch` | `search` |
`package/src/icons/search.tsx` (`Search`); SampleApp duplicate:
`examples/SampleApp/src/icons/Search.tsx` | no |
| `IconMinusSmall` | `mute` | `package/src/icons/mute.tsx` (`Mute`);
SampleApp: `examples/SampleApp/src/icons/Mute.tsx` | no |
| `IconPaperPlane` | `send` | `package/src/icons/send.tsx` (`SendRight`)
| no |
| `IconVideo` | `video` | `package/src/icons/video.tsx` (`VideoIcon`) |
no |
| `IconVideoSolid` | `video-fill` | `package/src/icons/video-fill.tsx`
(`Recorder` β filled camera / video glyph; filename is `video-fill`) |
no |
| `IconVolumeFull` | `audio` | `package/src/icons/audio.tsx` (`Sound`) |
no |
Relevant issues from QA Notion:
- Some issues with channel preview -> Muted icon wrong direction
- Some issues with channel preview -> Video icon wrong direction
- Some issues with Channel info screen -> Arrows (wrong direction)
- Some issues with Channel info screen -> Muted icon (wrong direction)
- [RTL] Swipe to reply icon has a wrong direction
- [RTL] Some issues with composer -> Send button (wrong direction)
### 2. Channel preview fixes
Relevant [block in
Notion](https://www.notion.so/stream-wiki/RN-QA-New-Design-30d6a5d7f9f680d29ba1f9eadfcc787e?source=copy_link#3346a5d7f9f68041a8dce1c570fe45b3):
- [RTL] Some issues with channel preview -> Voice recording (expected
order: mic icon, text, duration)
- [RTL] Some issues with channel preview -> Β Multiple attachments
(expected order: attachments icon, count, text)
`useMessagePreviewText` didn't translate message labels like "Voice
Recording (0:05)"
<img width="334" height="83" alt="Screenshot 2026-04-10 at 13 06 36"
src="https://github.com/user-attachments/assets/c81afec3-2a55-4ccf-84db-5a2a6a99ad27"
/>
### 3. Mirroring switch in RTL mode
Relevant Notion block:
[RTL] Some issues with Polls screen -> The pointer moves to the wrong
direction when user is typing
[RTL] Some issues with Channel info screen -> [iOS] Toggle (wrong
direction)
Added a mirroring to all switch elements (off state is on the right
side, instead of left) on iOS. On Android the default behavior is
correct, no need for mirroring.
<img width="463" height="999" alt="Screenshot 2026-04-10 at 15 18 31"
src="https://github.com/user-attachments/assets/ded00711-91b9-49bf-853a-645bb6aa5434"
/>

### 4. Search bar not mirrored in RTL mode
These are changes in the SampleApp:
From Notion: [RTL] Search field is not mirrored, both channel search and
user search
Channel search:
<img width="480" height="995" alt="Screenshot 2026-04-14 at 10 10 32"
src="https://github.com/user-attachments/assets/fc5c4c1d-6ca3-46b7-8e61-ad8a63adecf7"
/>
User search - I assume this is the new DM screen, but this one seems
fine to me without any change:
<img width="427" height="910" alt="Screenshot 2026-04-10 at 16 29 28"
src="https://github.com/user-attachments/assets/5d269bec-04af-45f8-be3f-9d1c5ab1824a"
/>
### 5. Fix quoted message layout
From Notion: "[RTL] Quoted reply has a wrong direction in both composer
and message list"
Fix:
- Missing translation keys
- `renderText` wrong text alignment
<img width="407" height="502" alt="Screenshot 2026-04-13 at 14 00 37"
src="https://github.com/user-attachments/assets/9493afe5-9ea1-4b0a-af52-cd3d8b2f57b8"
/>
<img width="398" height="467" alt="Screenshot 2026-04-13 at 14 03 47"
src="https://github.com/user-attachments/assets/92cd8c1b-c423-4b25-9c1d-14c6e2e41a4a"
/>
### 6. Fix channel details screen
[RTL] Some issues with Channel info screen -> [iOS] Members title (wrong
direction)
[RTL] Some issues with Channel info screen -> [iOS] In general many
things are shifted -> I think the icon fixes + title fixes all issues
(see attached screenshot)
<img width="456" height="908" alt="Screenshot 2026-04-14 at 8 32 03"
src="https://github.com/user-attachments/assets/dd8c5f88-50de-46f7-8489-a9adef645b12"
/>
## π¨ UI Changes
## π§ͺ Testing
Tested on iOS and Android
## βοΈ Checklist
- [ ] I have signed the [Stream
CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform)
(required)
- [ ] PR targets the `develop` branch
- [ ] Documentation is updated
- [ ] New code is tested in main example apps, including all possible
scenarios
- [ ] SampleApp iOS and Android
- [ ] Expo iOS and Android1 parent 439be22 commit 482b782
44 files changed
Lines changed: 621 additions & 230 deletions
File tree
- examples/SampleApp/src
- components
- icons
- screens
- utils
- package/src
- components
- MessageInput/__tests__/__snapshots__
- Message/MessageItemView
- __tests__/__snapshots__
- utils
- Poll
- components
- Reply
- Thread/__tests__/__snapshots__
- hooks/messagePreview
- i18n
- icons
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| 225 | + | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
13 | 26 | | |
| 27 | + | |
14 | 28 | | |
15 | 29 | | |
16 | 30 | | |
17 | 31 | | |
| 32 | + | |
18 | 33 | | |
19 | 34 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
14 | | - | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | | - | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
0 commit comments