Skip to content
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

fix[compiler playground]: Set source as the pre-change state in HIR diff #29957

Merged

Conversation

shun-shobon
Copy link
Contributor

Summary

I have fixed an issue where the display of the HIR diff in the React Compiler Playground was incorrect. The HIR diff is supposed to show the pre-change state as the source, but currently, it is showing EnvironmentConfig as the pre-change state. This PR corrects this by setting the pre-change state to source instead of EnvironmentConfig.

How did you test this change?

before:

image

after:

image

Copy link

vercel bot commented Jun 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2024 4:45am

@react-sizebot
Copy link

react-sizebot commented Jun 20, 2024

Comparing: 6b4646c...df682f8

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.66 kB 6.66 kB = 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 497.93 kB 497.93 kB = 89.26 kB 89.26 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 502.75 kB 502.75 kB = 89.96 kB 89.96 kB
facebook-www/ReactDOM-prod.classic.js = 597.17 kB 597.17 kB = 105.33 kB 105.33 kB
facebook-www/ReactDOM-prod.modern.js = 571.52 kB 571.52 kB = 101.27 kB 101.27 kB
test_utils/ReactAllWarnings.js Deleted 62.88 kB 0.00 kB Deleted 15.69 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 62.88 kB 0.00 kB Deleted 15.69 kB 0.00 kB

Generated by 🚫 dangerJS against df682f8

@josephsavona
Copy link
Contributor

Thanks for the PR! I’ve never actually used the diff mode for the HIR panel, because there is nothing to diff against. Would you mind changing to just make the diff source empty for this panel? Diffing against the source doesn’t make sense since they’re such different representations.

@shun-shobon
Copy link
Contributor Author

shun-shobon commented Jun 20, 2024

Thank you for reviewing the PR! I have updated it so that the HIR diff is no longer displayed.

screenshot

image

@poteto
Copy link
Member

poteto commented Jun 20, 2024

Looks good, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants