Skip to content

feat(runtime): add URL deep-linking and hashchange navigation#5

Open
Reebz wants to merge 1 commit into
bluedusk:mainfrom
Reebz:feat/deep-linking
Open

feat(runtime): add URL deep-linking and hashchange navigation#5
Reebz wants to merge 1 commit into
bluedusk:mainfrom
Reebz:feat/deep-linking

Conversation

@Reebz

@Reebz Reebz commented Jun 9, 2026

Copy link
Copy Markdown

What

Reload always landed on slide one, a link could not target a specific slide, and a deep-linked chart slide rendered blank because the chart and notes bootstrap hardcoded slide zero.

  • slideFromHash() parses a one-based #N, clamps it to the valid range, and defaults to slide one. current initializes from it, goTo() writes history.replaceState(null, '', '#' + (current + 1)), and a hashchange listener handles Back and manual hash edits. The existing index === current guard prevents a feedback loop.
  • The chart bootstrap and the load-time speaker-notes call now read from current instead of a hardcoded slide zero, so a deep-linked chart slide draws and the right notes log.

Mirrored into assets/slides-runtime.js and the inline runtime in references/html-template.md, and documented in references/presentation-layer.md.

Test

  • Loading #5 opens slide five with its charts rendered.
  • Reloading on slide seven returns to slide seven.
  • Navigating updates the hash, and Back returns to the previous slide.
  • An out-of-range or malformed hash clamps to a valid slide, and a deck with no hash starts on slide one as before.

Dependencies

Touches slides-runtime.js, so it is cleanest to merge after the accessibility PR.

Co-Authored-By: Leslie Barbara Knope (Claude Opus 4.8 (1M context)) noreply@anthropic.com

Reload always landed on slide one, links could not target a slide, and a deep-linked chart slide rendered blank because the chart and notes bootstrap hardcoded slide zero. Add #N deep-linking with a hashchange listener and history.replaceState, and bootstrap charts and notes from the current slide.

Co-Authored-By: Leslie Barbara Knope (Claude Opus 4.8 (1M context)) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

@Reebz is attempting to deploy a commit to the bluedusk's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant