damianavila / RISE

RISE: "Live" Reveal.js Jupyter/IPython Slideshow Extension
Other
3.67k stars 414 forks source link

Scrolling does not activate "on the fly" when the cell becomes longer than a screen height during live coding #558

Open prosoitos opened 3 years ago

prosoitos commented 3 years ago

During live coding, if a cell becomes longer than a screen height, scrolling does not become available "on the fly". Switching to another slide and back activates the scrolling capability, but it is totally awkward to do this senseless back and forth slide switching in the middle of a talk or a workshop. Without doing this, new cells and their output drift off the screen and become invisible.

If there were a way to activate scrolling as soon as the slide gets past a certain height, that would be great.

A potential alternative solution, which would be much easier to implement, would be to make all slides scrollable (if the scrollable option is selected of course), even those which are small enough to fit entirely on screen. If all slides are scrollable by default, regardless of their size, then there is no need to find a way to implement the change on the fly.

prosoitos commented 3 years ago

Of course, a workaround to make the slide scrollable from the start is to add a giant markdown cell with lots of <br>. But it is a pretty ugly solution because, even though that cell is invisible, the content of the slide is awkwardly pushed to the top of the slide.

damianavila commented 3 years ago

Scrolling has been always hard on RISE. I do not see scrolling on the fly like something easy to implement... but let me think about that a little bit more. Making an optional all scrollable slides could be an interesting workaround (and maybe easier to implement).

prosoitos commented 3 years ago

Thanks @damianavila !

I think that it would indeed be a lot easier to implement. That option certainly would work very well in my case!

prosoitos commented 3 years ago

Some users may not like that option because it would create a scroll bar on all the slides (unless an additional option about the scroll bar is created). But that can be addressed easily: I personally don't like having a scroll bar on slides as I find it cluttering, so I made it invisible in my css (that requires !important to override the default css):

.rise-enabled ::-webkit-scrollbar-thumb {
  background: transparent !important;
}

That's one of the customization examples I will add to the repo (when I have time! soon!)