From 94701c2f7eb690b2ade283d9a25202740e5ddd93 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Thu, 8 Jan 2026 10:42:34 +0000 Subject: [PATCH] Fix registry filter input/button width ratio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use Grid with col-span instead of flex to give the filter input 10/12 of the width and the Apply button only 2/12. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/animaltrack/web/templates/registry.py | 30 +++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/animaltrack/web/templates/registry.py b/src/animaltrack/web/templates/registry.py index 2c15d1e..c779ec6 100644 --- a/src/animaltrack/web/templates/registry.py +++ b/src/animaltrack/web/templates/registry.py @@ -96,26 +96,30 @@ def registry_header(filter_str: str, total_count: int) -> Div: Form( # Label above the input row FormLabel("Filter", _for="filter", cls="mb-2 block"), - Div( + Grid( # Filter input - takes most of the width Input( id="filter", name="filter", value=filter_str, placeholder='species:duck status:alive location:"Strip 1"', - cls="uk-input flex-1", + cls="uk-input col-span-10", ), - # Apply button - Button("Apply", type="submit", cls=f"{ButtonT.primary} px-4"), - # Clear button (only shown if filter is active) - A( - "Clear", - href="/registry", - cls="px-3 py-2 text-stone-400 hover:text-stone-200", - ) - if filter_str - else None, - cls="flex gap-2 items-center", + # Buttons container + Div( + Button("Apply", type="submit", cls=f"{ButtonT.primary} px-4"), + # Clear button (only shown if filter is active) + A( + "Clear", + href="/registry", + cls="px-3 py-2 text-stone-400 hover:text-stone-200", + ) + if filter_str + else None, + cls="flex gap-2 col-span-2", + ), + cols=12, + cls="gap-2 items-center", ), action="/registry", method="get",