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

Restore skip-stack-frames-pattern setting with empty default #137

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

huntie
Copy link

@huntie huntie commented Nov 25, 2024

Summary

Fixes an unintended bug after applying #135, where removing the registration of the skip-stack-frames-pattern setting would cause DevTools to crash on start when Local Storage is cleared.

  • Restores setting, instead giving an empty string default value. (This is the best equivalent we can give to mean null/undefined, and is evaluated here as an empty array when processed.)
  • Adds Local Storage backwards compatibility checkbox to PR template.

Test plan

  • Between builds, clear client-side storage via DevTools > Application > Clear site data.
Before After
image image
❌ DevTools fails to load (blank screen) with "No setting registered" error ✅ DevTools loads, no missing setting error
Screenshot 2024-11-25 at 11 10 02
✅ Dedicated settings panel renders and new patterns can be added
  • This change maintains backwards compatibility with previous Local Storage data (if modifying settings, experiments, or other persisted client state).

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

@huntie huntie merged commit 6b80704 into facebookexperimental:main Nov 25, 2024
5 checks passed
@huntie huntie deleted the fix-settings-read branch November 25, 2024 13:04
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.

3 participants