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

[DRAFT] Devtools remove inspected window.eval #19136

Closed

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Jun 15, 2020

Improves #19002 and general initialization/detection logic.

  • Removes most devtools.inspetedWindow.eval usage (all that's in the critical path).
  • Updates the test script to make it easier to test other URLs.

This PR also makes a controversial change to always show both "⚛️ Components" and "⚛️ Profiler" tabs. This lets us remove the setInterval polling logic that may have contributed to some cases of us failing to show the tabs, and also sometimes lead to confusion (semi frequent questions of "why don't I see the tabs?"). I can revert this change if it's frowned on though.

Here's what the extension looks like if you're on e.g. www.google.com

Light mode

Screen Shot 2020-06-05 at 12 04 14 PM

Dark mode

Screen Shot 2020-06-05 at 12 04 05 PM

Brian Vaughn added 5 commits June 1, 2020 10:46
1. Remove many of the calls to inspectedWindow.eval() (at least all in critical path)
2. Retry failed injections on interval until acknowledged (seems to fix the issue of reactjs.org sometimes not connecting)
3. Always show Components and Profilers tab even if React isn't on the page (added messaging in that case)
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jun 15, 2020
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9892112:

Sandbox Source
nervous-jennings-vhowm Configuration

@sizebot
Copy link

sizebot commented Jun 15, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 9892112

@sizebot
Copy link

sizebot commented Jun 15, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 9892112

@bvaughn
Copy link
Contributor Author

bvaughn commented Jun 23, 2020

This does not fix things. Maybe we decide to always show the tab anyway, at some point but I'm going to close this for now as a failed investigation.

@bvaughn bvaughn closed this Jun 23, 2020
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.

None yet

4 participants