wealth/docs/decisions/0039-toast-placement-declar...

17 lines
970 B
Markdown

# 0039 Toasts sit above whatever draws the bottom edge, declared by that part
Status: Proposed · Area: design · Date: 2026-10-09 · Decided by: agent
## Context
The old Toaster used a fixed 24px offset, so toasts covered the bottom nav and pinned task buttons. The DS places them 80px up over the nav, 152px over a pinned footer, low over a sheet, and 32px on desktop.
## Decision
- island `Toaster` reads a placement store. The part that draws an edge declares it while mounted: `useToastPlacement('nav'|'footer'|'desktop')` or `<ToastPlacementMarker>` from a server file. Any `[data-pinned-footer]` on screen lifts toasts to 152 by itself.
- Priority: desktop > footer > nav > low; inside an open sheet or modal toasts drop to low, except on desktop.
## Alternatives
- Each page passes an offset to the Toaster: every page would have to know what the shell draws.
## Consequences
A new bottom-fixed element must declare its placement or toasts will overlap it.