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

refactor: add actual stub view for React DevTools panel #17

Merged

Conversation

hoxyq
Copy link

@hoxyq hoxyq commented Mar 12, 2024

Summary

Stacked on #15. Review only the last commit at the top.

  • panels/react_devtools_placeholder -> panels/react_devtools
  • Placeholder view is rendered by default
  • If Enable React DevTools experiment is enabled, the new custom view should be rendered, which is currently empty, but will soon host React DevTools frontend.

Test plan

Without feature flag enabled in Experiments:
Screenshot 2024-04-09 at 17 53 38

With feature flag enabled in Experiments:
Screenshot 2024-04-09 at 17 54 01

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.

Copy link

@huntie huntie left a comment

Choose a reason for hiding this comment

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

LGTM, with feedback on naming in previous PR.

@hoxyq hoxyq force-pushed the react-devtools/add-panel-stub branch from 2532dfe to ef9f710 Compare April 9, 2024 16:57
Comment on lines +44 to +49
if (Root.Runtime.Runtime.isDescriptorEnabled({
experiment: Root.Runtime.ExperimentName.ENABLE_REACT_DEVTOOLS_PANEL,
condition: null,
})) {
return Module.ReactDevToolsView.ReactDevToolsViewImpl.instance();
}
Copy link
Author

Choose a reason for hiding this comment

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

cc @huntie for future references on using experiments declaratively

Copy link

Choose a reason for hiding this comment

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

@hoxyq how about creating a wiki page (GH or internal) with these learnings?

@hoxyq hoxyq changed the title feat: add React DevTools panel stub refactor: add actual view for React DevTools panel Apr 9, 2024
@hoxyq hoxyq changed the title refactor: add actual view for React DevTools panel refactor: add actual stub view for React DevTools panel Apr 9, 2024
@hoxyq hoxyq merged commit da504f3 into facebookexperimental:main Apr 9, 2024
3 checks passed
@hoxyq hoxyq deleted the react-devtools/add-panel-stub branch April 9, 2024 17:22
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.

4 participants