Skip to content

feat(ui): add a Load Zurich example button to the empty state#3

Open
tahabakri wants to merge 1 commit into
Samukashvili:mainfrom
tahabakri:feat/try-example
Open

feat(ui): add a Load Zurich example button to the empty state#3
tahabakri wants to merge 1 commit into
Samukashvili:mainfrom
tahabakri:feat/try-example

Conversation

@tahabakri

Copy link
Copy Markdown
Contributor

A small onboarding win, building on the empty-state card already in the repo.

Why

A first-time visitor opens the workspace to a blank world map, and the only prompts are "Add a sighting" or "Import a file" — but they have no sighting data yet, so there's no way to see the tool actually work without hunting down input first. Rough cold start for a tool whose whole appeal is the result.

What

A "Load Zürich example" button inside the existing empty-state card. One click:

  • loads the three bundled sightings (mirrors examples/sightings_zurich.json),
  • goes through the same normalizeSighting / fitSightings path as Import,
  • clears the empty state and frames the map on Zürich,

…then they just hit Run analysis and get a real heatmap.

Origin-mode only (the example is sightings, not a flight area) — the button hides in the Coverage planner.

Notes

  • Reuses the existing .empty-state card + .control-button styling — no new design language.
  • One-line CSS fix so the [hidden] gate actually works on the button: .control-button's display:inline-flex was overriding the plain [hidden] attribute.

Verified against a local launchpoint ui: the button loads 3 sightings, the empty state clears, it hides in coverage mode, and the loaded example runs through to a result.

New visitors land on a blank world map with no way to see the tool work unless
they already have sighting data. Add a one-click example loader to the existing
empty-state card: it populates the bundled Zurich sightings (mirrors
examples/sightings_zurich.json) through the same normalizeSighting / fitSightings
path as Import, frames the map, and clears the empty state once loaded. Origin
mode only -- the example is sightings, not a flight area, so it hides in the
coverage planner.

Also a one-line CSS fix so the [hidden] gate works on the button: .control-button
sets display:inline-flex, which was overriding the plain [hidden] attribute.

Verified end-to-end against a local `launchpoint ui`: the button loads 3
sightings, the empty state clears, it hides in coverage mode, and the loaded
example runs to a real result.
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