feat(person): show document statistics bar #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User Journey
Thomas opens the person page for his grandfather Karl. He wants a quick sense of how well-documented Karl's life is before scrolling through documents. Currently there is no summary — he has to mentally count the list and find the earliest/latest dates himself.
With this feature, Thomas sees a compact strip above the document list: "23 Dokumente · 1921–1967". In three seconds he knows the scope of Karl's archive.
High-Level Plan
Derive statistics from the documents already loaded in the page — no backend changes needed. Compute total count and date range (min/max
documentDate) reactively and render a small strip between the page header and the document list.Depends on issue #1 (sent + received documents) being implemented first, since the stats should cover both directions.
Detailed Plan
Frontend only
Derived values in
persons/[id]/+page.svelte:Statistics strip — render between the header card and the document sections, only when
docStats.total > 0:Styled as a subtle
bg-brand-sand/30banner withfont-sans text-sm text-brand-navy/70.If only one year exists (all documents have the same year, or only one document), show just
1921instead of a range.If no document has a date, omit the year range entirely — show only
"5 Dokumente".Acceptance Criteria
documentDate