Skip to content

Conversation

hbenl
Copy link
Contributor

@hbenl hbenl commented Aug 19, 2021

We have successfully integrated react-devtools-inline in the Replay frontend. Now we want to disable some features in the UI that either make no sense in our setting or haven't been implemented yet.
This PR adds some props for that to the DevTools component:

  • readOnly will disable editing any values in the Component inspector
  • hideSettings will hide the button for opening the settings panel
  • hideToggleErrorAction will hide the button for toggling a component's error state
  • hideToggleSuspenseAction will hide the button for toggling a component's suspense state
  • hideLogAction will hide the button to log a component's data to the console
  • hideViewSourceAction will hide the button for viewing the component's source
    Furthermore, it adds the supportsNativeInspection option to the createStore() function, passing it to the Store constructor.
    The CLA has been signed for the RecordReplay organization.

@hbenl hbenl changed the title Add options for disabling some features [DevTools] Add options for disabling some features Aug 19, 2021
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

Looks good overall. Added some small nits.

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

Looks great. Added a few small nits. If you don't mind making them, awesome. If not, I can make them. No big deal either way.

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

Nice! Thank you 🙇🏼

@bvaughn bvaughn merged commit 83205c0 into facebook:main Aug 20, 2021
@hbenl hbenl deleted the disable-options branch August 20, 2021 17:05
@bvaughn
Copy link
Contributor

bvaughn commented Aug 24, 2021

React DevTools 4.17 has been published with this feature.

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