mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[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:
parent
047715c4ba
commit
1fd291d3c5
|
|
@ -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 />
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user