Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: react/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 41b3e9a6
Choose a base ref
...
head repository: react/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d2908752
Choose a head ref
  • 6 commits
  • 13 files changed
  • 1 contributor

Commits on Jan 20, 2026

  1. Support onGestureEnter/Exit/Share/Update events (#35556)

    This is like the onEnter/Exit/Share/Update events but for gestures. It
    allows manually controlling the animation using the passed timeline.
    sebmarkbage authored Jan 20, 2026
    Configuration menu
    Copy the full SHA
    4bcf67e View commit details
    Browse the repository at this point in the history
  2. Properly clean up gesture Animations (#35559)

    Follow up to #35337.
    
    During a gesture, we always cancel the original animation and create a
    new one that we control. That's the one we need to add to the set that
    needs to be cancelled. Otherwise future gestures hang.
    
    An unfortunate consequence is that any custom ones that you start e.g.
    with #35556 or through other means aren't automatically cleaned up (in
    fact there's not even a clean up callback yet). This can lead these to
    freeze the whole UI afterwards. It would be really good to get this
    fixed in browsers instead so we can revert #35337.
    sebmarkbage authored Jan 20, 2026
    Configuration menu
    Copy the full SHA
    a49952b View commit details
    Browse the repository at this point in the history
  3. Add Clean Up Callbacks to View Transition and Gesture Transition Even…

    …ts (#35564)
    
    Stacked on #35556 and #35559.
    
    Given that we don't automatically clean up all view transition
    animations since #35337 and browsers are buggy, it's important that you
    clean up any `Animation` started manually from the events. However,
    there was no clean up function for when the View Transition is forced to
    stop. This also makes it harder to clean up custom timers etc too.
    
    This lets you return a clean up function from all the events on
    `<ViewTransition>`.
    sebmarkbage authored Jan 20, 2026
    Configuration menu
    Copy the full SHA
    c55ffb5 View commit details
    Browse the repository at this point in the history
  4. Temporarily Mount useInsertionEffect while a Gesture snapshot is bein…

    …g computed (#35565)
    
    `useInsertionEffect` is meant to be used to insert `<style>` tags that
    affect the layout. It allows precomputing a layout before it mounts.
    
    Since we're not normally firing any effects during the "apply gesture"
    phase where we create the clones, it's possible for the target snapshot
    to be missing styles. This makes it so that `useInsertionEffect` for a
    new tree are mounted before the snapshot is taken and then unmounted
    before the animation starts.
    
    Note that because we are mounting a clone of the DOM tree and the
    previous DOM tree remains mounted during the snapshot, we can't unmount
    any previous insertion effects. This can lead to conflicts but that is
    similar to what can happen with conflicts for two mounted Activity
    boundaries since insertion effects can remain mounted inside those.
    
    A revealed Activity will have already had their insertion effects fired
    while offscreen.
    
    However, one thing this doesn't yet do is handle the case where a
    `useInsertionEffect` is *updated* as part of a gesture being applied.
    This means it's still possible for it to miss some styles in that case.
    The interesting thing there is that since the old state and the new
    state will both be applicable to the global DOM in this phase, what
    should really happen is that we should mount the new updated state
    without unmounting the old state and then unmount the updated state.
    Meaning you can have the same hook in the mounted state twice at the
    same time.
    sebmarkbage authored Jan 20, 2026
    Configuration menu
    Copy the full SHA
    1ecd99c View commit details
    Browse the repository at this point in the history
  5. Remove Gesture warning when cloning the root (#35566)

    Currently we always clone the root when a gesture transition happens.
    The was to add an optimization where if a Transition could be isolated
    to an absolutely positioned subtree then we could just clone that
    subtree or just do a plain insertion if it was simple an Enter. That way
    when switching between two absolutely positioned pages the shell
    wouldn't need to be cloned. In that case `detectMutationOrInsertClones`
    would return false. However, currently it always return true because we
    don't yet have that optimization.
    
    The idea was to warn when the root required cloning to ensure that you
    optimize it intentionally since it's easy to accidentally update more
    than necessary. However, since this is not yet actionable I'm removing
    this warning for now.
    
    Instead, I add a warning for particularly bad cases where you really
    shouldn't clone like iframe and video. They may not be very actionable
    without the optimization since you can't scope it down to a subtree
    without the optimization. So if they're above the gesture then they're
    always cloned atm. However, it might also be that it's unnecessary to
    keep them mounted if they could be removed or hidden with Activity.
    sebmarkbage authored Jan 20, 2026
    Configuration menu
    Copy the full SHA
    d343c39 View commit details
    Browse the repository at this point in the history
  6. Cancel animation when a custom Timeline is used (#35567)

    Follow up to #35559.
    
    The clean up function of the custom timeline doesn't necessarily clean
    up the animation. Just the timeline's internal state.
    
    This affects Firefox which doesn't support ScrollTimeline so uses the
    polyfill's custom timeline.
    sebmarkbage authored Jan 20, 2026
    Configuration menu
    Copy the full SHA
    d290875 View commit details
    Browse the repository at this point in the history
Loading