Support the read-only calendar role, show "Vorstand", fix link buttons
Test and deploy / test (pull_request) Successful in 2m18s
Test and deploy / deploy (pull_request) Skipped

- Read-only role: /admin/me's permissions decide via canEditCalendar
  (lib/permissions.ts, mirrors the API's canWrite: only `access` writes).
  Read-only accounts see everything but get no "Neuer Termin", no "+", no
  "Veröffentlichen"; an event opens as "Termin ansehen" with locked fields.
  A "Nur lesen" badge in the header explains why. The API refuses their
  writes regardless.
- The management calendar is labelled "Vorstand"; the slug stays
  `management` for the API, URLs and iCal links.
- The subscription dialog's Apple/Google links are plain anchors styled with
  buttonVariants instead of Base UI Buttons rendering an <a>, which warned in
  dev and would have given them role="button".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PaddyandClaude Opus 5.5 committed 2026-11-08 22:15:31 +01:00
1 parent 1971d2bd6f
commit 61e0393f01
16 files changed
+155 -32

No files matched your search

+4
View File
@@ -73,6 +73,10 @@ Collected during the rewrite (September 2026); the progress log in
and `sheet.tsx`.
- **Base UI, not Radix:** toggles expose `aria-pressed` (not `data-state=on`), triggers take a
`render` prop (not `asChild`), menu radio items stay open unless `closeOnClick` is set.
- **A link that looks like a button is a plain `<a className={buttonVariants(…)}>`**, not
`<Button render={<a …/>}>`. Through Base UI's Button it warns in dev ("expected a native
<button>", shown as Next's "2 issues" badge) and, with `nativeButton={false}`, gets
`role="button"` - screen readers then announce a link as a button.
- **Base UI Select ignores synthetic `click()`s**; automated tests need real pointer or keyboard input.
- **Closed dialogs stay in the DOM** with `data-closed` until their exit animation ends - in a hidden
tab that never happens. Query `[data-open]` when checking what's open.