fix: empty state when all dashboard widgets are closed #49

Merged
pitfriedrich merged 1 commits from ai/issue-39-empty-state-dashboard into main 2026-07-29 05:40:12 +00:00
Collaborator

What

Renders a placeholder on the dashboard once every widget has been closed, instead of a blank grid:

  • Short explanatory copy ("Keine Widgets auf dem Dashboard").
  • Primary CTA reusing the existing widget picker.
  • Secondary action that rebuilds the default widget set from scratch (GridStackLayout.resetLayout() alone can't do this — it only repositions widgets still present, and none are left once the dashboard is empty).

The placeholder is a plain Div outside GridStackLayout's light DOM — never a GridStackItem, so it's never draggable and never shows up in getLayout(). Visibility is toggled from every path that adds or removes a widget (initial build, add-widget, undo, and any close, client or programmatic).

German copy with English/Spanish translations added to all three bundles. Styled from the existing --dialect-* token layer (dashed border, matching gridstack's own placeholder aesthetic), correct in light/dark.

Tests

  • New browserless tests in DashboardViewTest: closing every widget shows the empty state and hides the grid; adding a widget hides it again; the restore action rebuilds the default layout.
  • ./mvnw test green.

Closes #39

## What Renders a placeholder on the dashboard once every widget has been closed, instead of a blank grid: - Short explanatory copy ("Keine Widgets auf dem Dashboard"). - Primary CTA reusing the existing widget picker. - Secondary action that rebuilds the default widget set from scratch (`GridStackLayout.resetLayout()` alone can't do this — it only repositions widgets still present, and none are left once the dashboard is empty). The placeholder is a plain `Div` outside `GridStackLayout`'s light DOM — never a `GridStackItem`, so it's never draggable and never shows up in `getLayout()`. Visibility is toggled from every path that adds or removes a widget (initial build, add-widget, undo, and any close, client or programmatic). German copy with English/Spanish translations added to all three bundles. Styled from the existing `--dialect-*` token layer (dashed border, matching gridstack's own placeholder aesthetic), correct in light/dark. ## Tests - New browserless tests in `DashboardViewTest`: closing every widget shows the empty state and hides the grid; adding a widget hides it again; the restore action rebuilds the default layout. - `./mvnw test` green. Closes #39
claude-bot added 1 commit 2026-07-29 05:32:34 +00:00
fix: empty state when all dashboard widgets are closed (#39)
CI / build-and-test (pull_request) Successful in 2m22s
dbe304e61e
Show a placeholder (CTA to add a widget, secondary action to restore the
default layout) instead of a blank grid once every widget has been closed.
pitfriedrich merged commit 505ad32d4a into main 2026-07-29 05:40:12 +00:00
pitfriedrich deleted branch ai/issue-39-empty-state-dashboard 2026-07-29 05:40:12 +00:00
Sign in to join this conversation.