docs: refresh stale embed renderer descriptions after Task 1

Final-review reviewer flagged two minor staleness items:
- embeds.md §10 ImageEmbed bullets still described the pre-Task-1
  shape (no wrapper, no aspect-ratio). Replaced with the actual
  current shape, with an explicit pointer to the Dimension
  reservation contract section that explains why the dims-null
  branch deliberately has no fallback.
- message-list.md said VideoEmbed uses "padding-bottom" without
  noting the direct-video branch uses aspectRatio. Now describes
  both branches explicitly.

No code changes; both are documentation-only touch-ups.
This commit is contained in:
Jannis Braun
2026-04-25 13:15:14 +02:00
parent 56830972f4
commit 9aa40c0304
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -394,9 +394,11 @@ Two modes based on whether a provider is present:
### ImageEmbed
- Renders `<img>` with `max-w-[400px]`, `max-h-[300px]`, `loading="lazy"`, `referrerPolicy="no-referrer"`
- Image source: `embed.image ?? embed.url`
- Click opens image preview lightbox via `useUIStore.openImagePreview()`
- When `embed.width && embed.height` are populated: wraps the `<img>` in a sized container with `style={{ aspectRatio: ${width}/${height}, maxWidth: Math.min(width, 400), maxHeight: 300 }}` (mirrors `AttachmentRenderer.tsx:81-100`). Eliminates layout shift on image load.
- When dimensions are null: no wrapper sizing, no fallback aspect-ratio. Inner `<img>` renders within `max-w-[400px]`, `max-h-[300px]`. The absent fallback is deliberate — see the *Dimension reservation contract* section below.
- Inner `<img>`: `object-contain`, `loading="lazy"`, `referrerPolicy="no-referrer"`.
- Image source: `embed.image ?? embed.url`.
- Click opens image preview lightbox via `useUIStore.openImagePreview()`.
### RichEmbed (Spotify)