fix(korrespondenz): address 10 visual and functional regressions

- Strip full-bleed: remove max-w container, put strips at page level
- Remove page heading/subtitle above strip (not in spec)
- Swap button always visible (drop opacity-0, keep pointer-events-none)
- Korrespondent placeholder "Alle Korrespondenten" + label "— optional"
- Add placeholder prop to PersonTypeahead; add onfocused callback prop
- "Person suchen" button now focuses #senderId-search instead of no-op navigate
- Wire CorrespondentSuggestionsDropdown on correspondent field focus
- Hint bar: bold name via <strong>, year-only dates (no ISO strings)
- Asymmetry bar: use first name only to prevent label overflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-30 13:57:00 +02:00
parent 49f6b0a8c7
commit 0387e9f428
5 changed files with 83 additions and 64 deletions

View File

@@ -1,10 +1,5 @@
<script lang="ts">
import {
conv_hint_single_person,
conv_hint_single_person_filtered,
conv_strip_sort_newest,
conv_strip_sort_oldest
} from '$lib/messages-extra';
import { conv_strip_sort_newest, conv_strip_sort_oldest } from '$lib/messages-extra';
interface Props {
senderName: string;
@@ -16,8 +11,9 @@ interface Props {
let { senderName, fromDate = '', toDate = '', sortDir = 'DESC' }: Props = $props();
let hasDateFilter = $derived(!!(fromDate || toDate));
let sortLabel = $derived(sortDir === 'ASC' ? conv_strip_sort_oldest() : conv_strip_sort_newest());
let fromYear = $derived(fromDate ? fromDate.substring(0, 4) : '');
let toYear = $derived(toDate ? toDate.substring(0, 4) : '');
</script>
<div
@@ -26,13 +22,12 @@ let sortLabel = $derived(sortDir === 'ASC' ? conv_strip_sort_oldest() : conv_str
<span class="text-sm" aria-hidden="true">📋</span>
{#if hasDateFilter}
{conv_hint_single_person_filtered({
name: senderName,
from: fromDate ?? '',
to: toDate ?? '',
sortLabel
})}
<strong>{senderName}</strong>
<span>·</span>
<span>{fromYear}{toYear}</span>
<span>·</span>
<span>{sortLabel}</span>
{:else}
{conv_hint_single_person({ name: senderName })}
Alle Briefe von <strong>{senderName}</strong> — wähle einen Korrespondenten oben um einzugrenzen
{/if}
</div>