Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

fix(slides): restore non-morph transitions (#177)

Jamie (James) Londonff47755622da
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f7fb6c8d..7f34f397 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ pre-1.0.
## [Unreleased]
+- **Fix: Fade, slide, and zoom transitions animate again.** Present mode now keeps
+ the adjacent slides mounted while moving between them; morph transitions
+ were unaffected.
+
## [1.0.12] — 2026-08-01
- **A laser pointer while you present.** Press **L** in the slideshow and the
diff --git a/CLAUDE.md b/CLAUDE.md
index 09aaf0ae..8985ae4d 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -579,10 +579,12 @@ names provisional.
4. **Never let a literal `</script>` into the bundle** — `save.ts` builds it by
concatenation; the data block JSON escapes `<`.
5. Reveal's `.reveal-viewport` paints white; the present overlay CSS overrides it black.
-6. **svg-element CSS must be scoped** (`render.ts scopeCss`) — svg `<style>` applies
+6. **Reveal uses `distance < viewDistance`** — `1` mounts only the current section.
+ Keep it at least `2` so fade, slide, and zoom have adjacent sections to animate.
+7. **svg-element CSS must be scoped** (`render.ts scopeCss`) — svg `<style>` applies
document-wide, so one diagram's animation/dim rules would leak into every other
svg on the page (CSS animations with fill modes even beat later static rules).
-7. Tiny text labels make unusable click targets when scaled down — interactive
+8. Tiny text labels make unusable click targets when scaled down — interactive
controls get padded transparent `link` overlay rects, not links on the text itself.
- **Compressed shell (Phase 1)**: `scripts/postbuild-compress.mjs` (runs in
diff --git a/slides/src/present.ts b/slides/src/present.ts
index 5886dcf4..273782f8 100644
--- a/slides/src/present.ts
+++ b/slides/src/present.ts
@@ -470,8 +470,9 @@ export function startPresentation(
: false,
// touch is handled by our own swipe logic below (state-aware + ends exit)
touch: false,
- // heavy decks: paint only the neighbourhood of the current slide
- viewDistance: 1,
+ // Reveal uses distance < viewDistance; 2 is the minimum that keeps adjacent
+ // sections mounted so fade/slide/zoom transitions can animate.
+ viewDistance: 2,
keyboardCondition: null,
plugins: [],
})