Skip to content

Commit 9900ced

Browse files
committed
Add instruction to main config too
1 parent d907533 commit 9900ced

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

packages/react-devtools-shared/src/devtools/views/Settings/GeneralSettings.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ import {SettingsContext} from './SettingsContext';
1313
import {StoreContext} from '../context';
1414
import {CHANGE_LOG_URL} from 'react-devtools-shared/src/devtools/constants';
1515
import {isInternalFacebookBuild} from 'react-devtools-feature-flags';
16-
import CodeEditorOptions from './CodeEditorOptions';
1716

1817
import styles from './SettingsShared.css';
18+
19+
import CodeEditorOptions from './CodeEditorOptions';
1920
import CodeEditorByDefault from './CodeEditorByDefault';
21+
import {LOCAL_STORAGE_ALWAYS_OPEN_IN_EDITOR} from '../../../constants';
22+
import {useLocalStorage} from '../hooks';
2023

2124
function 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

Comments
 (0)