[Mappe·Page] Dokument-Bearbeiten — edit / new / bulk-edit split-pane (/documents/[id]/edit, /new, /bulk-edit) #865
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Page alignment. Part of #853. Prototype:
prototypes/Dokument-Bearbeiten.dc.html.Current gaps (audit)
red-*/gray-*; progress bar usesbg-brand-navy(won't flip dark) →bg-primary;UploadZonehardcodes a dark palette + all eight German user-facing strings are not in Paraglide (see i18n section below); field-label casing inconsistent (font-mediumvsfont-bold); sub-44px targets; mixed focus rings.Scope (
routes/documents/[id]/edit/+page.svelte,routes/documents/new/+page.svelte,routes/documents/bulk-edit/+page.svelte,lib/document/DocumentEditLayout.svelte,BulkDocumentEditLayout.svelte,UploadZone.svelte)_AUTHORING_KIT §6(Löschen danger / Abbrechen + Zur Überprüfung secondary / Speichern primary);Cardfor form sections; progress stripbg-primary.UploadZone: token colors + i18n all user-facing strings (see §i18n below); empty dropzone matches the prototype's single-line layout (see §Empty dropzone copy).ring-focus-ring.Card#858,SegmentedControl#857,PageHeader#856) must be imported from$lib/shared/— do not re-implement inside$lib/document/while waiting on dependencies.i18n — UploadZone strings (all 8)
The previous scope named only the two validation strings. All eight user-facing strings in
UploadZone.sveltemust move to Paraglide — hardcoded Germanaria-labels are an a11y defect, not cosmetic:"Dateityp wird nicht unterstützt"m.error_unsupported_file_type()(key exists)"Datei ist zu groß"m.error_file_too_large()(key exists)aria-label="Dateiupload-Bereich"upload_zone_label"Datei wird hochgeladen"(role="status")upload_zone_uploading"Wird hochgeladen …"upload_zone_progress_label"Abbrechen"upload_zone_cancelaria-label="Datei ablegen"upload_zone_drop_label"Noch keine Datei hochgeladen"aria-label="Datei auswählen"/"Datei auswählen"upload_zone_select_label/upload_zone_select"oder Datei hier ablegen"Add all new keys to
messages/{de,en,es}.json. Keys that already exist (error_unsupported_file_type,error_file_too_large) are a wiring change only — no four-site add needed for those two.Empty dropzone copy
Decided: adopt the prototype's single-line layout (not the current three-line layout).
The prototype (
Dokument-Bearbeiten.dc.html:79–80) shows a 34 px upload icon plus a single line "Dateien hier ablegen oder klicken". The current component shows three separate lines ("Noch keine Datei hochgeladen" / "Datei auswählen" / "oder Datei hier ablegen"). The reskin must match the prototype: one line, icon above. This is a copy and layout change, not only a color change.Responsive stacking (320 px)
Decided: at the mobile breakpoint, the panes stack — dropzone/preview above form — and the action bar remains reachable without horizontal scrolling. This is the Critical path for the senior-phone reader audience.
Dark-mode icon
Decided: use a
currentColor-driven token for the upload icon, not thefilter:invert(1) brightness(1.6)approach seen inDokument-Bearbeiten.dc.html:17. Filter inversion is the dark-mode anti-pattern — atext-ink-2ortext-primarycolored SVG flips cleanly with the theme.Security note (implementer)
Two guardrails that must not regress during the reskin:
{@html}anywhere in the reskin, including prototype-matched icon/markup. All user-visible strings render through{...}escaping or Paraglide.use:enhance(?/save,?/delete,?/markForReview, file upload). Do not convert any to a clientfetchwhile restyling the trigger buttons — that would bypass the SSR auth-cookie path (CWE-352-adjacent).TDD seam
The one logic-bearing change is the UploadZone validation strings → Paraglide. Write a failing
*.svelte.spec.tsrender test asserting the component outputsm.error_unsupported_file_type()(not the German literal), then go green by removing the hardcoded string at:28. That is the red/green gate for the entire i18n move.Verification
Proofshot all three route variants (
/edit,/new,/bulk-edit) at 320 / 768 / 1440 px in both light and dark themes. axe-core must pass both themes.Acceptance
prototypes/Dokument-Bearbeiten.dc.htmlvariants — proofshot at 320 / 768 / 1440 px in light and dark; axe-core passes both themes; ≥4.5:1 contrast; focus-visible preservedaria-labels); empty dropzone shows the prototype's single-line copy with 34 px iconred-*/gray-*/white/*palette classes)_AUTHORING_KIT §6+ Montserrat 700 UPPERCASE field labels +ring-focus-ringaria-live="polite"/role="status"after token swapm.error_unsupported_file_type()output, not German literal$lib/shared/(eslintboundaries-clean); not re-implemented in$lib/document/currentColortoken, notfilter:invertOut of Scope
documentsdomainDepends on: #854 tokens · #856 PageHeader (compact) · #857 SegmentedControl · #858 Card.