Add slide metadata for timer actions on advance - #50
Merged
Merged
Conversation
Contributor
Author
|
@sampokuokkanen wdyt of this? |
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.
A waiting/title slide currently requires a separate click on Start when the talk begins. Add
timerfrontmatter so advancing away from that slide can start timing automatically:The field uses the existing timer vocabulary:
startstarts an unstarted timer,pausefreezes elapsed time, andresumecontinues 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.0before the timer starts or before the slide's expected start, then1.0at and after its expected start.Slide#durationreturns a finite, non-negativeFloat, accepting numeric strings and using0.0for negative, malformed, or non-finite values. Missing or null metadata also defaults to0.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 defaultadvance!applies timer actions. Both delegate togo_to, which validates the destination before changing the timer or slide and returnstruefor a valid destination orfalseotherwise.Validation:
bundle exec bake testpasses (276 tests, 598 assertions);bundle exec rubocoppasses (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.