feat(viewer): add colour-by-survey-date mode#2
Merged
Conversation
New "Survey date" colour mode: legs are coloured across the model's date range (oldest cool, newest warm; undated legs grey), using the midpoint of each leg's date range. The legend shows the newest/middle/oldest dates as ISO labels, or a "no dates recorded" note when nothing is dated. Pure logic lives in coloring.ts; the dropdown and legend pick the mode up automatically. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying caveviewer with
|
| Latest commit: |
a2f7b52
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d1e36d4b.caveviewer.pages.dev |
| Branch Preview URL: | https://feat-colour-by-date.caveviewer.pages.dev |
3 tasks
MattNotarangelo
added a commit
that referenced
this pull request
Jun 11, 2026
Resolved test/coloring.test.ts import block (main's superset wins); coloring.ts auto-merged — date mode and the equate-aware entranceDistances coexist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
.topsupport (feat(parser): add PocketTopo .top (v3) support #1): every trip lands dates on legs, and date colouring is also how users spot bad device dates (e.g. the 2005-vs-2015 clock-reset case found during.topvalidation).date?: DateRange, and the colour-mode/legend system is pure pluggable logic — so this is a small, focused addition.What Has Changed
"date"colour mode insrc/viewer/coloring.ts: legs are coloured across the model's overall date range using the existing depth ramp (oldest cool/blue → newest warm/red); undated legs render grey. A leg's position in the range uses the midpoint of its date span.test/coloring.test.ts(range colouring, date-span midpoints, legend labels, no-dates note, single-date edge, mode registration). 70/70 passing.Verified end-to-end in the browser with Survex's date-edge-case fixture (
dump3ddate.3d, 1900-01-01 → 2078-12-31): per-leg colours shift along the traverse and the legend labels are correct.Screenshots/Video
Checklist
🤖 Generated with Claude Code