sheepman4267 / OpenShow

A flexible, extensible, open-source presentation system
MIT License
2 stars 0 forks source link

Auto advance debounce needs work #31

Open sheepman4267 opened 1 week ago

sheepman4267 commented 1 week ago

As part of the development of our current auto advance system, code was added that keeps multiple auto advances at the same time from skipping over slides. It's better than nothing, but still broken.

  1. Using display.previous_slide.auto_advance_duration in checking elapsed time seems wrong. Take for example four slides, which have durations of 2, 3, 2, and 2 seconds. With the current code, slides one, two, and three are displayed, but slide three's auto advance is ignored. We should probably use display.current_slide.auto_advance_duration, but it seems to me that there must have been some reason for doing it this way. More thinking is needed.
  2. Even with this debounce code, we still sometimes have the same slide being triggered twice. This visually breaks transitions. We need to either debounce that event in _hyperscript, or debounce the view. Debouncing the view seems possible once we implement a redis backend, but maybe a _hyperscript solution is in order in the interim.