-
Notifications
You must be signed in to change notification settings - Fork 48.8k
Measure Updated ViewTransition Boundaries #32653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The restore phase should not check the flag. I removed that condition in the other passes. We stash previous measurments on "current". We should also clear that same Fiber. Also, when we cancel we need to visit the same Fiber we applied names to in case it changed. In practice this doesn't matter because if it did change we couldn't cancel it.
…celled If not cancelled, this is the path that adds the "new" name. Since the "old" name was only added to the clones, this will be the first time they're added, even if the HostInstances are shared.
We don't need to hold onto it all the way to the passive commit.
Don't update the button in the fixture optimistically to highlight this.
This allows us to adjust the measurement of the clone which is outside the viewport as if it was inside of it.
Because we don't use the helpers in CommitHostEffects we have to manually track whether this caused any mutations for deletions, insertions, hides, unhides and updates to text content. Otherwise, we end up canceling boundaries that should've animated.
This avoids actually animating the "Swipe me" bar since it doesn't change and its parents doesn't change. That avoids this Safari iOS bug: https://bugs.webkit.org/show_bug.cgi?id=288795 This means that the fixture now works on iOS Beta with the Scroll-driven flag on. In fact, it doesn't even have the bug I mentioned above which I'm observing on Safari Technical Preview on desktop. It is cheating though because really should be able to wrap the SwipeRecognizer around the content that animates. |
This does the same thing for that we did for in e3cbaff. If a boundary hasn't mutated and didn't change in size, we mark it for cancellation. Otherwise we add names to it. The different from the CommitViewTransition path is that the old names are added to the clones so this is the first time the new names. Now we also cancel any boundaries that were unchanged. So now the root no longer animates. We still have to clone them. There are other optimizations that can avoid cloning but once we've done all the layouts we can still cancel the running animation and let them just be the regular content if they didn't change. Just like the regular fire-and-forget path. This also fixes the measurement so that we measure clones by adjusting their position back into the viewport. This actually surfaces a bug in Safari that was already in #32612. It turns out that the old names aren't picked up for some reason and so in Safari they looked more like a cross-fade than what #32612 was supposed to fix. However, now that bug is even more apparent because they actually just disappear in Safari. I'm not sure what that bug is but it's unrelated to this PR so will fix that separately. DiffTrain build for [3c3696d](3c3696d)
This does the same thing for that we did for in e3cbaff. If a boundary hasn't mutated and didn't change in size, we mark it for cancellation. Otherwise we add names to it. The different from the CommitViewTransition path is that the old names are added to the clones so this is the first time the new names. Now we also cancel any boundaries that were unchanged. So now the root no longer animates. We still have to clone them. There are other optimizations that can avoid cloning but once we've done all the layouts we can still cancel the running animation and let them just be the regular content if they didn't change. Just like the regular fire-and-forget path. This also fixes the measurement so that we measure clones by adjusting their position back into the viewport. This actually surfaces a bug in Safari that was already in #32612. It turns out that the old names aren't picked up for some reason and so in Safari they looked more like a cross-fade than what #32612 was supposed to fix. However, now that bug is even more apparent because they actually just disappear in Safari. I'm not sure what that bug is but it's unrelated to this PR so will fix that separately. DiffTrain build for [3c3696d](3c3696d)
This does the same thing for
measureUpdateViewTransition
that we did formeasureNestedViewTransitions
in e3cbaff. If a boundary hasn't mutated and didn't change in size, we mark it for cancellation. Otherwise we add names to it. The different from the CommitViewTransition path is that the "old" names are added to the clones so this is the first time the "new" names.Now we also cancel any boundaries that were unchanged. So now the root no longer animates. We still have to clone them. There are other optimizations that can avoid cloning but once we've done all the layouts we can still cancel the running animation and let them just be the regular content if they didn't change. Just like the regular fire-and-forget path.
This also fixes the measurement so that we measure clones by adjusting their position back into the viewport.
This actually surfaces a bug in Safari that was already in #32612. It turns out that the old names aren't picked up for some reason and so in Safari they looked more like a cross-fade than what #32612 was supposed to fix. However, now that bug is even more apparent because they actually just disappear in Safari. I'm not sure what that bug is but it's unrelated to this PR so will fix that separately.