Conversation
Design doc for a browser-only, CDN-delivered presentation library built on utils/dom/observer/hooks. Two-axis navigation over a native CSS scroll-snap substrate; slides that overflow scroll instead of clipping. Records two load-bearing decisions: unregistered <slides>/<slide> elements upgraded via dom's observe() (custom element names require a hyphen), and proximity rather than mandatory snapping on the vertical axis so long slides stay reachable. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W2VBz7GGEaeDG8uEuuMc4f
…tions Adds the keyboard contract, where vertical keys scroll before advancing so long-slide content stays reachable without a mouse. Adds speaker notes: a <notes> element hidden by unconditional CSS, surfaced in a popup window written by the opener so no second file is hosted. Transport is layered — retained window reference + postMessage as primary, since these decks are typically opened from file:// where BroadcastChannel's opaque origin makes it unreliable; BroadcastChannel is the http(s) enhancement for a manually opened second tab. Elaborates the three open questions with recommendations: embedded decks via a --deck-height custom property with keyboard/URL scoped to a primary deck; auto-wrap loose column content; fragments in v1 with a minimal contract, gated on a JS-set data-ready flag so a script failure cannot hide content. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W2VBz7GGEaeDG8uEuuMc4f
Resolves the embedded-deck question: a document contains exactly one <slides> and it owns the viewport. Makes the deck a singleton, which removes keyboard focus arbitration and URL hash ownership from the design entirely. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W2VBz7GGEaeDG8uEuuMc4f
Decision 4: loose content in a column is wrapped into an implicit leading panel rather than warned about, since warning-only hands back a subtly broken deck for markup that is natural to write. Persistent column chrome stays deferred behind an explicit attribute. Decision 5: fragments ship in v1 with a minimal contract — reveal state, advance/retreat state machine, URL index. Ordering and reveal styles are out. Hiding is gated on the JS-set data-ready flag so a failed script cannot permanently hide authored content. Adds an element/attribute reference, a v1 scope split, and a build order with notes on which behavior needs real Chromium versus jsdom. Reorders decisions ahead of the structural sections. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W2VBz7GGEaeDG8uEuuMc4f
Chromium 145 and WebKit 26 probes showed y-mandatory does not trap tall panels, unclosed <p>/<li> swallow following slides, and the notes popup needs no message protocol but blanks on reload.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design doc only, no implementation. Adds
docs/design/slides.md.A browser-only presentation library delivered over CDN. Authors write plain HTML inside
<slides>/<slide>; the library adds two-axis navigation, keyboard control, speaker notes, and fragments on top ofutils/dom/observer. The deck is a real 2D scroll container, so content taller than a slide scrolls instead of clipping.Four assumptions were tested in Playwright (Chromium 145, WebKit 26, decks on
file://) and the doc records the results in Verified browser behavior:scroll-snap-type: y mandatorydoes not trap readers at tall-panel edges (spec-mandated for oversized snap areas), so both axes usemandatory.<p>or<li>makes the parser ignore</slide>, nesting every later slide inside it. Upgrade repairs misplaced slides and warns.postMessageorBroadcastChannel(WebKit drops it onfile://). A popup reload blanks the view;Sreopens it.Open before spec: touch-fling snapping on a real phone.
Outside the new package:
scripts/build.mjsneeds a CSS copy intodist/browser/for the CDN<link>.