question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unmount slides when not displayed

See original GitHub issue

Description

Currently all slides remain in the DOM with display:none when not displayed & the components remain mounted. this means any slides that have components with side effects like animations will continue running, and everything starts going very sloooow.

Proposal

Add a prop to Deck like bufferRange where the content of slides slides +/- that range are mounted in the Dom, but otherwise are unmounted.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mhinkcommented, Jul 1, 2021

First off: you’re absolutely right about Progress, and I’m kind of annoyed at myself for not catching it. 😅

Secondly: your suggestion absolutely holds water. The problems you’re running into most likely have to do with the fact that Slides need to actually render their contents in order to detect “step participants”. Moreover, as you’ve noticed: slides aren’t exactly aware of their location in the presentation- they only know that the Deck addresses them by their slide ID. So the solution is more or less to have the Deck keep track of which slides should be rendered and which slides shouldn’t, and signal them accordingly.

You could technically implement a fix with some creative usage of DeckContext and your HideSlide component, but it’s much easier to implement in-core. So I’m cutting that PR now.

0reactions
sneakers-the-ratcommented, May 13, 2021

rendering them on first mount of Deck (by adding a || !initialized check) seems to fix the number of steps, and all my custom stepper components work, but now Appear components are broken because they seem to be tied to a specific stepID rather than a step #

edit: confirmed that providing an explicit ‘id’ to Appear fully fixes and everything is way way way way faster

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change, remove or turn off animation effects - Microsoft Support
Turn off all animations in a presentation · On the Slide Show tab, select Set Up Slide Show. · Under Show options, select...
Read more >
Remove all unused master slides in a PowerPoint presentation
This is an easy way to manually roll through the templates quickly without worrying about removing one that is in use.
Read more >
Remove Hidden Data in Microsoft PowerPoint | IT Services
Remove Hidden Slides. Click the View tab on the ribbon, and click Slide Sorter in the Presentation View group. Select the slide you...
Read more >
Bootstrap Carousel : Remove auto slide - Stack Overflow
That will make the auto sliding stop because there no Milliseconds added and will never slider next. Via Html By adding data-interval="false" and...
Read more >
Group or ungroup slides in Keynote on Mac - Apple Support
In the slide navigator, click to select a slide or select multiple slides, then drag them to the left until they're no longer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found