feat(geschichten): blog-like family memory stories (closes #381) #382
@@ -70,7 +70,7 @@ function publishedAt(g: { publishedAt?: string }): string | null {
|
||||
type="button"
|
||||
aria-pressed={!hasFilters}
|
||||
onclick={clearAll}
|
||||
class="inline-flex h-9 items-center rounded-full border border-line px-3 font-sans text-xs font-bold tracking-wider text-ink-2 uppercase hover:bg-muted aria-pressed:bg-ink aria-pressed:text-primary-fg"
|
||||
class="inline-flex h-11 items-center rounded-full border border-line px-3 font-sans text-xs font-bold tracking-wider text-ink-2 uppercase hover:bg-muted aria-pressed:bg-ink aria-pressed:text-primary-fg"
|
||||
>
|
||||
{m.geschichten_filter_all_pill()}
|
||||
</button>
|
||||
@@ -81,7 +81,7 @@ function publishedAt(g: { publishedAt?: string }): string | null {
|
||||
aria-pressed="true"
|
||||
aria-label={m.geschichten_filter_remove_chip({ name: p.displayName })}
|
||||
onclick={() => removePerson(p.id!)}
|
||||
class="inline-flex h-9 items-center gap-2 rounded-full bg-ink px-3 font-sans text-xs font-bold tracking-wider text-primary-fg uppercase"
|
||||
class="inline-flex h-11 items-center gap-2 rounded-full bg-ink px-3 font-sans text-xs font-bold tracking-wider text-primary-fg uppercase"
|
||||
>
|
||||
{p.displayName}
|
||||
<span aria-hidden="true">×</span>
|
||||
@@ -92,7 +92,7 @@ function publishedAt(g: { publishedAt?: string }): string | null {
|
||||
type="button"
|
||||
aria-expanded={showPersonPicker}
|
||||
onclick={() => (showPersonPicker = !showPersonPicker)}
|
||||
class="inline-flex h-9 items-center rounded-full border border-line px-3 font-sans text-xs font-bold tracking-wider text-ink-2 uppercase hover:bg-muted"
|
||||
class="inline-flex h-11 items-center rounded-full border border-line px-3 font-sans text-xs font-bold tracking-wider text-ink-2 uppercase hover:bg-muted"
|
||||
>
|
||||
+ {m.geschichten_filter_choose_person()}
|
||||
</button>
|
||||
|
||||
@@ -99,4 +99,25 @@ describe('geschichten page — multi-person filter chips', () => {
|
||||
});
|
||||
await expect.element(page.getByRole('button', { name: /Person wählen/ })).toBeVisible();
|
||||
});
|
||||
|
||||
it('renders all filter pills with a 44px touch target (h-11)', async () => {
|
||||
render(Page, {
|
||||
data: makeData({
|
||||
personFilters: [person('a', 'Anna A')] as PageData['personFilters']
|
||||
})
|
||||
});
|
||||
|
||||
// All three pill variants must use h-11 (44px) per the senior-author touch-target rule
|
||||
const all = page.getByRole('button', { name: 'Alle' });
|
||||
const chip = page.getByRole('button', { name: /Anna A aus Filter entfernen/ });
|
||||
const add = page.getByRole('button', { name: /Person wählen/ });
|
||||
|
||||
const allEl = (await all.element()) as HTMLElement;
|
||||
const chipEl = (await chip.element()) as HTMLElement;
|
||||
const addEl = (await add.element()) as HTMLElement;
|
||||
|
||||
expect(allEl.className).toContain('h-11');
|
||||
expect(chipEl.className).toContain('h-11');
|
||||
expect(addEl.className).toContain('h-11');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user