feat(admin): per-row badge preview with unconfigured tooltip, Excel-style column filters and search in Contacts/Registrations

- New shared BadgeRender module (resolveText/resolveQr/BadgeElementBody/BadgePagePreview/fitScale) reused by the badge editor and the new read-only preview modal
- Registrations: Badge button on every row opens a live preview of that attendee's badge; grayed out with a Uiverse-style APPE-red tooltip when the event has no badge configured
- Contacts + Registrations: per-column multi-select filters (LinkedIn/Visibility/Admin; Type/Ticket/Checked in) with Excel-style live counts, plus general search (contacts: first/last/email; registrations: +type)
- New Tooltip and ColumnFilter primitives in ui.tsx (portal-based, escape/outside-click close)
- e2e: registration-badge-preview.spec.ts (13) + table-filters.spec.ts (13), all green; docs synced
This commit is contained in:
Lago committed 2026-10-16 08:53:46 +02:00
1 parent 6b277a2a67
commit 3d4dc207ff
10 files changed
+988 -121

No files matched your search

+43 -2
View File
@@ -19,11 +19,52 @@ layout onto the millimetre canvas with a bound attendee name, adding/selecting a
text element and its handles, editing `x` to move an element, saving via
`save_badge_layout`, preview mode hiding the handles, the JSON view, a failed
save, the mobile layout, the **Delete key** removing the selection, binding the
**company / organizer** field, **align-centre** on the page, and **Shift-click
multi-select** for group alignment. No real attendee data changes.
**company / organizer** field, **align-centre** on the page, **Shift-click**
multi-select for group alignment, **drag-to-centre smart guides** with snapping,
the labelled **Align text in box** section (its horizontal / vertical buttons
change the rendered text alignment and persist through save and reload), and the
**`Ctrl`+`Z` / `Ctrl`+`Y`** undo / redo shortcuts (ignored while a panel field has
focus). No real attendee data changes.
See [RPC rules](./rpcs.md#badge-editor) and the [Badges view](../frontend/admin-app.md).
# Registration Badge Preview Regression
No migration is involved — the preview reuses the badge layouts above. Run:
```sh
CONVIVO_ADMIN_URL=http://127.0.0.1:3001 npm test --prefix e2e -- registration-badge-preview.spec.ts --project=chromium
```
The suite is API-mocked and covers a **Badge** button on every registration row,
rendering the default layout with **that row's own** name / ticket type / company
and a real QR SVG, per-attendee isolation (one row never shows another's data),
switching layouts inside the modal, hiding the picker when only one layout
exists, the **disabled (grayed-out) Badge button** when the event has no layout
or only an **empty** one, the hover **tooltip** explaining a badge must be
configured first (portalled to `document.body`, so the table never clips it), a
failed layout load leaving the buttons disabled without breaking the list,
layouts loading **once per event** (reused by every preview, no per-open
request), closing via **Done** and the backdrop, and fitting a mobile viewport.
No real attendee data changes.
# Table Filters Regression
No migration is involved — column filters and search are frontend-only. Run:
```sh
CONVIVO_ADMIN_URL=http://127.0.0.1:3001 npm test --prefix e2e -- table-filters.spec.ts --project=chromium
```
The suite is API-mocked and covers the **Contacts** and **Registrations** views:
the general search matching **first name / last name / email** (plus **type** on
Registrations), the per-column **multi-select filters** (Contacts: LinkedIn,
Visibility, Admin; Registrations: Type, Ticket, Checked in), filters **combining**
with each other and the search, **live option counts** that follow the other
active filters (Excel-style), the **active-count badge** on a filter button,
**Clear**, and that the dropdown is **portalled to `document.body`** so the
table's `overflow: hidden` never clips it. No real data changes.
# Raffle Regression
After applying `20261015180640_raffle`, run: