feat(trail-edit): colour track and profile by metric, toggle profile (#49) #59
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
public/wanderer!59
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/49-map-profile-colouring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part 1 of #49 (trail editor): the Elevation / pace profile and Track line items. Doesn't close #49.
Stacked on PR #58 (
feat/49-map-layout). Until that merges, this diff also contains its commit, so review only the last two commits:feat(trail-edit): colour track and profile by metric…and…colour the track line by gradient by default.#49 checklist items covered
P) shows or hides the elevation profile. The chart's own toggle button used atext-blackicon that disappeared in dark mode; it now usestext-content. The stats overlay, the legend and the controls move with the profile's height.pace_series,[segment start m, speed m/s], the same data the profile's pace curve uses). They need My pace → Estimate first; the menu says so.Design
util/track_metrics.tsis a metric registry (TRACK_METRICS). Each metric maps the track to one class per point, plus legend classes (colour and label). The map line, both profile curves and the legend all use the same classes.messagestags, #5) are not wired up. They can be added as categorical metrics: one more registry entry plus an optional field onTrackMetricContext.valhalla_storeis untouched.Note for #51 / #56
I didn't change the chart's legacy palette, but it is now exported as
PROFILE_GRADE_COLOURSfromvendor/maplibre-elevation-profile/elevationprofile.ts. #56'sGRADE_PALETTEcopy could import it instead, as a follow-up. The new signed gradient scale isGRADIENT_THRESHOLDS/GRADIENT_COLOURSinutil/track_metrics.ts.Tests
track_metrics.test.ts(27 tests) covers:npm run check: 0 errors (2 warnings that were already there). Full vitest: 874 passed, plus the same unhandled rejection that was already there intrail_analyze.test.ts(not touched here)..sveltefiles compile with the Svelte compiler for both client and server.🤖 Generated with Claude Code
Shipped via batch PR #64 (
deploy0d0d85a4), which merged this branch head unchanged; live since 2026-11-05 ~19:30 CET inwanderer-web:deploy-676a7c62(homelab-flux #843). Forgejo does not mark stacked PRs as merged, so I am closing this by hand.🤖 Generated with Claude Code
Pull request closed