diff --git a/.changeset/resizable-detail-panels.md b/.changeset/resizable-detail-panels.md new file mode 100644 index 0000000..a84b562 --- /dev/null +++ b/.changeset/resizable-detail-panels.md @@ -0,0 +1,5 @@ +--- +'@solidjs/start-devtools': minor +--- + +Make the detail panes in the Ownership and Reactivity panels resizable. Drag the left edge of a pane, or focus it and press the left and right arrow keys. Each pane keeps its own width across reloads, and a double-click on the edge resets it. diff --git a/src/dev-toolbar/ownership/index.tsx b/src/dev-toolbar/ownership/index.tsx index c19a430..b034575 100644 --- a/src/dev-toolbar/ownership/index.tsx +++ b/src/dev-toolbar/ownership/index.tsx @@ -3,7 +3,9 @@ import { createEffect, createMemo, createSignal, For, getOwner, Show } from 'sol import { Badge } from '../../ui/Badge.js'; import IconButton from '../../ui/IconButton.js'; import Placeholder from '../../ui/Placeholder.js'; +import { ResizeHandle } from '../../ui/ResizeHandle.js'; import { Text } from '../../ui/Text.js'; +import { useResizableDetail } from '../../ui/use-resizable-detail.js'; import { CollapseIcon, EditIcon, ExpandIcon, EyeIcon, PauseIcon, PlayIcon } from '../icons.js'; import { openInEditor } from '../open-in-editor.js'; import { CopyReportButton } from '../report/CopyReportButton.js'; @@ -194,6 +196,7 @@ export default function OwnershipViewer(props: OwnershipViewerProps): JSX.Elemen const [query, setQuery] = createSignal(''); const [collapsed, setCollapsed] = createSignal([]); const [selected, setSelected] = createSignal(); + const detail = useResizableDetail({ storageKey: 'solid-start-devtools:ownership-detail-width' }); const firstSeen = new Map(); let appliedFocus: { owner: object } | undefined; @@ -464,7 +467,8 @@ export default function OwnershipViewer(props: OwnershipViewerProps): JSX.Elemen {(node) => ( -