From 0426e91a84069f610870ba64ab019494dd4ed25c Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 18 Apr 2026 15:10:29 -0400 Subject: [PATCH] feat(ui): collapse Downloads filters into compact bar with popover Replaces two stacked filter rows (4 fields + superseded switch) with a single "Filters" button that opens a popover containing all controls. Active filters surface as dismissable chips on the bar alongside a "Clear all" button, so what's currently applied stays visible without eating vertical space above the table. Co-Authored-By: Claude Opus 4.7 --- frontend/src/views/Downloads.vue | 194 ++++++++++++++++++++++--------- 1 file changed, 139 insertions(+), 55 deletions(-) diff --git a/frontend/src/views/Downloads.vue b/frontend/src/views/Downloads.vue index b821295..ba0e7d2 100644 --- a/frontend/src/views/Downloads.vue +++ b/frontend/src/views/Downloads.vue @@ -68,62 +68,120 @@ - - - - - - - - - - - - - - - + +
+ + + + + + + + + + - - - - - - + + + Status: {{ statusLabel(filterStatus) }} + + + Source: {{ sourceLabel(filterSourceId) }} + + + From: {{ filterFromDate }} + + + To: {{ filterToDate }} + + + Showing superseded + + + + Clear all + +
@@ -334,6 +392,32 @@ const sourceOptions = computed(() => })) ) +const activeFilterCount = computed(() => { + let n = 0 + if (filterStatus.value) n++ + if (filterSourceId.value) n++ + if (filterFromDate.value) n++ + if (filterToDate.value) n++ + if (!filterExcludeSuperseded.value) n++ + return n +}) + +function statusLabel(value) { + return statusOptions.find(s => s.value === value)?.title || value +} + +function sourceLabel(id) { + return sourceOptions.value.find(s => s.value === id)?.title || `#${id}` +} + +function clearAllFilters() { + filterStatus.value = null + filterSourceId.value = null + filterFromDate.value = null + filterToDate.value = null + filterExcludeSuperseded.value = true +} + const headers = [ { title: 'Status', key: 'status', width: 120 }, { title: 'Source', key: 'source', width: 180 },