Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide/display:none slide when not active in full presentation mode? #298

Closed
patrickhlauke opened this issue Sep 26, 2017 · 13 comments
Closed
Labels

Comments

@patrickhlauke
Copy link

Just wondering if there's a reason why, when presenting, slides are "stacked" rather than using display:none to remove all but the .active slide. The current behavior, combined with large slide shows with lots of high-res images (which yes, admittedly aren't a fantastic idea for performance) results in heavy image decode thrashing in current Chrome (see https://twitter.com/patrick_h_lauke/status/911962086875521026 and https://bugs.chromium.org/p/chromium/issues/detail?id=768799).

I've patched this in my presentation here, but wondering why that's not default behavior for shower.

patrickhlauke/getting-touchy-presentation@aa9bd6e

@pepelsbey
Copy link
Member

pepelsbey commented Oct 3, 2017

I did it mostly to prepare slides for possible animations. But I never managed to implement it. In fact, I even hate such slide animations. So if you say it would make performance better, I’ll try to make it a default behavior.

@pepelsbey
Copy link
Member

pepelsbey commented Oct 7, 2017

Right, there’s a problem: with display: none|block animated special effects like growing and shrinking shouts stop working, see next 2 sliles in fullscreen mode.

Here’s the code for animation. I’m not exactly sure how to make it work with display: none

@pepelsbey
Copy link
Member

Here’s the demo and it seems that no animation could be triggered on a slide after display: none to block switch.

@patrickhlauke
Copy link
Author

wonder if using CSS animation instead of transition could work...

@patrickhlauke
Copy link
Author

Of course, this makes it more cumbersome, but it seems to work - see demo https://codepen.io/patrickhlauke/pen/veRyyB?editors=1100

@pepelsbey
Copy link
Member

Yay! Will release Ribbon and Material versions with display: none this week. Thank you :)

@pepelsbey
Copy link
Member

There’s a problem: when something’s display: none it doesn’t take part in counters. Meaning, that I can generate slide numbers only in list mode, in full mode every slide will be 1. Any idea what to use instead of display: none to achieve the same perf results?

@patrickhlauke
Copy link
Author

i've actually switched to visibility:hidden ... does that also cause the same counter issue? patrickhlauke/getting-touchy-presentation@7180a69

@patrickhlauke
Copy link
Author

also, the perf problem seems to have been fixed (not yet in stable, but at least in canary), so you may get away with not actually fixing anything in the worst case...

@pepelsbey
Copy link
Member

If you wait long enough any perf problem would go away :D

@patrickhlauke
Copy link
Author

Capture from war games: Greetings professor Falken. Hello. A strange game. The only winning move is not to play

@pepelsbey
Copy link
Member

There’s a problem with visibility: if you use it for something else (like class="next" steps) it will override parent’s visibility and pop-up over the current slide from somewhere else.

@pepelsbey
Copy link
Member

Good old clip: rect(0 0 0 0) to clip: auto switching works fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants