Auto-enable POI categories on routing profile change

useProfileDefaults hook observes profile changes in Yjs and merges
relevant POI categories into the enabled set. Skips initial load to
respect existing state. Cycling profiles → bike infra, hiking →
shelter + viewpoints.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-11 02:19:30 +02:00
parent be36a5f650
commit 22c5ebd838
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
4 changed files with 51 additions and 4 deletions

View file

@ -47,9 +47,9 @@
## 8. Profile-Aware Defaults
- [ ] 8.1 Define profile-to-overlay mapping (cycling → waymarked-cycling + bike POIs, hiking → waymarked-hiking + shelter + viewpoints, MTB → waymarked-mtb + bike POIs)
- [ ] 8.2 Auto-enable mapped overlays on routing profile change (update Yjs arrays)
- [ ] 8.3 Only auto-enable on explicit profile change, not on initial page load (respect existing Yjs state)
- [x] 8.1 Define profile-to-overlay mapping (cycling → waymarked-cycling + bike POIs, hiking → waymarked-hiking + shelter + viewpoints, MTB → waymarked-mtb + bike POIs)
- [x] 8.2 Auto-enable mapped overlays on routing profile change (update Yjs arrays)
- [x] 8.3 Only auto-enable on explicit profile change, not on initial page load (respect existing Yjs state)
## 9. i18n