Commit 3cf4024
Add startViewTransitionReadyFinished callback (#56461)
Summary:
Pull Request resolved: #56461
## Changelog:
[Internal] [Added] - Add startViewTransitionReadyFinished callback
Add `startViewTransitionReadyFinished()` to the view transition delegate so the reconciler can notify the native side when the ready callback's async work (e.g. spawned work from the `ready` promise `.then` - which includes invoking view transition event callbacks, starting animations from these callbacks) has completed. This was previously not capturable from the C++ side since `onReadyCallback` resolves the JS promise synchronously but the reconciler's follow-up work runs as a microtask.
- Add `startViewTransitionReadyFinished` to `UIManagerViewTransitionDelegate` and `ViewTransitionModule`
- Expose as a method on `nativeFabricUIManager` via `UIManagerBinding`
- Track `transitionReadyFinished_` state, reset to `false` before `onReadyCallback` and set to `true` when the reconciler calls back
Reviewed By: sammy-SC
Differential Revision: D99443648
fbshipit-source-id: 042f288c90d7548789185f7f0e46be73a12dcab41 parent fd0bc69 commit 3cf4024
4 files changed
Lines changed: 29 additions & 1 deletion
File tree
- packages/react-native/ReactCommon/react/renderer
- uimanager
- viewtransition
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
1095 | 1113 | | |
1096 | 1114 | | |
1097 | 1115 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
| 356 | + | |
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
369 | 373 | | |
370 | 374 | | |
371 | 375 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| |||
0 commit comments