chore(dev): gate react-scan overlay behind env flag#351
Open
1pitaph wants to merge 2 commits into
Open
Conversation
Remove the automatic react-scan CDN injection in development and only enable the local react-scan package when NEXT_PUBLIC_REACT_SCAN=true. Document the opt-in flag in .env.example.
- remove sidebar collapse width transition per updated UX - read latest sidebar store state when toggling to handle rapid clicks - resize viewer canvas immediately after layout changes - set themed clear color for post-processing fallback renders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Removes the automatic
react-scanCDN injection in development and makes the React render debugging overlay opt-in.react-scannow only runs whenNEXT_PUBLIC_REACT_SCAN=trueis set in development. The opt-in flag is documented in.env.example, so local developers can enable it when debugging render performance without showing the overlay by default.Also fixes sidebar collapse rendering instability in the editor:
How to test
bun devwithout settingNEXT_PUBLIC_REACT_SCAN, open the editor, and verify the purplereact-scancomponent overlay does not appear.NEXT_PUBLIC_REACT_SCAN=trueto.env.local, restartbun dev, refresh the page, and verify the overlay appears.false, restartbun dev, and verify the overlay is disabled again.Screenshots / screen recording
N/A. This change removes a development-only debug overlay by default and fixes a transient interaction/rendering issue.
Checklist
bun devbun checkto verify)mainbranch