Skip to content

Conversation

@fritz-c
Copy link
Contributor

@fritz-c fritz-c commented Sep 29, 2022

Description

The autoPlayLoop prop did not actually make the slideshow loop when autoplaying.

The fix for that was fairly straightforward, but uncovered another bug - any Appear or Stepper components on the final slide would get skipped over when jumping from the final slide to the start. That required reworking the slide logic to wrap around to the start when the final step of the final slide was exceeded.

That again, was relatively straightforward, but uncovered another bug - animations occurring when wrapping from the end to the start of the slideshow were fairly rough, with slides coming and going seemingly randomly. A little work on existing internal logic fixed it for most cases, but due to the nature of the existing animation logic, I was unable to find a simple solution to the rough animations occurring when wrapping around with a two-slide presentation. It certainly is possible to rework the animations such that we don't need to make any compromises, but the scale of such a project went way beyond what I was prepared to do for this bugfix.

Fixes #1224

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I updated the existing useAutoPlay tests to account for the newer, simpler behavior of the hook, and added a new unit test to test autoPlay+autoPlayLoop behavior from the user's perspective.

@fritz-c fritz-c merged commit 1c36959 into main Sep 30, 2022
@fritz-c fritz-c deleted the fix/autoplayloop branch September 30, 2022 15:06
@github-actions github-actions bot mentioned this pull request Sep 30, 2022
@github-actions github-actions bot mentioned this pull request Feb 25, 2023
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.

autoPlayLoop doesn't work

2 participants