feat: Stammbaum — Mode B social network view (D3-Force, all persons) #359
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?
Follow-up to #358 (Stammbaum initial release). Mode A (family tree) must be shipped and stable before this is started.
What
Add a toggle pill to the Stammbaum top bar that switches from the generational family tree (Mode A) to a force-directed graph showing all ~180 persons and their relationships (Mode B).
Why
The family tree (Mode A) shows only the 30 family members in a clean hierarchy. The network view gives a richer picture — you can see how non-family contacts (colleagues, doctors, friends) cluster around family members, which adds social context to the letters.
Behaviour
Toggle:
[Stammbaum | Alle Verbindungen]pill in the top bar. Toggle state is not persisted — always opens in Mode A on page load.Mode B layout:
d3-forceonly (not full D3, ~8 kb gzipped). Svelte handles all SVG rendering; D3 provides position simulation only.Interactions (same as Mode A):
Performance target: D3-Force simulation with ~180 nodes reaches a stable layout in < 2 s on a mid-range laptop.
Data
No backend changes required. Mode B uses the existing
GET /api/networkendpoint (without?family=true) which already returns all nodes and edges.Accessibility
role="button",aria-label="{displayName}"Out of scope
Acceptance criteria
/stammbaum, when I click "Alle Verbindungen", then all persons (family + contacts) appear as a force-directed graph/stammbaum, the view opens in Mode A (not persisted)