spectacle
spectacle copied to clipboard
v6 Migration
Hello and many thanks for the huge upgrade. It is undeniable that there has been a huge effort and a lot of work done in version 6 of spectacle.
Question
I recently decided to upgrade my spectacle dependency from ^5.7.2 to the latest ^6.2.0.
The amount of changes is difficult to handle with and a lot of things stopped working:
- The theming is totally different. All the previous work I did is useless now...
- There is a problem with the ref on the
<Deck />component. The deck.current is staying undefined. - Is the
window.slideCountremoved? I used to have a line of code:window.slideCount = deck.current.props.children.length;and is not working anymore. - I used to have a React component named
MySlidewhich was using a slide template and was rendering a<Slide />spectacle component, also not working anymore, the<Deck />needs to have strictly<Slide />components in the new version, I don't understand why.
I would like to ask if there is a way to solve the above problems, and if you can add some more documentation on your website regarding the changes of the migration. Although the software is good, it's often frustrating when trying to use, because of the lack of detailed documentation.
@kale-stew I have opened this issue 18 days ago, please give an answer ...
Hi @aristofanischionis, apologies for the delay in response - I wanted to wait for other work to land before I listed out specific API changes to note in the migration, but that work is still in progress and I don't want to delay my response any further.
Essentially, I cannot make any promises about future Spectacle versions matching what we knew before v6. We did a complete rewrite of the library, completely removing some functionality and changing the way a lot of things work under the hood. We are close to shipping a rewrite of that rewrite (soon to be v7, another major release), ironing out a number of fundamental bugs in the way we reference slides and slide subsets, which will once again change the API.
My best recommendation at this time is going to be to pin your use of Spectacle to the oldest functional version of our pre-6 version, which would be v5.8.0. I'm sorry that this probably isn't the answer you want to hear, but I don't have a step-by-step migration guide for the changes we released.
Hi @kale-stew,
Thank you for your response, it is well understood. Have a nice day, and once again thanks for the great effort you are making to keep Spectacle up-to-date.
Aristofanis.