Skip to content

Conversation

@MathEman-1
Copy link
Contributor

@MathEman-1 MathEman-1 commented Jan 9, 2019

Description

  1. Alt/Option + A Start autoplay should be a toggle (start/stop depending on the state - same as the other key combination toggles)

  2. Add prop/tag to Deck to pause autoplaying on slideshow start

Fixes #633 (issue)

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Master branch has been downloaded and functionality has been tested by manually trying the 2 new features in the example project. To verify changes:

  1. Enable autoplay in the example presentation and start/pause autoplay multiple times with key combination Alt/Option + A

  2. Setup Deck props with all combinations of autoplay={true/false} and autoplayOnStart={true/false}

  • Case autoplay={true} autoplayOnStart={false} -> presentation will be unpaused on start (can be paused with key combination & click)
  • Case autoplay={true} autoplayOnStart={true} -> presentation will be paused on start (can be unpaused with key combination & click)
    -Case autoplay={false} autoplayOnStart={false} -> autoplay controls are not available & no autoplay
    -Case autoplay={false} autoplayOnStart={true} -> autoplay controls are not available & no autoplay (autoplayOnStart is ignored)

Checklist:

  • My code follows the style guidelines of this project (I have run yarn prettier-fix && yarn lint)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (I have run yarn test)
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@ebrillhart
Copy link
Contributor

Hey @MathEman-1! Looks like it's failing on prettier. Try running yarn prettier-fix again and pushing back up.

@MathEman-1
Copy link
Contributor Author

Hey @ebrillhart, there were just some empty spaces in the readme - thats pretty strict :) Seems to have passed now.

@ebrillhart ebrillhart requested a review from kale-stew January 11, 2019 20:09
@kale-stew
Copy link
Contributor

kale-stew commented Jan 12, 2019

Tested these changes out and they look great! Thank you for updating the docs as well. This is a handy feature that should also close #583 when merged.

I've only got one follow up request for you @MathEman-1 - could you please add this new boolean autoplayOnStart prop to Spectacle's type definitions here in our index.d.ts? If you don't want to we can merge anyway and follow up with a PR to update these, it would just be simpler if you wrapped it into this body of work. :) Thank you!

@MathEman-1
Copy link
Contributor Author

Hey @kale-stew, I think you mean just adding the autoplayOnStart boolean definition to the index.d.ts file - I added it now. I looked into the file but somehow forgot to add it - thanks for the reminder!

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.

Feature: Autoplaying Toggle + Autoplay on Presentation Start prop/tag

3 participants