refactor(ui): use bg-surface token instead of bg-white on thumbnail tiles #312

Open
opened 2026-04-23 20:31:36 +02:00 by marcel · 0 comments
Owner

Context

Flagged by @leonievoss in the review of PR #311:

ConversationThumbnail.svelte:23 hardcodes bg-white — In dark mode the tile becomes a bright-white rectangle with a dark paper scan on it, held together only by dark:mix-blend-multiply. The mix-blend works for light-colored scans but produces muddy results on high-contrast handwriting. The existing DocumentThumbnail.svelte has the identical pattern, so this is the team's convention.

This pre-existed PR #311 (inherited from DocumentThumbnail.svelte) and affects both thumbnail components consistently. Filing separately so the fix can touch both surfaces in a single sweep without widening the scope of #305.

Affected files

  • frontend/src/lib/components/ConversationThumbnail.svelte
  • frontend/src/lib/components/DocumentThumbnail.svelte

Proposed approach

Replace bg-white with bg-surface (dark-mode-aware token). Re-evaluate whether dark:mix-blend-multiply is still needed after the switch — it may become redundant or need adjustment to dark:mix-blend-screen for scans that were relying on the blend-over-white behavior.

Before shipping the change:

  1. Capture baseline screenshots of a portrait PDF scan, a landscape postcard, and a high-contrast handwriting sample in both light + dark mode
  2. Swap the token
  3. Confirm all three samples render sensibly in both modes; adjust blend-mode if one regresses
  4. Run the axe sweep (briefwechsel-a11y.spec.ts) in dark mode to confirm no contrast regression

Acceptance criteria

  • Neither ConversationThumbnail.svelte nor DocumentThumbnail.svelte contains bg-white
  • Dark mode: paper scans don't produce a bright-white frame around a dark image
  • Light mode: no visual regression from the current appearance
  • axe-core WCAG AA passes in both modes
## Context Flagged by @leonievoss in the review of PR #311: > **`ConversationThumbnail.svelte:23` hardcodes `bg-white`** — In dark mode the tile becomes a bright-white rectangle with a dark paper scan on it, held together only by `dark:mix-blend-multiply`. The mix-blend works for light-colored scans but produces muddy results on high-contrast handwriting. The existing `DocumentThumbnail.svelte` has the identical pattern, so this is the team's convention. This pre-existed PR #311 (inherited from `DocumentThumbnail.svelte`) and affects both thumbnail components consistently. Filing separately so the fix can touch both surfaces in a single sweep without widening the scope of #305. ## Affected files - `frontend/src/lib/components/ConversationThumbnail.svelte` - `frontend/src/lib/components/DocumentThumbnail.svelte` ## Proposed approach Replace `bg-white` with `bg-surface` (dark-mode-aware token). Re-evaluate whether `dark:mix-blend-multiply` is still needed after the switch — it may become redundant or need adjustment to `dark:mix-blend-screen` for scans that were relying on the blend-over-white behavior. Before shipping the change: 1. Capture baseline screenshots of a portrait PDF scan, a landscape postcard, and a high-contrast handwriting sample in both light + dark mode 2. Swap the token 3. Confirm all three samples render sensibly in both modes; adjust blend-mode if one regresses 4. Run the axe sweep (`briefwechsel-a11y.spec.ts`) in dark mode to confirm no contrast regression ## Acceptance criteria - Neither `ConversationThumbnail.svelte` nor `DocumentThumbnail.svelte` contains `bg-white` - Dark mode: paper scans don't produce a bright-white frame around a dark image - Light mode: no visual regression from the current appearance - axe-core WCAG AA passes in both modes
marcel added the refactorui labels 2026-04-23 20:31:45 +02:00
Sign in to join this conversation.
No Label refactor ui
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#312