refactor(timeline): drop the canvas outer border (REQ-001)
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 4m1s
CI / OCR Service Tests (pull_request) Successful in 25s
CI / Backend Unit Tests (pull_request) Successful in 5m1s
CI / fail2ban Regex (pull_request) Successful in 43s
CI / Semgrep Security Scan (pull_request) Successful in 23s
SDD Gate / RTM Check (pull_request) Successful in 16s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m6s
SDD Gate / Contract Validate (pull_request) Successful in 23s
SDD Gate / Constitution Impact (pull_request) Successful in 18s

The page is already bg-canvas, so the frame's border was the only thing
making it visible; per review it reads cleaner without it. Keep the padded
bg-canvas surface; the timeline sits on the page without a frame line.

Refs #833
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-14 11:39:17 +02:00
parent 8029bdec92
commit 15836ea9ca
3 changed files with 9 additions and 7 deletions

View File

@@ -30,9 +30,10 @@ const metaLine = $derived.by(() => {
</svelte:head>
<div class="mx-auto max-w-5xl px-4 py-8">
<!-- The .tl-canvas sheet: a framed surface the timeline reads as a finished
life-thread rather than bare page chrome (REQ-001). -->
<div data-testid="timeline-canvas" class="rounded-[10px] border border-line bg-canvas p-6">
<!-- The .tl-canvas sheet: a padded canvas surface for the timeline. The outer
border is intentionally omitted (the page is already bg-canvas), per the
review of REQ-001 — the sheet reads through its padding, not a frame line. -->
<div data-testid="timeline-canvas" class="rounded-[10px] bg-canvas p-6">
<h1 class="font-serif text-2xl font-bold text-brand-navy">{m.timeline_heading()}</h1>
{#if hasContent}
<p data-testid="timeline-meta" class="mt-1 mb-6 font-sans text-xs text-ink-3">{metaLine}</p>

View File

@@ -29,15 +29,16 @@ const pageData = (timeline: ReturnType<typeof makeTimelineDTO>) => ({
});
describe('/zeitstrahl page', () => {
it('wraps the timeline in a bordered, rounded canvas frame (REQ-001)', () => {
it('wraps the timeline in a padded canvas surface, without an outer border (REQ-001)', () => {
render(Page, {
data: pageData(makeTimelineDTO({ years: [makeYear(1909, [makeEntry()])] }))
});
const canvas = document.querySelector('[data-testid="timeline-canvas"]');
expect(canvas).not.toBeNull();
expect(canvas?.classList.contains('bg-canvas')).toBe(true);
expect(canvas?.classList.contains('border')).toBe(true);
// the timeline renders inside the frame
// The outer border was dropped in review (the page is already bg-canvas).
expect(canvas?.classList.contains('border')).toBe(false);
// the timeline renders inside the surface
expect(canvas?.querySelector('ol')).not.toBeNull();
});