Responsive grid breakpoints for small screens #41
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The grid column count is fixed:
On a phone, a 6-column-wide widget occupies half a ~380px viewport — charts become unreadable and unusable. The dashboard is desktop-only by accident, not by decision.
Proposal
Use gridstack's responsive support:
columnOptswith breakpoints so the grid collapses to fewer columns (ultimately 1) below a width threshold.cellHeightadjustment at small widths — 120px rows stack into a very long page otherwise.staticGridbelow a breakpoint. Editing a layout on a phone is rarely worth the misfires, and a static mobile view is a legitimate choice.Important interaction with persistence: gridstack's one-column mode remembers the multi-column layout and restores it when the viewport grows back. That must not be persisted (#22) as if the user had rearranged everything — otherwise resizing a browser window silently destroys the desktop layout. Verify what
save()returns while collapsed before wiring it to the store.Acceptance criteria
Depends on
Should land after or together with #22 — the persistence interaction above is the actual risk here, not the CSS.
Scope
Small in code, needs care in testing.
Fixed in #50: #50 (CI green).