Re-organized views slightly in preparation for Profiler UI
Brian Vaughn committed
Mar 6, 2019 at 14:01 UTC
e9028d1d35718d4565ff76fda6214b1a4c8e860f
28 files changed
+39
-39
src/devtools/views/DevTools.js
+5
-5
@@ -3,12 +3,12 @@
3
import React, { useState } from 'react';
4
import Store from '../store';
5
import { BridgeContext, StoreContext } from './context';
6
-import Elements from './Elements';
7
-import Profiler from './Profiler';
8
-import Settings from './Settings';
6
+import Elements from './Elements/Elements';
7
+import Profiler from './Profiler/Profiler';
8
+import Settings from './Settings/Settings';
9
import TabBar from './TabBar';
10
-import { SettingsContextController } from './SettingsContext';
11
-import { TreeContextController } from './TreeContext';
10
+import { SettingsContextController } from './Settings/SettingsContext';
11
+import { TreeContextController } from './Elements/TreeContext';
12
13
import styles from './DevTools.css';
14
src/devtools/views/Elements/EditableValue.css
renamed
src/devtools/views/Elements/EditableValue.js
renamed
+2
-2
@@ -1,8 +1,8 @@
1
// @flow
2
3
import React, { Fragment, useCallback, useRef, useState } from 'react';
4
-import Button from './Button';
5
-import ButtonIcon from './ButtonIcon';
4
+import Button from '../Button';
5
+import ButtonIcon from '../ButtonIcon';
6
import styles from './EditableValue.css';
7
8
type OverrideValueFn = (path: Array<string | number>, value: any) => void;
src/devtools/views/Elements/Element.css
renamed
src/devtools/views/Elements/Element.js
renamed
+2
-2
@@ -9,10 +9,10 @@ import React, {
9
useRef,
10
} from 'react';
11
import { ElementTypeClass, ElementTypeFunction } from 'src/devtools/types';
12
-import { createRegExp } from './utils';
12
+import { createRegExp } from '../utils';
13
import { TreeContext } from './TreeContext';
14
15
-import type { Element } from '../types';
15
+import type { Element } from '../../types';
16
17
import styles from './Element.css';
18
src/devtools/views/Elements/Elements.css
renamed
src/devtools/views/Elements/Elements.js
renamed
src/devtools/views/Elements/HooksTree.css
renamed
src/devtools/views/Elements/HooksTree.js
renamed
+4
-4
@@ -2,12 +2,12 @@
2
3
import { copy } from 'clipboard-js';
4
import React, { useCallback, useContext } from 'react';
5
-import { BridgeContext, StoreContext } from './context';
6
-import Button from './Button';
7
-import ButtonIcon from './ButtonIcon';
5
+import { BridgeContext, StoreContext } from '../context';
6
+import Button from '../Button';
7
+import ButtonIcon from '../ButtonIcon';
8
import EditableValue from './EditableValue';
9
import KeyValue from './KeyValue';
10
-import { serializeHooksForCopy } from './utils';
10
+import { serializeHooksForCopy } from '../utils';
11
import styles from './HooksTree.css';
12
13
import type { HooksNode, HooksTree } from 'src/backend/types';
src/devtools/views/Elements/InspectHostNodesToggle.js
renamed
+3
-3
@@ -1,9 +1,9 @@
1
// @flow
2
3
import React, { useCallback, useContext, useEffect, useState } from 'react';
4
-import { BridgeContext } from './context';
5
-import Toggle from './Toggle';
6
-import ButtonIcon from './ButtonIcon';
4
+import { BridgeContext } from '../context';
5
+import Toggle from '../Toggle';
6
+import ButtonIcon from '../ButtonIcon';
7
8
export default function InspectHostNodesToggle() {
9
const [isInspecting, setIsInspecting] = useState(false);
src/devtools/views/Elements/InspectedElementTree.css
renamed
src/devtools/views/Elements/InspectedElementTree.js
renamed
+3
-3
@@ -2,10 +2,10 @@
2
3
import { copy } from 'clipboard-js';
4
import React, { useCallback } from 'react';
5
-import Button from './Button';
6
-import ButtonIcon from './ButtonIcon';
5
+import Button from '../Button';
6
+import ButtonIcon from '../ButtonIcon';
7
import KeyValue from './KeyValue';
8
-import { serializeDataForCopy } from './utils';
8
+import { serializeDataForCopy } from '../utils';
9
import styles from './InspectedElementTree.css';
10
11
type OverrideValueFn = (path: Array<string | number>, value: any) => void;
src/devtools/views/Elements/KeyValue.css
renamed
src/devtools/views/Elements/KeyValue.js
renamed
+2
-2
@@ -2,8 +2,8 @@
2
3
import React from 'react';
4
import EditableValue from './EditableValue';
5
-import { getMetaValueLabel } from './utils';
6
-import { meta } from '../../hydration';
5
+import { getMetaValueLabel } from '../utils';
6
+import { meta } from '../../../hydration';
7
import styles from './KeyValue.css';
8
9
type OverrideValueFn = (path: Array<string | number>, value: any) => void;
src/devtools/views/Elements/OwnersStack.css
renamed
src/devtools/views/Elements/OwnersStack.js
renamed
+4
-4
@@ -1,12 +1,12 @@
1
// @flow
2
3
import React, { useCallback, useContext } from 'react';
4
-import Button from './Button';
5
-import ButtonIcon from './ButtonIcon';
4
+import Button from '../Button';
5
+import ButtonIcon from '../ButtonIcon';
6
import { TreeContext } from './TreeContext';
7
-import { StoreContext } from './context';
7
+import { StoreContext } from '../context';
8
9
-import type { Element } from '../types';
9
+import type { Element } from '../../types';
10
11
import styles from './OwnersStack.css';
12
src/devtools/views/Elements/SearchInput.css
renamed
src/devtools/views/Elements/SearchInput.js
renamed
+3
-3
@@ -2,9 +2,9 @@
2
3
import React, { useCallback, useContext, useEffect, useRef } from 'react';
4
import { TreeContext } from './TreeContext';
5
-import Button from './Button';
6
-import ButtonIcon from './ButtonIcon';
7
-import Icon from './Icon';
5
+import Button from '../Button';
6
+import ButtonIcon from '../ButtonIcon';
7
+import Icon from '../Icon';
8
9
import styles from './SearchInput.css';
10
src/devtools/views/Elements/SelectedElement.css
renamed
src/devtools/views/Elements/SelectedElement.js
renamed
+5
-5
@@ -8,16 +8,16 @@ import React, {
8
useState,
9
} from 'react';
10
import { TreeContext } from './TreeContext';
11
-import { BridgeContext, StoreContext } from './context';
12
-import Button from './Button';
13
-import ButtonIcon from './ButtonIcon';
11
+import { BridgeContext, StoreContext } from '../context';
12
+import Button from '../Button';
13
+import ButtonIcon from '../ButtonIcon';
14
import HooksTree from './HooksTree';
15
import InspectedElementTree from './InspectedElementTree';
16
import { hydrate } from 'src/hydration';
17
import styles from './SelectedElement.css';
18
-import { ElementTypeClass, ElementTypeFunction } from '../types';
18
+import { ElementTypeClass, ElementTypeFunction } from '../../types';
19
20
-import type { InspectedElement } from '../types';
20
+import type { InspectedElement } from '../../types';
21
import type { DehydratedData, Element } from 'src/devtools/types';
22
23
export type Props = {||};
src/devtools/views/Elements/Tree.css
renamed
src/devtools/views/Elements/Tree.js
renamed
+1
-1
@@ -10,7 +10,7 @@ import React, {
10
import AutoSizer from 'react-virtualized-auto-sizer';
11
import { FixedSizeList } from 'react-window';
12
import { TreeContext } from './TreeContext';
13
-import { SettingsContext } from './SettingsContext';
13
+import { SettingsContext } from '../Settings/SettingsContext';
14
import Element from './Element';
15
import InspectHostNodesToggle from './InspectHostNodesToggle';
16
import OwnersStack from './OwnersStack';
src/devtools/views/Elements/TreeContext.js
renamed
+3
-3
@@ -25,9 +25,9 @@ import React, {
25
useMemo,
26
useReducer,
27
} from 'react';
28
-import { createRegExp } from './utils';
29
-import { BridgeContext, StoreContext } from './context';
30
-import Store from '../store';
28
+import { createRegExp } from '../utils';
29
+import { BridgeContext, StoreContext } from '../context';
30
+import Store from '../../store';
31
32
import type { Element } from 'src/devtools/types';
33
src/devtools/views/Profiler/Profiler.css
renamed
src/devtools/views/Profiler/Profiler.js
renamed
src/devtools/views/Settings/Settings.css
renamed
src/devtools/views/Settings/Settings.js
renamed
src/devtools/views/Settings/SettingsContext.js
renamed
+2
-2
@@ -1,9 +1,9 @@
1
// @flow
2
3
import React, { createContext, useLayoutEffect, useMemo } from 'react';
4
-import { useLocalStorage } from './hooks';
4
+import { useLocalStorage } from '../hooks';
5
6
-import type { BrowserTheme } from './DevTools';
6
+import type { BrowserTheme } from '../DevTools';
7
8
export type DisplayDensity = 'compact' | 'comfortable';
9
export type Theme = 'auto' | 'light' | 'dark';