Commit fd21de9
committed
feat(ui): table views for users, the journal and both payment lists
Closes #64, and carries the same treatment to the three other lists where every row holds
the same handful of facts. Each keeps its cards; the table is the default and the choice
is remembered per list, in this browser, because it is a working preference rather than a
per-visit one.
Users: user, status, online, traffic, expiry, devices, groups, actions.
Journal: what happened, to whom, the details, who did it, when.
Pending orders keep both decisions in the row; history is read-only and dated by when an
order settled, falling back to when it was raised for one that never did.
Decisions worth recording:
- Narrow screens drop columns rather than scroll. A horizontal scrollbar on a phone is
worse than three fewer columns, and everything hidden is one tap away in the detail
sheet — the user's name is the button that opens it. Which columns survive lives next
to the cells they match.
- Row actions are icons. Two labelled buttons per row spent most of the row's width on
the two things every row repeats; the words survive as the accessible name and the
hover title. IconButton gained a link form, because a control that navigates has to BE
an anchor — middle-click, "open in new tab" and the status-bar preview all come from
the element, not a click handler — and target=_blank now carries rel=noopener.
- The groups column shows the first badge and a "+N" chip carrying the rest as hover
text; one account in four groups used to stretch every row on the page.
- Icon-only controls set aria-label from their title. Hover text never reaches a touch
device and a screen reader announces nothing without it.
- One definition, not four: TableShell/THead/TR/TD and ViewSwitch live in ui.tsx, and
useViewMode owns the persistence, so the surface and the toggle cannot drift apart.
Verified in the built bundle — the surface class list appears exactly once.
- The per-user journal inside the detail modal keeps its cards: it is narrow, and there
is nothing to align it with.
Storage is guarded everywhere: Safari in private mode throws on access, and a display
preference is never worth failing a render over.1 parent ec41ee2 commit fd21de9
8 files changed
Lines changed: 786 additions & 96 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
| |||
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
58 | | - | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| |||
0 commit comments