8356
Wx
www-xonecas-io / files
www-xonecas-io / tickets / 1020-let-s-add-a-filtering-control-for-filtering-by.md
2.2 KB
1--- 2id: 1020 3title: let's add a filtering control for filtering by start and end years/months. use a slider 4type: feature 5status: done 6priority: p2 7created: 2026-11-08T03:56:52Z 8updated: 2026-11-08T04:28:57Z 9source: devnote 10area: site 11moves: 2026-11-08T04:02:14Z inbox doing drag; 2026-11-08T04:16:55Z doing review agent; 2026-11-08T04:28:57Z review done drag 12--- 13 14## Context 15 16Filed from `http://192.168.122.10:8080/projects/`, on `form#filters.flex.flex-wrap.items-center`. 17 18## Notes 19 20- 2026-11-08 03:57Z (agent): Triage: type feature (it was bug), priority p2, area site. No typos to fix. Filed on the /projects filter form, so it extends 1006 (tag filters and search). 21 22 Question: which projects does a range like 2014-03 to 2016-08 keep: (a) those with any commit inside it, (b) those that started inside it, or (c) those whose whole first-to-last span is inside it? I'd recommend (a). 23 24- 2026-11-08 04:16Z (agent): Done, keeping projects with any commit in the range (my recommendation (a), as you asked me to decide). 25 26 - /projects: an 'Active' row under the tags. One track, two thumbs, from the first month with commits (2011-01) to the last (2026-11), with the chosen range printed beside it. Dragging filters live, together with tags, sort and search. 27 - The range goes into the URL as ?from=YYYY-MM&to=YYYY-MM, only when narrowed, and loads back from it. 28 - internal/site/rows.go and view.go: ProjectRow.Months lists every month with my commits; projects.html prints it as data-months. projects.js does the filtering and the URL. site.css: a small .range block, two stacked range inputs where only the thumbs take the pointer, in the accent color. 29 - The thumbs may cross; the range is always the lower to the higher. 30 31 CHECKED: go vet, go test pass. In agent-browser: default shows all 82, 2011-01 – 2026-11. Setting 2024-11 – 2025-11 shows 3 (the-champs-timer, lazy-history, scrap-paper), the same 3 as a Python check over data/projects.json. ?from=2024-11&to=2025-11 loads back to the same 3. A real mouse drag of the left thumb moved it to 2018-11 (19 projects) and updated the URL. 32 33 NOT CHECKED: phone width, dark theme, keyboard use of the thumbs. If the slider looks unstyled in your browser, hard-refresh: a stale site.css is cached. Filed separately.