Repository navigation
Commit 8361ec1
Add RTL text support, ported onto the post-rewrite development branch
Reimplements PR BlueBubblesApp#3049's right-to-left support (Farsi/Arabic/Hebrew) on top
of `development` instead of the old master-based branch, per jjoelj's note.
- getTextDirection(): first-strong (UAX#9) direction detection over runes
(lib/helpers/ui/text_direction_helpers.dart); applied as the textDirection
of message bubbles, reply bubbles, conversation-list title/subtitle, and the
send animation (no LTR flash on send).
- Compose + subject TextFields wrapped in TextDirectionBuilder so they flip
direction live but rebuild only on an actual first-strong flip (fixes the
cursor-drag-cancel bug).
- getNotificationText() wraps embedded message text in a Unicode First-Strong
Isolate (U+2068..U+2069) so quoted RTL renders correctly inside LTR.
- Grapheme-cluster-safe editing (lib/helpers/ui/grapheme_text_helpers.dart):
emoji-picker insert and the controller value-setter snap to cluster
boundaries and repair IME-split surrogate pairs (the "??" corruption); a
repaired edit also clears the now-stale composing region (the cursor-gap bug).
- Re-enables flutter_test; adds test/rtl_detection_test.dart and
test/grapheme_text_helpers_test.dart (detection, boundary snapping,
insert/replace fuzz, IME-split recovery, composing-clear).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YPSpEnnJze96m53nX9k1421 parent 92de402 commit 8361ec1
15 files changed
Lines changed: 749 additions & 202 deletions
File tree
- lib
- app
- components
- layouts
- conversation_list/widgets/tile
- conversation_view/widgets
- message
- reply
- text
- text_field
- helpers
- types/extensions
- ui
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
| |||
128 | 140 | | |
129 | 141 | | |
130 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
131 | 146 | | |
132 | 147 | | |
133 | 148 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
| 278 | + | |
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
0 commit comments