diff --git a/frontend/src/components/filter/FilterBar.tsx b/frontend/src/components/filter/FilterBar.tsx index d220a0a..1d4040e 100644 --- a/frontend/src/components/filter/FilterBar.tsx +++ b/frontend/src/components/filter/FilterBar.tsx @@ -128,42 +128,8 @@ export function FilterBar() { // clear-all button can stretch the bar vertically. The fixed h-11 // matches the h-7 pills + 8px symmetric vertical padding.
- {/* Search — left of the pill cluster. Same id as before so the - * global "/" focus shortcut still finds it. */} -
- - setSearchQuery(e.target.value)} - onKeyDown={(e) => { - if (e.key === 'Escape') { - setSearchQuery('') - setStoreQ('') - e.currentTarget.blur() - } - }} - placeholder="Search photos…" - className="w-full rounded-full border border-border bg-surface-2 py-1 pl-8 pr-7 text-xs text-text placeholder-text-muted focus:border-primary focus:outline-none" - /> - {searchQuery && ( - - )} -
- - {/* Pills — centered, scroll horizontally if they overflow. */} -
+ {/* Pills — left side, scroll horizontally if they overflow. */} +
{/* Date */}
- {/* Right slot — fixed-width so the pill cluster stays perfectly - * centered in the bar regardless of whether Clear-all is visible. - * Width matches the search input on the left for symmetric - * framing. The button itself is right-aligned within the slot. */} -
- {anyActive && ( + {/* Clear-all — sits between the pill cluster and the search input + * on the right. Only renders when any filter is active so it + * doesn't take space in the resting state. */} + {anyActive && ( + + )} + + {/* Search — pinned to the right edge of the bar. Same id as before + * so the global "/" focus shortcut still finds it. */} +
+ + setSearchQuery(e.target.value)} + onKeyDown={(e) => { + if (e.key === 'Escape') { + setSearchQuery('') + setStoreQ('') + e.currentTarget.blur() + } + }} + placeholder="Search photos…" + className="w-full rounded-full border border-border bg-surface-2 py-1 pl-8 pr-7 text-xs text-text placeholder-text-muted focus:border-primary focus:outline-none" + /> + {searchQuery && ( )}