From 9ba54bd82dff6e72e3689f9de7727900d2977dc2 Mon Sep 17 00:00:00 2001 From: Antti Kettunen Date: Mon, 18 May 2026 20:50:28 +0300 Subject: [PATCH] feat(form): add compact option groups - add a size prop to OptionButtonGroup with a denser sm layout\n- use the compact filter group on the auto-import panel\n- keep the new size variants covered in form and route tests --- webui/src/components/form/form.module.css | 11 ++ webui/src/components/form/form.test.tsx | 11 ++ webui/src/components/form/form.tsx | 29 ++++- webui/src/routes/import/-route.test.tsx | 2 + .../src/routes/import/-ui/auto-import-tab.tsx | 105 ++++++++++-------- 5 files changed, 105 insertions(+), 53 deletions(-) diff --git a/webui/src/components/form/form.module.css b/webui/src/components/form/form.module.css index 31120695..bb2654f7 100644 --- a/webui/src/components/form/form.module.css +++ b/webui/src/components/form/form.module.css @@ -396,6 +396,17 @@ gap: 8px; } +.optionButtonGroupSizeSm { + gap: 6px; +} + +.optionButtonGroupSizeSm .optionButton { + min-width: 0; + padding: 6px 12px; + font-size: 12px; + gap: 6px; +} + .optionButton { display: inline-flex; align-items: center; diff --git a/webui/src/components/form/form.test.tsx b/webui/src/components/form/form.test.tsx index 9c4923cb..41e2d363 100644 --- a/webui/src/components/form/form.test.tsx +++ b/webui/src/components/form/form.test.tsx @@ -178,6 +178,17 @@ describe('form primitives', () => { ); }); + it('supports compact option button groups', () => { + const { container } = render( + + All + Pending + , + ); + + expect(container.querySelector('[data-size="sm"]')).toBeInTheDocument(); + }); + it('supports compact select sizing', () => { render(