feat: URL state persistence for all filters and tabs
This commit is contained in:
@@ -2,6 +2,16 @@
|
||||
|
||||
## [Unreleased] — 2026-03-30
|
||||
|
||||
### Navigation
|
||||
|
||||
- **URL state persistence** — filter and tab state is now stored in the URL query string so the browser back button always restores the exact view you left
|
||||
- Activity feed (`/`): `?sport=cycling` — sport filter survives back navigation
|
||||
- Stats page (`/stats/`): `?sport=cycling` — same
|
||||
- Athlete page (`/athlete/`): `?tab=records` — active tab survives back navigation
|
||||
- Records tab (`/athlete/?tab=records`): `?sport=cycling` — sport filter within records also persisted; full URL example: `/athlete/?tab=records&sport=cycling`
|
||||
- All use `history.replaceState` (not `pushState`) so clicking filters does not pollute the history stack — back always goes to the previous *page*, not the previous filter state
|
||||
- Default values are omitted from the URL for cleanliness (`sport=all` and the default tab are never written)
|
||||
|
||||
### Sport classification
|
||||
|
||||
- **Sub-sport detection** — `normalise_sub_sport()` in `sport.py` infers sub_sport from raw sport type strings
|
||||
|
||||
Reference in New Issue
Block a user