feat(ui): add a Load Zurich example button to the empty state#3
Open
tahabakri wants to merge 1 commit into
Open
feat(ui): add a Load Zurich example button to the empty state#3tahabakri wants to merge 1 commit into
tahabakri wants to merge 1 commit into
Conversation
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.
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.
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:
examples/sightings_zurich.json),normalizeSighting/fitSightingspath as Import,…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
.empty-statecard +.control-buttonstyling — no new design language.[hidden]gate actually works on the button:.control-button'sdisplay:inline-flexwas 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.