ADR 0115: Standard justified media wall is mandatory for every media visualization
Status: accepted Date: 2026-10-18
Context
Any surface that visualizes media (photos start page / timeline today, albums, discovery walls, person galleries, public share pages, future media surfaces) has so far written its own wall styling over time, producing divergent tile geometry, gaps, and sectioning. The timeline start page carries a solved, tested justified-row implementation (apps/web/src/lib/utils/justifiedWall.ts + wallRowHeights.ts, extracted per spec 055 T002). New media surfaces (e.g. spec 065 public share pages) need a binding default before further bespoke layouts accumulate.
Decision
- MANDATORY DEFAULT: whenever media items are visualized anywhere in Memories, the wall is laid out with the shared justified-row algorithm as on the photos start page: constant-height rows, per-item width proportional to its aspect ratio, greedy packing until the projected row width reaches the container, then justification when the exact row height lands in [min,max]; undersized rows clamp to minHeight, oversized non-final rows use the fallback height. Start-page parameters as the standard draft: aspect clamp 0.55..2.8 with square fallback when unknown; gap 4 px; row-height breakpoint table (full mode) 168/194/236/268/300 px at 480/768/1280/1680 px, min = max(96px, target0.52), max = target1.28; compact variant 92/112/136 px at 480/768 px (min = max(44px, target0.48), max = target1.85); geometry is a pure function of measured container width. Any deviation (different min/max, fillFinalRow off, non-justified masonry, fixed grid, etc.) requires an explicit ADR or spec-local justification. 2. DEFAULT SECTIONING: walls show capture-date day sections by default (per-wall sort mode captured|added as implemented in MediaGrid; undated items in a trailing section; custom pre-computed section groups remain an explicit opt-out per call site as wired in ADR 0110). Default ordering is NEWEST FIRST (matching the timeline start page); album surfaces are the documented explicit override, ordering ASCENDING (oldest first) — the same override governs public album share walls built from album semantics. 3. CONFIRMATION GATE: before any work builds a NEW media wall or materially changes wall parameters, confirm with the user whether the standard parameters above are taken as-is or a different ordering/density/sectioning is wanted. Deviations are then recorded in the feature's spec. 4. EXISTING SURFACES: are in compliance by construction when they reuse MediaGrid/justifiedWall; surfaces outside (e.g. custom share walls) migrate to the shared wall.
Consequences
Positive: one tested geometry implementation shared by all surfaces; visual consistency incl. variable tile width for portrait/landscape media; fewer bespoke layout regressions; accessibility + test coverage concentrated in one component family. Costs/governance: every new media surface must check this ADR first (confirmation gate) and may only diverge with a recorded spec/ADR justification; wall components must keep their pure-function geometry so embedded walls (carousels, overlays, share visitor walls) share the same rhythm. In-scope Follow-up work in scope: align the public share wall reuses the shared MediaGrid/justifiedWall path.
Memories Wiki
Using Memories
- Accounts, the Library Hub, and Data Export
- Albums and Automatic Suggestions
- Explore and Discovery Domains
- The Media Viewer
- People and Faces
- Places and Map
- Plants (In Development)
- Datenschutzerklärung (Privacy Policy)
- Fast, Progressive Image Loading
- Search
- Sharing and Households
- Timeline and Photos
- Uploading and Import
Self-Hosting
- Backup and Restore
- CLI Password Reset
- Deployment Architecture
- Known Issues and Operator Diagnostics
- Map Tiles and Place Data Privacy
- Storage Layout
- Upgrades and Versioning
- Workers
Reference