Skip to content

feat(examples): migrate remaining examples to the shared component package - #521

Merged
kylebarron merged 14 commits into
mainfrom
kyle/shared-components-all
May 11, 2026
Merged

kylebarron merged 14 commits into
mainfrom
kyle/shared-components-all

Conversation

@kylebarron

@kylebarron kylebarron commented May 11, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #520 — migrates the seven remaining examples onto deck.gl-raster-examples-shared and adds the roadmap components that serve ≥2 examples. Spec: dev-docs/specs/2026-05-11-migrate-remaining-examples-to-shared-design.md.

Closes #519.

New examples/_shared/ components

  • RangeSlider — dual-thumb slider built on Chakra v3's multi-thumb Slider
  • HelpTooltip — ?-icon tooltip (Chakra Tooltip + CollecticonCircleQuestion)
  • ColormapPreview — prop-driven colormap-sprite preview strip
  • DebugControls gains an optional label prop; HelpTooltip preserves newlines (whiteSpace: pre-line)

Migrated examples

usgs-topo-cutline, zarr-sentinel2-tci, naip-mosaic, vermont-cog-comparison, aef-mosaic, dynamical-zarr-ecmwf, land-cover — all now use the shared package, like the #520 pilots (cog-basic, sentinel-2). For each: main.tsx wrapped in <ExampleProvider>; local DeckGLOverlay snippet → shared DeckGlOverlay; hand-rolled floating panel → <ControlPanel> (collapsible header + docs/source/repo footer); native form controls → Chakra NativeSelect/Checkbox/Slider in <Field>; external links → <ExternalLink>.

  • aef-mosaic / naip-mosaic / dynamical-zarr-ecmwf drop @radix-ui/react-slider (no longer used anywhere in the repo).
  • naip-mosaic's panel extracted to src/control-panel.tsx.
  • dynamical-zarr-ecmwf's play/pause buttons → CollecticonCirclePlay / CollecticonCirclePause.
  • land-cover deletes its local UIOverlay / HelpIcon (uses the shared UIOverlay / HelpTooltip) and rewrites CategoryFilter's checkbox tree + color swatches on Chakra Checkbox (tri-state master/group checkboxes; whole header bars expand/collapse).

Single-use widgets stay local: vermont-cog-comparison's SwipeHandle, land-cover's CategoryFilter.

Also pulls in #522 (NDVI range-filter rescale fix) via a merge from main, and includes a custom map style commit for the ECMWF example.

Test plan

  • typecheck clean for _shared and all 11 examples (the docs package has a pre-existing typecheck failure on missing generated typedoc sidebars — unrelated)
  • pnpm check clean (Biome lint + format)
  • pnpm build builds every package + example
  • package test suites pass: deck.gl-raster, deck.gl-geotiff, deck.gl-zarr, affine, proj (packages/geotiff integration tests need locally-generated .npy fixtures from the geotiff-test-data submodule — pre-existing, not affected by this branch)
  • dev-server smoke checks, including visual review of dynamical-zarr-ecmwf and land-cover

🤖 Generated with Claude Code

kylebarron and others added 14 commits May 11, 2026 12:38
Design for roadmap item #1 of the shared-example-components work: migrate
the seven examples not covered by #520 (aef-mosaic, dynamical-zarr-ecmwf,
land-cover, naip-mosaic, usgs-topo-cutline, vermont-cog-comparison,
zarr-sentinel2-tci) onto deck.gl-raster-examples-shared, plus the three
roadmap components serving >=2 examples (RangeSlider, HelpTooltip,
ColormapPreview) and an optional `label` prop on DebugControls.
CategoryFilter and SwipeHandle stay local; per-example panel-file placement
is preserved. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
New components in deck.gl-raster-examples-shared for the example migrations:
RangeSlider (dual-thumb, wraps Chakra's multi-thumb Slider), HelpTooltip
(Chakra Tooltip + a "?" collecticon trigger), ColormapPreview (prop-driven
sprite strip). Also adds an optional `label` prop to DebugControls. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…les-shared

Swaps the hand-rolled DeckGLOverlay + inline-styled control panel for the
shared ControlPanel / Field / ExternalLink / DeckGlOverlay components and the
shared Chakra theme; wraps the app in ExampleProvider. Links the CutlineBbox
mention to the API docs. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ples-shared

Replaces the hand-rolled DeckGLOverlay + inline panel with the shared
ControlPanel / DebugControls (label="Debug mesh") / DeckGlOverlay components
and the shared Chakra theme; wraps the app in ExampleProvider. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ared

Replaces the hand-rolled DeckGLOverlay + inline panel and the raw
@radix-ui/react-slider with the shared ControlPanel / Field / ExternalLink /
RangeSlider / ColormapPreview / DeckGlOverlay components and the shared Chakra
theme; extracts the panel into src/control-panel.tsx; wraps the app in
ExampleProvider. Drops the @radix-ui/react-slider dep. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…examples-shared

Replaces the hand-rolled DeckGLOverlay + ComparePanel chrome with the shared
ControlPanel / Field / ExternalLink / DeckGlOverlay components and the shared
Chakra theme (per-side year/render-mode selects → Field + NativeSelect, keeping
the optgroups); wraps the app in ExampleProvider. SwipeHandle stays a local
component. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Replaces the hand-rolled DeckGLOverlay, InfoTooltip, and raw
@radix-ui/react-slider panel with the shared ControlPanel / Field /
ExternalLink / HelpTooltip / RangeSlider / DeckGlOverlay components (band
sliders → Chakra Slider) and the shared Chakra theme; wraps the app in
ExampleProvider. Drops the @radix-ui/react-slider dep. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…amples-shared

Replaces the hand-rolled DeckGLOverlay, InfoTooltip, Play/Pause SVGs, and two
raw @radix-ui/react-slider sliders with the shared ControlPanel / Field /
ExternalLink / HelpTooltip / RangeSlider / ColormapPreview / DeckGlOverlay
components (single-thumb sliders → Chakra Slider, date input → Chakra Input,
play/pause → CollecticonCirclePlay/Pause IconButton) and the shared Chakra
theme; wraps the app in ExampleProvider. Drops the @radix-ui/react-slider dep
(now fully unused across examples). Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Deletes the local DeckGLOverlay, UIOverlay, and HelpIcon; rebuilds InfoPanel
on the shared ControlPanel (intro prose → ExternalLink; debug overlay +
opacity slider + mesh-max-error slider on Chakra Checkbox/Slider; HelpIcons →
HelpTooltip); rewrites CategoryFilter's checkbox tree and color swatches on
Chakra Checkbox (tri-state master/group checkboxes via `checked="indeterminate"`)
with ExternalLink for the classification reference; uses the shared UIOverlay +
DeckGlOverlay; wraps the app in ExampleProvider. Also makes the shared
HelpTooltip preserve newlines (`whiteSpace="pre-line"`) for multi-paragraph
help text. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…p items

Updates examples/README.md to say all examples use deck.gl-raster-examples-shared,
and marks roadmap items 1–3 (remaining-example migrations, HelpTooltip,
RangeSlider) done and item 6 (ColormapPreview) partial in the shared-example-
components design spec. Refs #519.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@kylebarron kylebarron changed the title wip: Move all examples to shared components feat(examples): migrate remaining examples to the shared component package May 11, 2026
@github-actions github-actions Bot added the feat label May 11, 2026
@kylebarron
kylebarron enabled auto-merge (squash) May 11, 2026 19:06
@kylebarron
kylebarron merged commit 728244f into main May 11, 2026
3 of 4 checks passed
@kylebarron
kylebarron deleted the kyle/shared-components-all branch May 11, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make shared components across examples

1 participant