|
| 1 | +# ADR 0001 — Inline image block: scope and deferred capabilities |
| 2 | + |
| 3 | +- Status: Accepted |
| 4 | +- Date: 2026-06-22 |
| 5 | +- Related spec: [docs/specs/2026-06-22-image-block-design.md](../specs/2026-06-22-image-block-design.md) |
| 6 | + |
| 7 | +## Context |
| 8 | + |
| 9 | +Users need to include images in cards and decks and control their placement. The |
| 10 | +rendering pipeline is a vertical flow of typed blocks (`headline`, `divider`, |
| 11 | +`spacer`, …) defined by a single Zod discriminated union and rendered through |
| 12 | +per-type Nunjucks partials. Several image models are possible — inline (flow), |
| 13 | +background, and free/absolute positioning — with increasing complexity. |
| 14 | + |
| 15 | +## Decision |
| 16 | + |
| 17 | +Ship V1 as an **inline image block** only: a new member of the block union that |
| 18 | +flows in block order, with `align` (left/center/right), `width` (sm/md/lg/full), |
| 19 | +and `alt`. Source may be a remote URL, a local file path (CLI), or a data-URI; |
| 20 | +resolution to a Puppeteer-loadable `src` happens server-side, never in React. |
| 21 | + |
| 22 | +## Deferred (explicitly out of scope for V1) |
| 23 | + |
| 24 | +Each is recorded so the boundary is intentional, not an oversight: |
| 25 | + |
| 26 | +1. **Rounded corners / border** — needs theme-driven color custom properties |
| 27 | + (CLAUDE.md #3) and a border-radius scale; purely cosmetic, no blocker. |
| 28 | +2. **Caption text** — a themed sub-text under the image; adds a styling surface and |
| 29 | + another field; revisit once inline images are in real use. |
| 30 | +3. **Background image** — a different layout model (image behind the card with an |
| 31 | + overlay for legibility); separate schema shape and CSS path. Worth its own spec. |
| 32 | +4. **Absolute (x/y) positioning + drag-to-place** — the most flexible and most |
| 33 | + complex model; requires coordinate storage, overlap/z-index rules, and dnd-kit |
| 34 | + work in the studio. Deferred until there is demonstrated need. |
| 35 | + |
| 36 | +## Consequences |
| 37 | + |
| 38 | +- The schema, template, and studio changes stay small and follow existing patterns, |
| 39 | + keeping V1 low-risk and quick to review. |
| 40 | +- Each deferred capability is additive: rounded corners and caption extend the same |
| 41 | + block; background and absolute positioning are new models that should get their |
| 42 | + own ADR + spec rather than being bolted onto the inline block. |
| 43 | +- If a deferred item is later picked up, supersede or extend this ADR rather than |
| 44 | + silently widening the inline block's responsibilities. |
0 commit comments