Summary
Add an Import example Dashboard… action to the application-wide File menu. It opens a modal dialog where the user selects one shipped example Dashboard and either imports it or cancels.
Example catalogue
Keep the example catalogue in a JSON manifest under examples/. Each entry stores both the JSON filename and a human-readable full name; the UI must use the stored name rather than deriving it from the filename.
Suggested shape:
[
{ "file": "clickhouse-operations.json", "name": "ClickHouse Operations" },
{ "file": "shop-charts.json", "name": "Shop Charts" },
{ "file": "ontime-charts.json", "name": "OnTime Charts" }
]
Ship these three examples initially:
clickhouse-operations.json — ClickHouse Operations
shop-charts.json — Shop Charts
ontime-charts.json — OnTime Charts
The manifest is the ordered source of truth for which examples appear and how they are labelled.
User flow
- The user opens File → Import example Dashboard….
- A modal dialog opens with a single-select list of examples.
- The dialog has Import and Cancel buttons.
- Import is disabled until an example is selected.
- Cancel, Escape, or closing the dialog makes no workspace changes.
- Import loads the selected example file and passes it through the existing Dashboard import, codec, validation, dependency-closure, and commit path rather than introducing a second importer.
- On success, close the dialog and navigate consistently with the existing Dashboard import flow.
- On load, parse, validation, or commit failure, keep the current workspace unchanged and show the existing import diagnostic style.
Existing-Dashboard behaviour
Use the existing Dashboard import replacement/cancellation behaviour when the current workspace already contains a Dashboard. Example import must not silently overwrite or merge it.
Packaging
The manifest and referenced example JSON files must be available in the shipped application, including the production build. The implementation may copy them as build assets or embed them at build time, but the repository files under examples/ remain the maintained source of truth.
Scope
- Add the File-menu item and modal UI.
- Add the example manifest and the three initial example files.
- Reuse the normal Dashboard import pipeline and conflict handling.
- Validate the manifest and every referenced example in tests/build tooling so a missing, malformed, or stale example cannot ship unnoticed.
- Keep general URL-based galleries, remote examples, previews/screenshots, categories, search, and example editing out of scope.
Acceptance criteria
Related: #280, #447.
Summary
Add an Import example Dashboard… action to the application-wide File menu. It opens a modal dialog where the user selects one shipped example Dashboard and either imports it or cancels.
Example catalogue
Keep the example catalogue in a JSON manifest under
examples/. Each entry stores both the JSON filename and a human-readable full name; the UI must use the stored name rather than deriving it from the filename.Suggested shape:
[ { "file": "clickhouse-operations.json", "name": "ClickHouse Operations" }, { "file": "shop-charts.json", "name": "Shop Charts" }, { "file": "ontime-charts.json", "name": "OnTime Charts" } ]Ship these three examples initially:
clickhouse-operations.json— ClickHouse Operationsshop-charts.json— Shop Chartsontime-charts.json— OnTime ChartsThe manifest is the ordered source of truth for which examples appear and how they are labelled.
User flow
Existing-Dashboard behaviour
Use the existing Dashboard import replacement/cancellation behaviour when the current workspace already contains a Dashboard. Example import must not silently overwrite or merge it.
Packaging
The manifest and referenced example JSON files must be available in the shipped application, including the production build. The implementation may copy them as build assets or embed them at build time, but the repository files under
examples/remain the maintained source of truth.Scope
Acceptance criteria
CHANGELOG.mdand relevant Dashboard/import documentation are updated.Related: #280, #447.