Collapse sections by clicking their title bar (ticket 006)

Alerts, Metrics, Params, and Dashboards now toggle collapsed state when
their header row is clicked, instead of requiring a dedicated collapse
button. The chevron (CollapseToggle) becomes a purely visual, non-focusable
indicator for these sections; HelpIcon and PopOutButton now stop
propagation so they keep working without also collapsing the section.

The log viewer's toggle (App.tsx/FilterBar) keeps its dedicated button,
since that row is a filter toolbar with an editable input rather than a
plain title bar, so CollapseToggle's onToggle prop stays available for
that case.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
Hugh Kaznowski
2026-09-05 18:48:59 +01:00
co-authored by Claude Sonnet 5
parent 01eadf415c
commit 5038295554
7 changed files with 113 additions and 25 deletions
+4 -1
View File
@@ -6,7 +6,10 @@ export function HelpIcon({ sectionId, label }: { sectionId: string; label?: stri
return (
<button
type="button"
onClick={() => openSection(sectionId)}
onClick={(e) => {
e.stopPropagation()
openSection(sectionId)
}}
title="Open docs"
aria-label={label ?? 'Open docs for this section'}
className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full border border-border-soft bg-surface-2 text-xs leading-none text-text-muted hover:border-border-strong hover:text-text-secondary"