Restore /zeitstrahl Datum-mode visual fidelity to the Concept-A spec (#833) #836

Merged
marcel merged 23 commits from feat/issue-833-zeitstrahl-fidelity into main 2026-06-14 14:12:42 +02:00
2 changed files with 23 additions and 3 deletions
Showing only changes of commit f715f9ce9c - Show all commits

View File

@@ -21,6 +21,9 @@ const dateLabel = $derived(timelineDateLabel(entry.eventDate, entry.precision, e
const provenance = $derived(
entry.derived ? m.timeline_provenance_derived() : m.timeline_provenance_curated()
);
// Provenance always shows; the date is an optional prefix so an undated event
// still reads "abgeleitet"/"kuratiert" (REQ-007).
const subtitle = $derived(dateLabel ? `${dateLabel} · ${provenance}` : provenance);
const canEdit = $derived(!entry.derived && entry.eventId != null);
</script>
@@ -46,9 +49,7 @@ const canEdit = $derived(!entry.derived && entry.eventId != null);
>{entry.title}</span
>
{/if}
{#if dateLabel}
<span class="block font-sans text-xs text-ink-3">{dateLabel} · {provenance}</span>
{/if}
<span class="block font-sans text-xs text-ink-3">{subtitle}</span>
</span>
{#if canEdit}
<a

View File

@@ -120,4 +120,23 @@ describe('EventPill', () => {
expect(document.body.textContent).not.toContain('persönlich');
expect(document.body.textContent).not.toContain('SEASON');
});
it('still shows the provenance token when the event has no date label (REQ-007)', () => {
// An undated / UNKNOWN-precision event (e.g. in the undated bucket) yields a
// null dateLabel; provenance must not be gated behind the date.
const entry = makeEntry({
kind: 'EVENT',
derived: true,
derivedType: 'BIRTH',
title: 'Geburt: Hans',
senderName: '',
receiverName: '',
precision: 'UNKNOWN',
eventDate: undefined,
documentId: undefined
});
expect(timelineDateLabel(entry.eventDate, entry.precision, entry.eventDateEnd)).toBeNull();
render(EventPill, { entry });
expect(document.body.textContent).toContain(m.timeline_provenance_derived());
});
});