[DevTools] Disable the tree list for now (#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.
This commit is contained in:
Sebastian Markbåge 2025-09-26 09:43:00 -04:00 committed by GitHub
parent 047715c4ba
commit 1fd291d3c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -117,6 +117,11 @@ function SuspenseTab(_: {}) {
initLayoutState,
);
// If there are no named Activity boundaries, we don't have any tree list and we should hide
// both the panel and the button to toggle it. Since we currently don't support it yet, it's
// always disabled.
const treeListDisabled = true;
const wrapperTreeRef = useRef<null | HTMLElement>(null);
const resizeTreeRef = useRef<null | HTMLElement>(null);
const resizeTreeListRef = useRef<null | HTMLElement>(null);
@ -290,12 +295,15 @@ function SuspenseTab(_: {}) {
return (
<div className={styles.SuspenseTab} ref={wrapperTreeRef}>
<div className={styles.TreeWrapper} ref={resizeTreeRef}>
{treeListDisabled ? null : (
<div
className={styles.TreeList}
hidden={treeListHidden}
ref={resizeTreeListRef}>
<SuspenseTreeList />
</div>
)}
{treeListDisabled ? null : (
<div className={styles.ResizeBarWrapper} hidden={treeListHidden}>
<div
onPointerDown={onResizeStart}
@ -304,9 +312,14 @@ function SuspenseTab(_: {}) {
className={styles.ResizeBar}
/>
</div>
)}
<div className={styles.TreeView}>
<div className={styles.SuspenseTreeViewHeader}>
{treeListDisabled ? (
<div />
) : (
<ToggleTreeList dispatch={dispatch} state={state} />
)}
<div className={styles.SuspenseTreeViewHeaderMain}>
<div className={styles.SuspenseTimeline}>
<SuspenseTimeline />