diff --git a/packages/web/src/App.tsx b/packages/web/src/App.tsx index 1cf0ea7..45a86ce 100644 --- a/packages/web/src/App.tsx +++ b/packages/web/src/App.tsx @@ -420,7 +420,7 @@ function App() { /> {selectedFlowId && ( setInspectorOpen((o) => !o)} label="INSPECT" diff --git a/packages/web/src/AppFragment.tsx b/packages/web/src/AppFragment.tsx index 3fac3eb..c8b2c8b 100644 --- a/packages/web/src/AppFragment.tsx +++ b/packages/web/src/AppFragment.tsx @@ -408,7 +408,7 @@ export default function AppFragment() { /> {decodedFlow && ( setInspectorOpen((o) => !o)} label="INSPECT" diff --git a/packages/web/src/components/DataInspectionPanel.tsx b/packages/web/src/components/DataInspectionPanel.tsx index dd61d06..e8ad6eb 100644 --- a/packages/web/src/components/DataInspectionPanel.tsx +++ b/packages/web/src/components/DataInspectionPanel.tsx @@ -348,23 +348,28 @@ interface BookmarkTabProps { open: boolean onToggle: () => void /** Which canvas edge the tab anchors to. */ - edge: 'left' | 'right' - /** Vertical text shown on the tab (rotated 90deg). Keep ≤ 8 chars. */ + edge: 'left' | 'right' | 'bottom' + /** Label shown on the tab. Vertical (rotated) for left/right; horizontal for bottom. Keep ≤ 8 chars. */ label: string ariaLabel: string } /** - * Bookmark-style toggle tab — a small vertical "tag" anchored to the - * inner edge of the canvas pane. Used for the sidebar (left) and the - * inspect panel (right). Position is `absolute` relative to the canvas - * `
`, so when its companion panel is open the tab sits flush - * against the panel; when closed it sits at the viewport edge. + * Bookmark-style toggle tab — a "tag" anchored to the inner edge of the + * canvas pane. Used for the sidebar (left) and the inspect panel + * (right when right-docked, bottom when bottom-docked). Position is + * `absolute` relative to the canvas `
` so the tab tracks the + * panel's leading edge regardless of dock side. */ export function BookmarkTab({ open, onToggle, edge, label, ariaLabel }: BookmarkTabProps) { - // Pointer character: arrow toward the canvas when closed (would open - // INTO the canvas) and toward the panel when open (would close). - const arrow = edge === 'right' ? (open ? '›' : '‹') : open ? '‹' : '›' + const isVertical = edge === 'left' || edge === 'right' + // Arrow points TOWARD where the click will move the panel: + // closed → arrow points away from the panel (clicking opens it INTO the canvas) + // open → arrow points toward the panel (clicking closes it back) + let arrow: string + if (edge === 'right') arrow = open ? '›' : '‹' + else if (edge === 'left') arrow = open ? '‹' : '›' + else arrow = open ? '▾' : '▴' return (