From ee9c9b304512f1e52ceb0a42eebfc290ede8a500 Mon Sep 17 00:00:00 2001 From: Emi Griffith Date: Sun, 12 Jul 2026 00:11:21 -0700 Subject: [PATCH] Season full-year option; metric select into mobile sheet; comfort inline on compare (#81) - Season filter: add a "Full year" select-all row above the four seasons (checked at 12 months, clears to none, indeterminate when partial). One shared change in seasonFilterDropdown/applySeasonMonthChange/syncSeasonChecks covers both pages; the summary already reads "All year" at 12. - Metric selector rides the filter sheet on phones: initFilterSheet gains a sheetOnly option that relocates given controls into the sheet at the 640px breakpoint and restores them inline on desktop (matchMedia; reparenting keeps listeners). Compare passes its "Distribution by" control, calendar its "Color the calendar by" block. - Compare comfort/tolerance slider moved out of the params panel into a standalone full-width card above the results, so it's always visible instead of buried in the mobile pill sheet. The params sheet now holds basis + season + date range. Frontend-only; no backend or payload change. --- static/calendar.js | 4 +++- static/compare.html | 48 ++++++++++++++++++++++--------------------- static/compare.js | 6 +++++- static/filtersheet.js | 27 ++++++++++++++++++++---- static/shared.js | 16 ++++++++++++++- static/style.css | 14 +++++++++++++ 6 files changed, 85 insertions(+), 30 deletions(-) diff --git a/static/calendar.js b/static/calendar.js index af95f8b..d5d7a9a 100644 --- a/static/calendar.js +++ b/static/calendar.js @@ -290,7 +290,9 @@ filtersEl.addEventListener("change", (e) => { // Wire the per-season "Months" expand toggles (delegated on the stable container), // and the mobile floating pill that slides the whole filter panel up as a sheet. initSeasonExpand(seasonYearEl); -const calSheet = initFilterSheet({ panel: filtersEl, label: "Filters" }); +// On phones the "Color the calendar by" metric selector rides the filter sheet too. +const calSheet = initFilterSheet({ panel: filtersEl, label: "Filters", + sheetOnly: [document.getElementById("metric-block")] }); calSheet.setActive(checkedMonths.size < 12); // Close any open filter dropdown when tapping outside it (native
stays diff --git a/static/compare.html b/static/compare.html index f212b0d..45f7d86 100644 --- a/static/compare.html +++ b/static/compare.html @@ -57,31 +57,33 @@ -