You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement grafana-grid@1 as a lazy-loadable, rowless Dashboard layout: a responsive 12-column tile grid with shared Dashboard filters, deterministic packing, semantic tile heights, Workbench-only placement editing, and a valid flow@1 fallback.
Use the attached standalone HTML mockup as the visual reference for the dark operational Dashboard, shared control bar, compact panel chrome, dense spacing, mixed KPI/chart/table states, foldable rows, and semantic panel heights.
Decisions taken in the pre-implementation question round (with the mockup at the
"sql browser" design project, Grafana Dashboard.html, as visual reference):
Placement model — layout.items[tileId] = {span: 1–12, height: compact|medium|large};
vertical position derived by deterministically packing canonical dashboard.tiles[]
order into the 12-column grid. No x/y coordinates.
Rowless — no row headers, no folded/collapsible rows, no "Add row" (the mockup's
rows are explicitly excluded).
Edit UX — whole-card drag-reorder + corner-drag resize (span snaps to columns,
height snaps to the three semantic tiers; tile pinned to its column during the drag)
tile delete. Immediate propagation — no Save-layout, no Undo (owner override).
Engine switching — the edit-mode layout select gains a "Grafana grid" option;
flow→grid seeds spans 1→4, 2→6, 3→12 (heights carried) and snapshots the flow layout
as fallback; grid→flow restores it. Every grid mutation regenerates a valid flow@1 fallback (grid→flow spans 1–4→1, 5–8→2, 9–12→3).
Responsive — container-width (content-box) column clamp 12/6/4/2 at
≥1160/≥720/≥470 px; persisted spans never mutated.
"Lazy-loadable" = registration-time laziness — the plugin is constructed only when
a document requests grafana-grid@1 via the registry load() seam; it stays inside
the single-file artifact (hard rule 4 forbids network code-splitting).
Scope — layout engine only: the mockup's time-range control and auto-refresh
split-button are deferred; the existing Dashboard filter bar and manual refresh are
reused unchanged. The fallback schema slot stays pinned to flow@1.
Amendment (2026-07-18, owner, same PR): decision 6 superseded — tile heights are numeric row units 1–16 (px = 32 + 88×units; units 1/2/3 ≈ the old compact/medium/large
tiers, unit 16 = 1440 px ≈ 5× the previous max). The corner-drag snaps per unit; the legacy
enum strings remain valid in the schema and normalize to 1/2/3. Flow@1's own height
vocabulary is unchanged; the flow-fallback maps units 1→compact, 2→medium, ≥3→large.
Summary
Implement
grafana-grid@1as a lazy-loadable, rowless Dashboard layout: a responsive 12-column tile grid with shared Dashboard filters, deterministic packing, semantic tile heights, Workbench-only placement editing, and a validflow@1fallback.Depends on #280.
Reference design
Use the attached standalone HTML mockup as the visual reference for the dark operational Dashboard, shared control bar, compact panel chrome, dense spacing, mixed KPI/chart/table states, foldable rows, and semantic panel heights.
Reconciled — owner decisions + acceptance as shipped (2026-07-18, PR pending)
Decisions taken in the pre-implementation question round (with the mockup at the
"sql browser" design project,
Grafana Dashboard.html, as visual reference):layout.items[tileId] = {span: 1–12, height: compact|medium|large};vertical position derived by deterministically packing canonical
dashboard.tiles[]order into the 12-column grid. No x/y coordinates.
rows are explicitly excluded).
only when the dashboard resolves
!readOnly(current-workspace store).height snaps to the three semantic tiers; tile pinned to its column during the drag)
flow→grid seeds spans 1→4, 2→6, 3→12 (heights carried) and snapshots the flow layout
as
fallback; grid→flow restores it. Every grid mutation regenerates a validflow@1fallback (grid→flow spans 1–4→1, 5–8→2, 9–12→3).compact|medium|largevocabulary (118/210/296 px).≥1160/≥720/≥470 px; persisted spans never mutated.
a document requests
grafana-grid@1via the registryload()seam; it stays insidethe single-file artifact (hard rule 4 forbids network code-splitting).
split-button are deferred; the existing Dashboard filter bar and manual refresh are
reused unchanged. The
fallbackschema slot stays pinned toflow@1.Amendment (2026-07-18, owner, same PR): decision 6 superseded — tile heights are
numeric row units 1–16 (
px = 32 + 88×units; units 1/2/3 ≈ the old compact/medium/largetiers, unit 16 = 1440 px ≈ 5× the previous max). The corner-drag snaps per unit; the legacy
enum strings remain valid in the schema and normalize to 1/2/3. Flow@1's own height
vocabulary is unchanged; the flow-fallback maps units 1→compact, 2→medium, ≥3→large.