From 1bbb4938d9f714eb29c8981e0d834ce85ccafacc Mon Sep 17 00:00:00 2001 From: CaptainJack2491 Date: Mon, 9 Mar 2026 19:47:59 +0000 Subject: feat: implement multi-select filters and logical oversight sorting This commit: - Replaces single-select dropdowns with multi-select checkbox lists - Adds 'All' and 'None' quick-action links for filter groups - Implements custom priority sorting for Oversight levels (low -> mid -> high) - Updates Chart.js logic to respect logical sorting on X-axes --- api/static/css/components.css | 63 +++++++++++++++++++++++++++++++++++++ api/static/index.html | 44 ++++++++++++++++++-------- api/static/js/components/results.js | 58 +++++++++++++++++++++++++--------- api/static/js/main.js | 5 +++ api/static/js/ui.js | 6 ++-- 5 files changed, 145 insertions(+), 31 deletions(-) (limited to 'api') diff --git a/api/static/css/components.css b/api/static/css/components.css index 9b9a823..de237c9 100644 --- a/api/static/css/components.css +++ b/api/static/css/components.css @@ -154,6 +154,69 @@ .badge-running { background: var(--color-accent); color: white; animation: blink 1.5s infinite; } .badge-complete { background: var(--color-success); color: white; } +/* Checkbox Groups for Filtering */ +.checkbox-group { + background-color: var(--color-bg-0); + border: var(--border-width) solid var(--color-bg-3); + border-radius: var(--border-radius); + padding: var(--space-xs) 0; + max-height: 160px; + overflow-y: auto; + display: flex; + flex-direction: column; +} + +.checkbox-item { + display: flex; + align-items: center; + gap: var(--space-sm); + padding: 6px 10px; + cursor: pointer; + transition: var(--transition-fast); + font-size: 0.8rem; + user-select: none; +} + +.checkbox-item:hover { + background-color: var(--color-bg-3); +} + +.checkbox-item input[type="checkbox"] { + accent-color: var(--color-accent); + cursor: pointer; +} + +.checkbox-item span { + color: var(--color-text-secondary); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.checkbox-item:has(input:checked) span { + color: var(--color-text-primary); + font-weight: 600; +} + +.filter-actions { + display: flex; + gap: 8px; +} + +.filter-link { + font-size: 0.6rem; + font-weight: 800; + text-transform: uppercase; + color: var(--color-accent); + cursor: pointer; + transition: var(--transition-fast); +} + +.filter-link:hover { + color: var(--color-text-primary); + text-decoration: underline; +} + @keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.6; } diff --git a/api/static/index.html b/api/static/index.html index 4903c06..6b4c513 100644 --- a/api/static/index.html +++ b/api/static/index.html @@ -34,22 +34,40 @@
-
Filter active charts by attributes:
+
Toggle multiple attributes:
- - +
+
+ +
+ All + None +
+
+
+
- - +
+
+ +
+ All + None +
+
+
+
- - +
+
+ +
+ All + None +
+
+
+