Skip to content

0.1.0-beta.17: pesticide use by township and section, the lens, and notice counts - #34

Merged
alexandermccormick merged 22 commits into
mainfrom
feat/pesticide-lens
Nov 16, 2026
Merged

alexandermccormick merged 22 commits into
mainfrom
feat/pesticide-lens

Conversation

@alexandermccormick

Copy link
Copy Markdown
Member

For the SJVAir Dashboard's Map widget (data-dashboard Release 1, step 5, spec 5): pesticide use by township and section, and spray notices. Spec: docs/superpowers/specs/2026-11-16-pesticide-lens-design.md; plan: docs/superpowers/plans/2026-11-16-pesticide-lens.md.

New

  • shapesLens, a plugin added right after a choropleth shapesPlugin (townships): hovering a township opens its 3×3 block into sections, drawn over the townships, which hide where their sections are drawn.
    • Hover behaves as in the Pesticides Explorer: it recentres onto a neighbour, drops after a 120 ms grace, and holds over a notice marker or the card.
    • Esc dismisses it. Touch hover is ignored, and a click or tap opens a card only.
    • lens.pin(refKey) / release() is the keyboard and touch path ("Show square miles"); feature-list focus never releases a pinned lens. center and pinned are reactive.
  • shapesPlugin: zoomRange (out of range it is also unlisted and has no legend), and a rich tooltip with tooltipShowsName.
  • shapesPlugin and pointsPlugin: legendUnits (a unit line under the section title) and legendNote (a host snippet at the section's foot).
  • pointsPlugin: count: { property }, numbered markers whose counts are summed in clusters (mapsdk:count).
  • PluginContext: hoverOf(pluginId) (a plugin's own feature under the pointer, even beneath another's; watched only once asked), plus pinned, focusedKey and pointerInCard. ThemeColors gains countMarkerText.
  • Demo: a "Pesticide use (mock data)" panel, covered by e2e.

Nothing changes for a host that sets none of these. No new message keys.

Checks

  • lint, svelte-check, npm test (1276 passed), test:bundle, test:licenses, and e2e in Chromium and Firefox (86 passed).
  • The browser project ran 6 times on two cores (taskset -c 0,1) with no flakes.
  • 2500 sections in view cost 0.70 ms median (1.60 ms max) per move, so the "faster in-view test for shapes" stays deferred.
  • Reviews: fresh reviews after the core hover change and after the lens, and a whole-branch review. Every Critical and Important finding is fixed with a test that failed first. One minor is deferred to data-dashboard's DEFERRED.md: a one-frame transparent block on each recentre.

Version 0.1.0-beta.17. README "Changes" and examples, and the CLAUDE.md architecture lines, are updated.

… card, count fallbacks and ring size, stray block parents, tidy-ups
@alexandermccormick
alexandermccormick merged commit 2a93385 into main Nov 16, 2026
1 check passed
@alexandermccormick
alexandermccormick deleted the feat/pesticide-lens branch November 16, 2026 21:58
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