Empty state when all dashboard widgets are closed #39

Closed
opened 2026-07-28 19:47:33 +00:00 by claude-bot · 1 comment
Collaborator

Problem

Widgets are closable (#14). Close all of them and the dashboard is a blank page: no widgets, no explanation, and the only visible way forward is the "Layout zurücksetzen" button in the toolbar — which the user has no reason to associate with "get my dashboard back".

The grid itself keeps minRow: 1 so it does not collapse entirely, but there is nothing in it.

Proposal

Render a placeholder when the grid has zero items:

  • Short explanatory line ("Keine Widgets auf dem Dashboard").
  • Primary CTA opening the widget picker (#21).
  • Secondary action: restore the default layout.
  • Placeholder appears/disappears reactively as the last widget is closed or the first is added — hook into the existing GridStackItem.CloseEvent and the add path.

The placeholder must not be a GridStackItem itself, or it becomes draggable and gets persisted into the layout.

Acceptance criteria

  • Closing the last widget shows the empty state; adding one hides it again.
  • Empty state is not persisted as a widget and does not appear in getLayout().
  • Styled from the --dialect-* token layer, correct in light and dark theme.
  • German copy, keys in all three bundles (translations.properties, _en, _es).
  • Browserless test: close all items → placeholder present.

Depends on

#21 (the CTA needs a picker to open). Without it, ship with the reset action only.

Scope

Small.

## Problem Widgets are closable (#14). Close all of them and the dashboard is a blank page: no widgets, no explanation, and the only visible way forward is the "Layout zurücksetzen" button in the toolbar — which the user has no reason to associate with "get my dashboard back". The grid itself keeps `minRow: 1` so it does not collapse entirely, but there is nothing in it. ## Proposal Render a placeholder when the grid has zero items: - Short explanatory line ("Keine Widgets auf dem Dashboard"). - Primary CTA opening the widget picker (#21). - Secondary action: restore the default layout. - Placeholder appears/disappears reactively as the last widget is closed or the first is added — hook into the existing `GridStackItem.CloseEvent` and the add path. The placeholder must not be a `GridStackItem` itself, or it becomes draggable and gets persisted into the layout. ## Acceptance criteria - Closing the last widget shows the empty state; adding one hides it again. - Empty state is not persisted as a widget and does not appear in `getLayout()`. - Styled from the `--dialect-*` token layer, correct in light and dark theme. - German copy, keys in all three bundles (`translations.properties`, `_en`, `_es`). - Browserless test: close all items → placeholder present. ## Depends on #21 (the CTA needs a picker to open). Without it, ship with the reset action only. ## Scope Small.
claude-bot added the enhancement label 2026-07-28 19:47:33 +00:00
pitfriedrich added the ai-ready label 2026-07-29 05:04:08 +00:00
claude-bot added ai-wip and removed ai-ready labels 2026-07-29 05:06:52 +00:00
Author
Collaborator

PR: #49 — CI green.

PR: https://gitea.pitfriedrich.net/pitfriedrich/chart-app/pulls/49 — CI green.
claude-bot added ai-review and removed ai-wip labels 2026-07-29 05:36:19 +00:00
Sign in to join this conversation.