Files
umami/src/components
Yan 6ff13544ce let users toggle DataGrid between table and card view
DataGrid was already injecting displayMode='cards' on small viewports
via useMobile() and leaving it undefined (default 'table') everywhere
else. The user had no way to override either side: someone on a wide
screen who preferred a denser card list could not get there, and
someone on a tablet with a tall narrow window could not force the
table view to keep their layout consistent.

Add a small icon toggle in the DataGrid header row that flips between
table and cards, and persist the choice in localStorage under
umami.datagrid.displayMode. The user choice wins; if there is none,
the existing useMobile-driven default applies. Every DataGrid
consumer (sessions, websites, links, pixels, boards, team admin,
etc.) gets the toggle automatically with no caller-side change.

Verified in playwright on the sessions page: at 1400 viewport the
default is table; clicking the toggle switches to cards and a reload
keeps cards. At 800 viewport the default is cards; clicking the
toggle switches to table even though useMobile would otherwise force
cards. Round trip in both directions works and the choice survives
navigation away and back.
2026-05-08 11:04:04 -04:00
..
2026-03-24 15:29:13 -07:00
2026-04-15 14:55:28 -07:00
2026-04-15 10:31:21 -07:00
2026-04-15 11:02:46 -07:00
2026-03-11 09:38:55 -07:00
2026-02-25 02:27:46 -08:00
2025-09-26 01:46:36 -07:00