fix: add GridStackLayout showcase view (#7)
CI / build-and-test (pull_request) Successful in 1m13s

Adds a /gridstack route demonstrating GridStackLayout: four default
widgets (line/bar/pie chart cards plus a usage hint), buttons to add and
remove widgets at runtime, a reset-layout button and a layout-change
status line. Layout is persisted per browser via the existing
localStorage support. The view gets its own SideNavItem in MainLayout
and full de/en/es translations.

Fixes an infinite recursion in GridStackLayout.add(Component): a
single-argument add(item) resolves to that overload rather than the
varargs one, so its delegation to add(item) called itself. It now
appends through the element API and passes a GridStackItem through
unwrapped.

Adds the first test sources (browserless UI tests) covering the view's
widget count and the add/remove buttons.

Closes #7

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PYAcKoXKPN3rJ7nBroKZkc
This commit is contained in:
Pit Friedrich
2026-07-25 22:12:05 +02:00
parent 12761d53ca
commit 17396466a9
9 changed files with 268 additions and 4 deletions
+5 -1
View File
@@ -20,7 +20,11 @@ public enum Fa {
FORM("fa-solid", "fa-rectangle-list"),
TABLE("fa-solid", "fa-table"),
GLOBE("fa-solid", "fa-globe"),
SEARCH("fa-solid", "fa-magnifying-glass");
SEARCH("fa-solid", "fa-magnifying-glass"),
GRID("fa-solid", "fa-table-cells-large"),
ADD("fa-solid", "fa-plus"),
REMOVE("fa-solid", "fa-trash"),
RESET("fa-solid", "fa-arrow-rotate-left");
private final String[] classes;