Skip to content

Commit 83ca958

Browse files
sebmarkbageEugeneChoi4
authored andcommitted
[DevTools] Disable the tree list for now (facebook#34606)
When there are no named Activities we should hide the tree side panel (and the button to show it). Since it's not implemented yet there are never any ones so it's always hidden.
1 parent cee3a1e commit 83ca958

File tree

1 file changed

+27
-14
lines changed
  • packages/react-devtools-shared/src/devtools/views/SuspenseTab

1 file changed

+27
-14
lines changed

packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseTab.js

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ function SuspenseTab(_: {}) {
117117
initLayoutState,
118118
);
119119

120+
// If there are no named Activity boundaries, we don't have any tree list and we should hide
121+
// both the panel and the button to toggle it. Since we currently don't support it yet, it's
122+
// always disabled.
123+
const treeListDisabled = true;
124+
120125
const wrapperTreeRef = useRef<null | HTMLElement>(null);
121126
const resizeTreeRef = useRef<null | HTMLElement>(null);
122127
const resizeTreeListRef = useRef<null | HTMLElement>(null);
@@ -290,23 +295,31 @@ function SuspenseTab(_: {}) {
290295
return (
291296
<div className={styles.SuspenseTab} ref={wrapperTreeRef}>
292297
<div className={styles.TreeWrapper} ref={resizeTreeRef}>
293-
<div
294-
className={styles.TreeList}
295-
hidden={treeListHidden}
296-
ref={resizeTreeListRef}>
297-
<SuspenseTreeList />
298-
</div>
299-
<div className={styles.ResizeBarWrapper} hidden={treeListHidden}>
298+
{treeListDisabled ? null : (
300299
<div
301-
onPointerDown={onResizeStart}
302-
onPointerMove={onResizeTreeList}
303-
onPointerUp={onResizeEnd}
304-
className={styles.ResizeBar}
305-
/>
306-
</div>
300+
className={styles.TreeList}
301+
hidden={treeListHidden}
302+
ref={resizeTreeListRef}>
303+
<SuspenseTreeList />
304+
</div>
305+
)}
306+
{treeListDisabled ? null : (
307+
<div className={styles.ResizeBarWrapper} hidden={treeListHidden}>
308+
<div
309+
onPointerDown={onResizeStart}
310+
onPointerMove={onResizeTreeList}
311+
onPointerUp={onResizeEnd}
312+
className={styles.ResizeBar}
313+
/>
314+
</div>
315+
)}
307316
<div className={styles.TreeView}>
308317
<div className={styles.SuspenseTreeViewHeader}>
309-
<ToggleTreeList dispatch={dispatch} state={state} />
318+
{treeListDisabled ? (
319+
<div />
320+
) : (
321+
<ToggleTreeList dispatch={dispatch} state={state} />
322+
)}
310323
<div className={styles.SuspenseTreeViewHeaderMain}>
311324
<div className={styles.SuspenseTimeline}>
312325
<SuspenseTimeline />

0 commit comments

Comments
 (0)