Skip to content

feat(plot): high-contrast orange elevation line on the gradient profile - #95

Merged
mousebrains merged 1 commit into
mainfrom
elev-line-contrast
May 30, 2026
Merged

feat(plot): high-contrast orange elevation line on the gradient profile#95
mousebrains merged 1 commit into
mainfrom
elev-line-contrast

Conversation

@mousebrains

Copy link
Copy Markdown
Owner

The gradient/elevation plot on description.php drew its elevation line in a blue (--c-elev) that was a near-twin of the gradient bars' blue (--c-link), so the line blended into the bars — worst over the tall full-opacity "significant" bars. This recolors the line to a warm orange that contrasts with the blue bars in both light and dark themes.

Change (CSS-only, src/kayak/web/static/style.css)

light dark .gp-elev width
before --c-elev: #1565c0 --c-elev: #a9d0f5 1.6
after --c-elev: #e65100 --c-elev: #ffa726 2

No PHP/SVG change — the <polyline class="gp-elev"> already carries no inline color (it's themed via the CSS variable), and the right-axis elevation tick labels also key off --c-elev, so they recolor to match for free.

Verification

  • Rendered before/after in both themes through the real generate_gradient_profile_svg() + the actual CSS (reach: NF Payette, 16 mi); comparison images shared with the maintainer.
  • biome check clean. No test pins the elevation color, and there are no visual-snapshot baselines, so nothing else is affected.

🤖 Generated with Claude Code

The gradient profile's elevation line shared the gradient bars' blue hue
(--c-elev was a near-twin of --c-link), so it blended into the bars wherever
they overlapped — worst over the tall full-opacity "significant" bars.

Recolor the line to a warm orange that contrasts with the blue bars in both
themes, and nudge the stroke 1.6 -> 2 for presence:

  --c-elev  light  #1565c0 -> #e65100
  --c-elev  dark   #a9d0f5 -> #ffa726

CSS-only (src/kayak/web/static/style.css); no PHP/SVG change. The right-axis
elevation tick labels also key off --c-elev, so they recolor to match for free.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mousebrains

Copy link
Copy Markdown
Owner Author

Code Review — #95 feat(plot): high-contrast orange elevation line on the gradient profile

Verdict: ✅ Approve. Clean, correctly scoped, and the right fix for a real legibility problem. CSS-only, one variable, zero functional surface.

Verified

  • The blend is real, in both themes. Bars fill with --c-link and the "significant" bars are full-opacity (.gp-bars-sig rect { fill: var(--c-link); fill-opacity: 1 }). The old elevation colors were near-twins of those bars in both themes — light #1565c0 vs --c-link #1b5591, and dark #a9d0f5 vs --c-link #6ab0f3 — so the line genuinely disappeared over the bars in each. The recolor addresses both, not just light mode. 👍
  • --c-elev is fully scoped. Grepped the repo: its only consumers are .gp-elev (line stroke) and .gp-elev-axis (right-axis label fill). No other rule, PHP, or JS reads it, so the recolor can't leak anywhere unexpected.
  • No inline color to fight the variable. Confirmed in php/includes/svg_plot.php: the polyline (:564) and the axis <text> (:570) are emitted with class= only — no inline stroke/fill/style. So the PR's "tick labels recolor for free" is accurate, and the variable is the single source of truth.

Worth noting (positive)

Blue ↔ orange is also one of the better colorblind-safe pairings (deuteranopia/protanopia separate it cleanly, unlike a red/green choice), so this improves accessibility, not just aesthetics. #e65100 on the white surface clears WCAG 1.4.11 non-text contrast (~3.7:1 ≥ 3:1).

Notes

  • Verification approach fits a pure color tweak: rendered before/after through the real generator + CSS in both themes, biome clean, and nothing pins the color in tests or snapshot baselines. Nothing more to unit-test here.
  • Trivial nit (ignore at will): this reads more like a fix/style (restoring legibility) than a feat, but that's purely a conventional-commit label preference.

🤖 Reviewed with Claude Code

@mousebrains
mousebrains merged commit 1723053 into main May 30, 2026
8 checks passed
@mousebrains
mousebrains deleted the elev-line-contrast branch May 30, 2026 20:26
mousebrains added a commit that referenced this pull request May 31, 2026
* docs: round-6 deep project review (graded B+, ▲ from B−)

Sixth deep project review of the entire tracked repo — 6 cold facet
auditors (Python, PHP/security, schema/data, tests/CI, ops, docs) +
synthesizer hand-re-verification, judging two bands: (A) did round-5's
fixes durably stick, and (B) what did #93#98 + migrations 0069–0071 +
the two direct-to-main commits introduce.

The recursive integrity check passes cleanly for the first time in the
series: every round-5 fix (R1.1/R1.2/R1.3/R1.5/R2.1/R3.x/R4.x) landed as
a committed PR and is still present at HEAD, and every mechanized guard
is proven non-vacuous by break-it experiment. New code is clean — no
CRIT/HIGH: #93 USACE kcfs→cfs (correct, per-series), migrations
0069/0070/0071 (idempotent, FK-clean, Bridgeport DROP cascade
residue-free), #96/#97 multi-state pickers, #95/#98 gradient JS.

Two MED findings, both recurrences of round-5 classes closed by
documentation not mechanization: (1) two direct-to-main commits, one of
which broke CI on main (the {}-is-a-dict bug); (2) a nightly snapshot
overrode migration 0067's sort_name for gauge 217 with no migration.
Root cause is shared — main accepts un-CI-gated direct pushes from both
humans and the snapshot bot. Lever: route everything through a CI gate
(branch protection + a self-gating/auto-merging snapshot), a
snapshot-column drift guard, and teach seed_gauge_display to preserve
migration-pinned sort_names.

Two facet over-claims dissolved on hand-re-verification (the USACE
temperature-docstring drop is a correct fix; check_reaches DOES
range-check vertices via validate_lat_lon).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: fold external-review corrections into the round-6 review (#99)

The PR #99 external verification pass re-confirmed every finding,
severity, and the B+ grade against db34ae0 (recommendation: merge), and
flagged one inaccurate evidence line plus three off-by-one citations.
Corrected:

  - MED #1: drop the `git branch --contains` "reachable only from main"
    claim — feature branches later cut from main now contain 9b428bb /
    6007c21, so containment no longer distinguishes them. The direct-to-
    main conclusion stands on the durable evidence (linear f3ed673..HEAD,
    no merge commit, missing (#NN) suffix).
  - citations: ci.yml:114→115, SourceUrlTest.php:83-84→84-85,
    check_reaches.py:212→213.

Added an External-review note recording the pass + the one below-LOW item
it surfaced (the 0069/0070 header comments' now-stale PENDING_RECONCILIATION
wording).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant