From f8e32748f9f21073b01aebb514d273874b4c53c8 Mon Sep 17 00:00:00 2001 From: prsmith777 Date: Sat, 22 Aug 2026 16:55:51 -0600 Subject: [PATCH 1/3] Align recognition feed filters in a fixed grid --- components/LiveFeedDateRangeFilter.jsx | 3 +- components/PlateTable.jsx | 23 ++++++++++----- ...ecognition-feed-filter-preference.test.mjs | 29 +++++++++++++++++++ 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/components/LiveFeedDateRangeFilter.jsx b/components/LiveFeedDateRangeFilter.jsx index 0b7c2d1..50420b5 100644 --- a/components/LiveFeedDateRangeFilter.jsx +++ b/components/LiveFeedDateRangeFilter.jsx @@ -21,6 +21,7 @@ export default function LiveFeedDateRangeFilter({ onChange, onInteractionChange = () => {}, embedded = false, + triggerClassName = "", }) { const fromMs = value?.from?.getTime?.() ?? null; const toMs = value?.to?.getTime?.() ?? null; @@ -66,7 +67,7 @@ export default function LiveFeedDateRangeFilter({ - )} diff --git a/test/recognition-feed-filter-preference.test.mjs b/test/recognition-feed-filter-preference.test.mjs index 7bc78d8..282b13d 100644 --- a/test/recognition-feed-filter-preference.test.mjs +++ b/test/recognition-feed-filter-preference.test.mjs @@ -179,7 +179,7 @@ test("Recognition Feed restores saved state before querying and keeps explicit l ); }); -test("Recognition Feed desktop search and filters use one aligned four-column grid", async () => { +test("Recognition Feed desktop search and filters use one aligned five-column grid", async () => { const table = await readFile( new URL("../components/PlateTable.jsx", import.meta.url), "utf8" @@ -189,20 +189,20 @@ test("Recognition Feed desktop search and filters use one aligned four-column gr table.indexOf("{/* Active filters display */}") ); - assert.match(table, /className="grid w-full grid-cols-1 gap-2 sm:grid-cols-4"/); + assert.match(table, /className="grid w-full grid-cols-1 gap-2 sm:grid-cols-5"/); assert.match(desktopSearchGrid, /className="flex w-full items-center sm:col-span-2"/); - assert.match(desktopSearchGrid, /className="hidden w-full sm:col-span-2 sm:block"/); + assert.match(desktopSearchGrid, /className="hidden w-full sm:block"/); assert.match(desktopSearchGrid, /className="hidden sm:contents"/); const labels = [ 'placeholder="Search plates or speed..."', 'prefixLabel="Plate matching"', 'allLabel="All tags"', 'allLabel="All cameras"', + "\s*Clear Filters\s*