improve statistics page - #1162
Conversation
|
Thanks! An update for the stats page was long overdue. This is a great start! 1 & 2: Pie chart crashes when changing the period (unrelated to PR). Selecting a preset threw Root cause is the vendored elevation profile registering
3: Migration backfill was two queries per completed trail. The record loop ran a 4: Dropped the unused Question about the calendar. The docs say: "Moving to another month in the calendar updates this date range automatically" (statistics.md#L10), but the code does the opposite: Related: no What's your intent here? should the calendar stay fully independent (and the docs line get dropped), or should navigating/clicking drive the filter? Happy to go either way, just want the docs, the UI affordance and the code to agree. |
Statistics page: completed trails as activities
Trails you mark as completed without writing a summit log were missing from your statistics. They now show up as normal activities — in the totals, the calendar and the table — and a trail that already has a summit log is still counted once.
Also new on the page: quick period presets (month, quarter, year, last 12 months) plus a free date range, a calendar you can still browse independently of the selected period, and an activity chart that switches between days, months, quarters and years depending on how much time you're looking at. Category colours are now consistent between chart, calendar and table.
Tests
completed_at, statistics counts stay unchanged where a summit log exists.completed_atfrom the import date.Screenshot