Closed sneakers-the-rat closed 3 years ago
ya it's just due to the hardcoding... can give custom transitions by doing this: https://github.com/sneakers-the-rat/spectacle/commit/584d115858d730e209ec72f5c9735e5bd697fddc
aka just using theme objects that are given by the user (i didn't use the format recommended in the docs, just an array). i'd be willing to tidy that up into a PR if it's helpful but i haven't gotten any response yet from y'all :(. love the tool, would love to contribute, just not sure where everybody is!
Looks like this was fixed here: https://github.com/FormidableLabs/spectacle/commit/ddcea75bbc7522520ef7d3de540a8a67ec6cdb9b
Describe Your Environment
What version of Spectacle are you using? (can be found by running
npm list spectacle
) 8.0.1What version of React are you using? (can be found by running
npm list react
) 17.0.2What browser are you using? firefox/chrome
What machine are you on? macos
Describe the Problem
Expected behavior: Be able to change transitions between slides
Actual behavior: Transition control is mentioned in the docs here: https://formidable.com/open-source/spectacle/docs/props/#transition-object , but nowhere else in the docs that i've been able to find is it described how to actually use that object. searching for 'transition' across the whole repo doesn't yield one either. in fact searching for transitions throughout the library itself is surprisingly fruitless.
I could be mistaken since there isn't any documentation on how the hooks are intended to be used, but it looks like sliding left to right is hardcoded here: https://github.com/FormidableLabs/spectacle/blob/75052e61bedabf5ed9965506bb1fb7e82112782f/src/components/slide/slide.js#L24-L26 and here https://github.com/FormidableLabs/spectacle/blob/75052e61bedabf5ed9965506bb1fb7e82112782f/src/components/slide/slide.js#L240-L259 .
and the transition objects don't seem to be imported anywhere in the library: https://github.com/FormidableLabs/spectacle/blob/main/src/components/transitions/index.js
I'm just going to subclass the slide component, but that seems really unnecessary when the slide/deck components should take
transition
objects that give those three states as advertised in the docs.Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.