fix(iOS, SplitView): Remove tracking presentation layer in favor of sync state update #3285
+5
−137
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.
Description
This code was originally added to mitigate issues with jumping content during transitions. By observing the presentation layer, we were able to send intermediate column size updates, which helped with making smoother animation.
However, with the current ability to send immediate updates, it seems that it now works well with the native SplitView transition. As a result, we can remove the previously added logic, which was initially introduced in: #3073
How it appears to work now:

How it appeared to work with DisplayLink:

Having the final frame set immediately, we can rely on the native animation (which implementation is a mystery for us). Still, it seems that we're following the same path as natively, where I also observed that the final frame is set at the beginning of the animation. This model appears to work similarly to the Android version. For example, when animating the keyboard, we can read the target value on animation start https://developer.android.com/develop/ui/views/layout/sw-keyboard#:~:text=onStart%20is%20called,the%20view%20properties. It seems that setting intermediate frames, following the presentation layer, might be slightly delayed for the value we read in comparison to the value that is currently drawn.
Fixes https://github.com/software-mansion/react-native-screens-labs/issues/496
Changes
Screenshots / GIFs
Here you can add screenshots / GIFs documenting your change.
You can add before / after section if you're changing some behavior.
Before
497769228-ff8df4c8-e0a6-46d5-a797-44f099f5968a.mov
After
after.mov
Test code and steps to reproduce
I went through SplitView examples, having synchronous updates in SplitView and additionally sync updates for Stack v4 #3282 . I focused on testing that there's no regression with pressables.
Checklist