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 12 additions and 4 deletions
Showing only changes of commit 84938e1bf3 - Show all commits

View File

@@ -40,10 +40,10 @@ const historical = $derived(m.timeline_layer_historical_suffix());
>
{fromYear}{toYear}
</span>
<span class="font-sans text-xs text-ink-3"> · {historical}</span>
{:else if dateText}
<span class="ml-2 font-sans text-xs text-ink-3">{dateText} · {historical}</span>
{:else}
<span class="ml-2 font-sans text-xs text-ink-3">{historical}</span>
<span class="ml-2 font-sans text-xs text-ink-3">{dateText}</span>
{/if}
<!-- Single trailing "· historisch" register, after the title and any
span pill / date — one render site, consistent separator (REQ-009). -->
<span class="ml-2 font-sans text-xs text-ink-3">· {historical}</span>
</div>

View File

@@ -55,6 +55,14 @@ describe('WorldBand', () => {
expect(document.body.textContent).toContain(m.timeline_layer_historical_suffix());
});
it('shows "· historisch" with a leading separator even when the band has no date (#833 REQ-009)', () => {
render(WorldBand, {
entry: historical({ precision: 'UNKNOWN', eventDate: undefined, eventDateEnd: undefined })
});
expect(document.querySelector('[data-testid="world-range"]')).toBeNull();
expect(document.body.textContent).toContain(`· ${m.timeline_layer_historical_suffix()}`);
});
it('follows the RANGE span pill with inline "· historisch" text, not a second pill (#833 REQ-009)', () => {
render(WorldBand, { entry: historical() });
const pill = document.querySelector('[data-testid="world-range"]');