@@ -13,10 +13,13 @@ import {SettingsContext} from './SettingsContext';
1313import { StoreContext } from '../context' ;
1414import { CHANGE_LOG_URL } from 'react-devtools-shared/src/devtools/constants' ;
1515import { isInternalFacebookBuild } from 'react-devtools-feature-flags' ;
16- import CodeEditorOptions from './CodeEditorOptions' ;
1716
1817import styles from './SettingsShared.css' ;
18+
19+ import CodeEditorOptions from './CodeEditorOptions' ;
1920import CodeEditorByDefault from './CodeEditorByDefault' ;
21+ import { LOCAL_STORAGE_ALWAYS_OPEN_IN_EDITOR } from '../../../constants' ;
22+ import { useLocalStorage } from '../hooks' ;
2023
2124function getChangeLogUrl ( version : ?string ) : string | null {
2225 if ( ! version ) {
@@ -47,6 +50,11 @@ export default function GeneralSettings(_: {}): React.Node {
4750 const showBackendVersion =
4851 backendVersion && backendVersion !== frontendVersion ;
4952
53+ const [ alwaysOpenInEditor ] = useLocalStorage < boolean > (
54+ LOCAL_STORAGE_ALWAYS_OPEN_IN_EDITOR ,
55+ false ,
56+ ) ;
57+
5058 return (
5159 < div className = { styles . SettingList } >
5260 { isInternalFacebookBuild && (
@@ -87,6 +95,13 @@ export default function GeneralSettings(_: {}): React.Node {
8795
8896 < div className = { styles . SettingWrapper } >
8997 < CodeEditorByDefault />
98+ { alwaysOpenInEditor && ( __IS_CHROME__ || __IS_EDGE__ ) ? (
99+ < div >
100+ To enable link handling in your browser's DevTools settings, look
101+ for the option Extension -> Link Handling . Select "React Developer
102+ Tools ".
103+ </ div >
104+ ) : null }
90105 </ div >
91106
92107 < div className = { styles . SettingWrapper } >
0 commit comments