Skip to content

Conversation

@jackpope
Copy link
Contributor

@jackpope jackpope commented May 1, 2025

When debugging ViewTransition, it can be difficult to use the Animations dev tools if you have multiple active ViewTransitions without specific names. We can make this a bit easier by adding the name of the owner component to the generated name in DEV. At least then you can have a high level idea of where the active animations are coming from and if they're relevant to the one you're debugging.

This implementation shortens the name, replaced invalid characters, and surrounds it in underscores as part of the existing generated name. I'm not tied to the specific replacement symbol or wrapper characters. Also if we can't get an owner component name, we could just leave it out instead of supplying the "unknown" string.

Screenshot 2025-05-01 at 4 55 12 PM

@react-sizebot
Copy link

react-sizebot commented May 1, 2025

Comparing: e5a8de8...09459d3

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.05% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 528.26 kB 528.26 kB = 93.16 kB 93.16 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.11% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 645.02 kB 644.89 kB +0.01% 113.47 kB 113.48 kB
facebook-www/ReactDOM-prod.classic.js = 673.72 kB 673.65 kB = 118.32 kB 118.30 kB
facebook-www/ReactDOM-prod.modern.js = 664.00 kB 663.93 kB = 116.73 kB 116.71 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 09459d3

Copy link
Member

@kassens kassens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there are issues in generating different ids in DEV. I think in the past I've seen some issues filed where DEV and prod where mixed between server and client.

@jackpope
Copy link
Contributor Author

jackpope commented May 7, 2025

The difference between hydrating/client animation names was removed in #33094 so I don't think we need to be concerned about a mismatch in the current implementation.

Copy link

@Hardanish-Singh Hardanish-Singh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions
Copy link

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Aug 11, 2025
@github-actions
Copy link

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

@github-actions github-actions bot closed this Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Resolution: Stale Automatically closed due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants