Commit aeae709
Route selectable text through NativeSelectableText (facebook#55678)
Summary:
Wire up the JS side to use the new SelectableTextViewManager native component. When enablePreparedTextLayout() is on, NativeSelectableText resolves to RCTSelectableText, routing selectable text through ReactTextView instead of PreparedLayoutTextView. When the flag is off, NativeSelectableText falls back to NativeText, so behavior is identical to before.
Refactor NativePressableText and NativePressableVirtualText from arrow function component expressions to component declarations (PressableText and PressableVirtualText). PressableText now accepts a selectable prop to choose between NativeSelectableText and NativeText.
Add a check(!isSelectable) guard in PreparedLayoutTextViewManager.setSelectable since selectable text now routes to SelectableTextViewManager instead.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D938294011 parent 008616e commit aeae709
File tree
4 files changed
+55
-48
lines changed- packages/react-native
- Libraries/Text
- ReactAndroid/src/main/java/com/facebook/react/views/text
4 files changed
+55
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
32 | | - | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
272 | | - | |
| 276 | + | |
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
| |||
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
292 | | - | |
| 296 | + | |
293 | 297 | | |
| 298 | + | |
294 | 299 | | |
295 | 300 | | |
296 | 301 | | |
297 | 302 | | |
298 | 303 | | |
299 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
300 | 310 | | |
301 | 311 | | |
302 | 312 | | |
| |||
463 | 473 | | |
464 | 474 | | |
465 | 475 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
474 | 479 | | |
475 | 480 | | |
476 | 481 | | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
| 482 | + | |
485 | 483 | | |
486 | | - | |
487 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
488 | 487 | | |
489 | 488 | | |
490 | 489 | | |
| |||
495 | 494 | | |
496 | 495 | | |
497 | 496 | | |
498 | | - | |
| 497 | + | |
499 | 498 | | |
500 | 499 | | |
501 | | - | |
| 500 | + | |
502 | 501 | | |
503 | 502 | | |
504 | | - | |
| 503 | + | |
505 | 504 | | |
506 | 505 | | |
507 | 506 | | |
508 | 507 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
| 508 | + | |
517 | 509 | | |
518 | | - | |
519 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
520 | 514 | | |
521 | 515 | | |
522 | 516 | | |
523 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
524 | 521 | | |
525 | | - | |
| 522 | + | |
526 | 523 | | |
527 | 524 | | |
528 | 525 | | |
529 | 526 | | |
530 | | - | |
| 527 | + | |
531 | 528 | | |
532 | 529 | | |
533 | | - | |
| 530 | + | |
534 | 531 | | |
535 | 532 | | |
536 | 533 | | |
| |||
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | | - | |
91 | 88 | | |
92 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
324 | 325 | | |
325 | 326 | | |
326 | 327 | | |
| |||
3366 | 3367 | | |
3367 | 3368 | | |
3368 | 3369 | | |
| 3370 | + | |
3369 | 3371 | | |
3370 | 3372 | | |
3371 | 3373 | | |
| |||
5157 | 5159 | | |
5158 | 5160 | | |
5159 | 5161 | | |
5160 | | - | |
| 5162 | + | |
5161 | 5163 | | |
5162 | 5164 | | |
5163 | 5165 | | |
| |||
5992 | 5994 | | |
5993 | 5995 | | |
5994 | 5996 | | |
5995 | | - | |
| 5997 | + | |
5996 | 5998 | | |
5997 | 5999 | | |
5998 | 6000 | | |
| |||
6212 | 6214 | | |
6213 | 6215 | | |
6214 | 6216 | | |
6215 | | - | |
| 6217 | + | |
6216 | 6218 | | |
6217 | 6219 | | |
6218 | 6220 | | |
| |||
0 commit comments