diff --git a/tickets/006-collapse-via-title-bar-click.md b/tickets/006-collapse-via-title-bar-click.md deleted file mode 100644 index d155273..0000000 --- a/tickets/006-collapse-via-title-bar-click.md +++ /dev/null @@ -1,8 +0,0 @@ -# Collapse sections by clicking title bar instead of a dedicated button - -Instead of having collapse buttons on the main view components/categories, clicking the title bars should collapse them. - -## Acceptance criteria -- Clicking a section's title bar toggles its collapsed/expanded state. -- Dedicated collapse buttons are removed (or repurposed as a visual indicator only, e.g. a chevron, without being the sole click target). -- Title bar remains usable for any other existing interactions (if any) without conflicting with the collapse click. diff --git a/webapp/src/components/Alerts.tsx b/webapp/src/components/Alerts.tsx index 4dd4fcd..260bc45 100644 --- a/webapp/src/components/Alerts.tsx +++ b/webapp/src/components/Alerts.tsx @@ -9,7 +9,13 @@ import { type AlertRule, type CompareOp, } from '../lib/api' -import { CollapseToggle, sectionHeaderClassName, sectionHeaderLeftClassName, useSectionCollapsed } from './CollapsibleSection' +import { + CollapseToggle, + handleSectionHeaderKeyDown, + sectionHeaderInteractiveClassName, + sectionHeaderLeftClassName, + useSectionCollapsed, +} from './CollapsibleSection' import { HelpIcon } from './HelpIcon' import { queryInputClassName } from './FilterBar' @@ -231,13 +237,20 @@ export function Alerts() { return (
-
+
setCollapsed(!collapsed)} + onKeyDown={handleSectionHeaderKeyDown(() => setCollapsed(!collapsed))} + >
Alerts
- setCollapsed(!collapsed)} /> +