Skip to content

Add slide metadata for timer actions on advance - #50

Merged
samuel-williams-shopify merged 8 commits into
mainfrom
slide-timer-metadata
Sep 23, 2026
Merged

samuel-williams-shopify merged 8 commits into
mainfrom
slide-timer-metadata

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

A waiting/title slide currently requires a separate click on Start when the talk begins. Add timer frontmatter so advancing away from that slide can start timing automatically:

template: title
duration: 0
timer: start

The field uses the existing timer vocabulary: start starts an unstarted timer, pause freezes elapsed time, and resume continues a started timer. Actions apply to the outgoing slide on a successful Next action in the presenter or display. Revisiting a start slide preserves elapsed time and manual pauses.

Backward navigation, jumps, reloads, reconnects, saved-state restoration, and recorder navigation do not trigger timer actions. The new timer state is persisted and sent to listeners together with the new slide position. Zero-duration title/break slides are documented, and progress calculation handles them without dividing by zero: progress is 0.0 before the timer starts or before the slide's expected start, then 1.0 at and after its expected start.

Slide#duration returns a finite, non-negative Float, accepting numeric strings and using 0.0 for negative, malformed, or non-finite values. Missing or null metadata also defaults to 0.0, meaning no time has been allocated. Presentations that relied on the previous implicit 60-second duration need explicit durations to retain that pacing schedule. This keeps total duration and pacing consistent and preserves fractional progress when elapsed time is an integer.

When a presentation has no allocated time, the presenter keeps elapsed time and timer controls visible while hiding pacing indicators, slide progress, and the remaining-time estimate.

The recorder uses advance!(timer: false) to keep navigation in the controller while opting out of live timer actions. The default advance! applies timer actions. Both delegate to go_to, which validates the destination before changing the timer or slide and returns true for a valid destination or false otherwise.

Validation: bundle exec bake test passes (276 tests, 598 assertions); bundle exec rubocop passes (81 files). Coverage includes navigation return values and invalid destinations, presenter/display navigation, recorder isolation, start/pause/resume behavior and opting out, persistence, duration normalization and defaults, untimed presentations, and progress for zero or negative durations before, at, and after the expected start.

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor Author

@sampokuokkanen wdyt of this?

@samuel-williams-shopify
samuel-williams-shopify merged commit 96b7ec6 into main Sep 23, 2026
28 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the slide-timer-metadata branch September 23, 2026 07:35
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