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: facebook/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 040f8286
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 33661467
Choose a head ref
  • 11 commits
  • 35 files changed
  • 6 contributors

Commits on Apr 2, 2025

  1. Delete CHANGELOG-canary.md (#32807)

    This is no longer being used or updated
    mattcarrollcode authored Apr 2, 2025
    Configuration menu
    Copy the full SHA
    b81c92b View commit details
    Browse the repository at this point in the history
  2. Minor Tweak to Performance Track (#32808)

    Rename "Suspended" commit to "Suspended on CSS" since that's the only
    reason for this particular branch. This will not hold true because with
    suspended images and with view transitions those can also be the reason.
    So in the future we need to add those.
    
    Only log "Blocked" in the components track if we yield for 3ms or
    longer. It's common to have like 1-2ms yield times for various reasons
    going on which is not worth the noise to consider "blocking".
    
    Rename "Blocked" to "Update" in the Blocking/Transition tracks. This is
    when a setState happens and with stack traces it's where you should look
    for the stack trace of the setState. So we want to indicate that this is
    the "Update".
    
    I only added the "Blocked" part if we're blocked for more than 5ms
    before we can start rendering - indicating that some other track was
    working at the same time and preventing us from rendering.
    sebmarkbage authored Apr 2, 2025
    Configuration menu
    Copy the full SHA
    b2f6365 View commit details
    Browse the repository at this point in the history
  3. feat[devtools]: display native tag for host components for Native (#3…

    …2762)
    
    Native only. Displays the native tag for Native Host components inside a
    badge, when user inspects the component.
    
    Only displaying will be supported for now, because in order to get
    native tags indexable, they should be part of the bridge operations,
    which is technically a breaking change that requires significantly more
    time investment.
    
    The text will only be shown when user hovers over the badge.
    ![Screenshot 2025-03-26 at 19 46
    40](https://github.com/user-attachments/assets/787530cf-c5e5-4b85-8e2a-15b006a3d783)
    hoxyq authored Apr 2, 2025
    Configuration menu
    Copy the full SHA
    f0c767e View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2025

  1. [DevTools] Release and aquire host instances when they're cloned in p…

    …ersistent mode (#32812)
    
    In persistent mode they can change when they're closned and so we need
    to release the old copy and acquire the new copy.
    sebmarkbage authored Apr 3, 2025
    Configuration menu
    Copy the full SHA
    b10cb4c View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2025

  1. Fix Bugs Measuring Performance Track for Effects (#32815)

    This fixes two bugs with commit phase effect tracking.
    
    I missed, or messed up the rebase for, deletion effects when a subtree
    was deleted and for passive disconnects when a subtree was hidden.
    
    The other bug is that when I started using self time
    (componentEffectDuration) for color and for determining whether to
    bother logging an entry, I didn't consider that the component with
    effects can have children which end up resetting this duration before we
    log. Which lead to most effects not having their components logged since
    they almost always have children.
    
    We don't necessarily have to push/pop but we have to store at least one
    thing on the stack unfortunately. That's because we have to do the
    actual log after the children to get the right end time. So might as
    well use the push/pop strategy like the rest of them.
    sebmarkbage authored Apr 4, 2025
    Configuration menu
    Copy the full SHA
    c0f08ae View commit details
    Browse the repository at this point in the history
  2. Log Mount/Unmount/Reconnect/Disconnect in the Component Track (#32816)

    Stacked on #32815.
    
    To be able to differentiate mounted subtrees from updated subtrees. This
    adds a yellow entry above the component subtree that mounted. This is
    added both to the render phase, mutation effect phase, layout effect
    phase and passive effect phase.
    
    <img width="962" alt="Screenshot 2025-04-03 at 10 41 02 PM"
    src="https://github.com/%3Ca%20href="https://github.com/user-attachments/assets/13777347-07e8-458c-9127-8675ef08b54f">https://github.com/user-attachments/assets/13777347-07e8-458c-9127-8675ef08b54f"
    />
    
    Ideally we could probably give an annotation to the component instead of
    adding a whole other line which is also a color that's kind of
    distracting. However, not all components are included and keeping track
    of which one is the first one below is kind of annoying. Adding a marker
    to all components is kind of noisy. So this is a compromise. It's only
    one per depth so it won't make it too deep even on larger trees.
    
    If this is an unmount, those are added to the mutation effect phase for
    the layout unmounts and passive unmount effect phase. Since these never
    have a render, they're not in the render phase.
    
    <img width="1010" alt="Screenshot 2025-04-03 at 11 05 57 PM"
    src="https://github.com/%3Ca%20href="https://github.com/user-attachments/assets/ab39f27e-13be-4281-94fa-9391bb293fd2">https://github.com/user-attachments/assets/ab39f27e-13be-4281-94fa-9391bb293fd2"
    />
    
    For showing / hiding `<Activity>` the terminology "Reconnect" and
    "Disconnect" is used instead.
    sebmarkbage authored Apr 4, 2025
    Configuration menu
    Copy the full SHA
    540cd65 View commit details
    Browse the repository at this point in the history
  3. Add Suspensey Images behind a Flag (#32819)

    We've known we've wanted this for many years and most of the
    implementation was already done for Suspensey CSS. This waits to commit
    until images have decoded by default or up to 500ms timeout (same as
    suspensey fonts).
    
    It only applies to Transitions, Retries (Suspense), Gesture Transitions
    (flag) and Idle (doesn't exist). Sync updates just commit immediately.
    
    `<img loading="lazy" src="https://github.com/..." />` opts out since you explicitly want it
    to load lazily in that case.
    
    `<img onLoad={...} src="https://github.com/..." />` also opts out since that implies you're
    ok with managing your own reveal.
    
    In the future, we may add an opt in e.g. `<img blocking="render"
    src="https://github.com/..." />` that opts into longer timeouts and re-suspends even sync
    updates. Perhaps also triggering error boundaries on errors.
    
    The rollout for this would have to go in a major and we may have to
    relax the default timeout to not delay too much by default. However, we
    can also make this part of `enableViewTransition` so that if you opt-in
    by using View Transitions then those animations will suspend on images.
    That we could ship in a minor.
    sebmarkbage authored Apr 4, 2025
    Configuration menu
    Copy the full SHA
    efb22d8 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2025

  1. [Bugfix] Infinite uDV loop in popstate event (#32821)

    Found a bug that occurs during a specific combination of very subtle
    implementation details.
    
    It occurs sometimes (not always) when 1) a transition is scheduled
    during a popstate event, and 2) as a result, a new value is passed to an
    already-mounted useDeferredValue hook.
    
    The fix is relatively straightforward, and I found it almost
    immediately; it took a bit longer to figure out exactly how the scenario
    occurred in production and create a test case to simulate it.
    
    Rather than couple the test to the implementation details, I've chosen
    to keep it as high-level as possible so that it doesn't break if the
    details change. In the future, it might not be trigger the exact set of
    internal circumstances anymore, but it could be useful for catching
    similar bugs because it represents a realistic real world situation —
    namely, switching tabs repeatedly in an app that uses useDeferredValue.
    acdlite authored Apr 5, 2025
    Configuration menu
    Copy the full SHA
    6a7650c View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2025

  1. fix: incorrect type in getTypeSymbol (#32825)

    `getTypeSymbol` also returns string
    jazelly authored Apr 7, 2025
    Configuration menu
    Copy the full SHA
    a9d63f3 View commit details
    Browse the repository at this point in the history
  2. Workaround against display: inline bug in Safari (#32822)

    Safari has a bug where if you put a block element inside an inline
    element and the inline element has a `view-transition-name` assigned it
    finds it as duplicate names.
    
    https://bugs.webkit.org/show_bug.cgi?id=290923
    
    This adds a warning if we detect this scenario in dev mode.
    
    For the case where it renders into a single block, we can model this by
    making the parent either `block` or `inline-block` automatically to fix
    the issue. So we do that to automatically cover simple cases like
    `<a><div>...</div></a>`. This unfortunately causes layout/styling thrash
    so we might want to delete it once the bug has been fixed in enough
    Safari versions.
    sebmarkbage authored Apr 7, 2025
    Configuration menu
    Copy the full SHA
    365c031 View commit details
    Browse the repository at this point in the history
  3. Fix Failed to execute 'measure' on 'Performance' error (#32823)

    When `startTime` still has its initial value of `-1.1` we must not call
    `logComponentMount`. This can occur when rendering a `'next/dynamic'`
    component with `{ssr: false}` in a client component, for example.
    Unfortunately, I didn't manage to reproduce this scenario in a unit
    test.
    unstubbable authored Apr 7, 2025
    Configuration menu
    Copy the full SHA
    3366146 View commit details
    Browse the repository at this point in the history
Loading