#304: custom fonts in the pickers, an admin screen, and the licence page #313
No reviewers
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#313
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "issue-304-custom-font-ui"
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?
Implements #304 on top of #303.
What it adds
GET /api/v1/fonts/custom- the family list for any signed-in user (the pickers, the licence page and the injected@font-facerules all need it; only the management routes stay Site-Admin-gated).CustomFontFacesinjects the@font-facerules for the uploaded families - catalog fonts come from the generatedcatalog.css, uploaded ones only exist at runtime.<optgroup>, the catalog's category grouping preserved inside each source.A defect from #303 that no test could see
fontStackcannot tell an uploaded family from a deleted one, so the PDF exporter embedded the@font-faceand then never named the family in the stack. Every PDF of a pond using an operator font rendered in the system font, with a green job. Both call sites now receive the uploaded families;pdf-html.test.tspins it from both sides.Verified against a real Gotenberg - the same document rendered twice:
PlayfairDisplay-BoldNotoSans-BoldThat also closes the open point from #303 ("PDF export with a custom font not visually verified").
Verification
fonts+import-export: 77 passed, 13 skipped (sidecar-dependent)./fontsand asserts the font section actually renders on/admin.pnpm lint,pnpm typecheck,pnpm i18n:checkgreen.Accessibility
Visible localised labels on every file input, the format requirement stated in text rather than only on rejection, backend errors through the existing announced form-error path (new
font_*codes inerrors.json), upload progress and completion in arole="status"region, the delete confirmation keyboard-operable with focus moved to it and returned on cancel, andoptgrouplabels as real labels.Closes #304
7f0a86b84ctoee6a11f9b0The font manager's upload live regions made `getByRole('status')` ambiguous on /admin, and legal.spec.ts — which asserts the legal form's success message — started failing in the e2e pack. That is the documented trap in CLAUDE.md: a new label or region makes an existing page-wide locator ambiguous, and the fix is to scope the SPEC, not to drop the region a screen reader needs. The section gets a named class for exactly that purpose. Verified locally against the running stack: legal, fonts, admin-users, admin-quotas and the a11y pack all pass.