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

toggle consoleManagedByDevToolsDuringStrictMode flag for native #29887

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hoxyq
Copy link
Contributor

@hoxyq hoxyq commented Jun 13, 2024

Summary

Stacked on #29873, please review only the last commit.

The stack

  1. This diff
  2. chore[react-devtools]: improve console arguments formatting before passing it to original console #29873
  3. chore[react-devtools]: unify console patching and default to ansi escape symbols #29869
  4. chore[react-devtools/backend]: remove consoleManagedByDevToolsDuringStrictMode #29856

This enables consoleManagedByDevToolsDuringStrictMode flag for native.

Caution

Only land this and sync the renderers for Native once React DevTools backend version is updated.

Copy link

vercel bot commented Jun 13, 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 13, 2024 2:56pm

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jun 13, 2024
@react-sizebot
Copy link

react-sizebot commented Jun 13, 2024

Comparing: f5af92d...7fba323

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.44 kB 497.44 kB = 89.16 kB 89.16 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.26 kB 502.26 kB = 89.85 kB 89.85 kB
facebook-www/ReactDOM-prod.classic.js = 596.94 kB 596.94 kB = 105.24 kB 105.24 kB
facebook-www/ReactDOM-prod.modern.js = 571.12 kB 571.12 kB = 101.19 kB 101.19 kB
test_utils/ReactAllWarnings.js Deleted 63.89 kB 0.00 kB Deleted 15.97 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
react-native/implementations/ReactFabric-prod.js +0.24% 311.76 kB 312.50 kB +0.24% 54.67 kB 54.81 kB
react-native/implementations/ReactNativeRenderer-prod.js +0.23% 320.73 kB 321.47 kB +0.27% 56.32 kB 56.47 kB
react-native/implementations/ReactFabric-profiling.js +0.22% 338.46 kB 339.20 kB +0.25% 58.87 kB 59.01 kB
react-native/implementations/ReactNativeRenderer-profiling.js +0.21% 348.07 kB 348.81 kB +0.23% 60.68 kB 60.82 kB
react-native/implementations/ReactNativeRenderer-dev.js = 598.14 kB 596.81 kB = 98.98 kB 98.69 kB
react-native/implementations/ReactFabric-dev.js = 587.10 kB 585.77 kB = 96.65 kB 96.38 kB
test_utils/ReactAllWarnings.js Deleted 63.89 kB 0.00 kB Deleted 15.97 kB 0.00 kB

Generated by 🚫 dangerJS against 7fba323

@hoxyq hoxyq force-pushed the react/toggle-consoleManagedByDevToolsDuringStrictMode-for-native branch from 552267b to 7fba323 Compare June 13, 2024 14:53
@hoxyq
Copy link
Contributor Author

hoxyq commented Jun 13, 2024

@yungsters Could you please help me clarifying something?

  1. Is this the right configuration, so that the flag will be enabled with the next renderers sync for 0.75?
  2. Will we be able to remove the corresponding gk for it after this PR lands and we sync renderers for Native?

Screenshot 2024-06-13 at 15 55 26

Copy link
Member

@rickhanlonii rickhanlonii left a comment

Choose a reason for hiding this comment

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

🎉

@hoxyq
Copy link
Contributor Author

hoxyq commented Jun 17, 2024

Looks like this flag was enabled for OSS renderers, and we still rely on gk for internal one.

Then I would change the approach, we can gradually roll out the internal gk, and then move the flag from the list of dynamic ones to the static, with a default value of true. Then we can remove the gk and everything else related.

cc @yungsters Is my thinking correct?

@yungsters
Copy link
Contributor

Then I would change the approach, we can gradually roll out the internal gk, and then move the flag from the list of dynamic ones to the static, with a default value of true. Then we can remove the gk and everything else related.

Yes, that is correct. Thanks, @hoxyq.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants