hakimel / reveal.js

The HTML Presentation Framework
https://revealjs.com
MIT License
67.8k stars 16.64k forks source link

Jump to top/ root before going to next horizontal section #1591

Open TheNotary opened 8 years ago

TheNotary commented 8 years ago

I've seen vertical horizontal slides presented with, and they've actually distracted me. As someone with prior experience to navigation and tracking UIs, I've always visually tracked the special significance of each slide i.e. when we're on a root and there's both a right arrow and a down arrow, and the presenter moves down, I can't help but make a mental note that if we want to continue on the 'main path' of the presentation, we need to remember to move upwards twice. This is a arduous mental task that I have difficulty abstaining from and I suspect it may distract other audience members as well.

Now that I'm working with this amazing software myself, I have a better understanding of what's actually going on. As I make my presentation, I plan to manually move the slide to the top before proceeding to the next vertical slide stack. Not only is this workflow more inline with my expectations of order of operations, it also allows my audience to see that we're leaving off from this significant section and moving on to the next one (a quick recap).

Is this aspect of presenting with reveal.js worth further discussion? Is there a way to hotkey this 'jump to top' feature other than creating an internal link at the bottom of all my vertical slide stacks? Would a PR for doing this feature be accepted in either the form of a function to 'goToRoot()' and/ or a configuration option such as "autoReturnToTopBeforeHorizontalTravle"?

smheidrich commented 8 years ago

You probably already know this, but as a workaround you can just put an invisible fragment at the end of the last slide in your vertical stack and listen to the corresponding fragmentshown event to make the transition to the top:

<section>
  <!-- Content of last slide... -->
  <span class="fragment" id="moveToTop"></span>
</section>
/* Somewhere in your Javascript: */
Reveal.addEventListener('fragmentshown', function( event ) {
  if (event.fragment.id == "moveToTop") {
    Reveal.slide(Reveal.getIndices()["h"], 0);
  }
}

It's very messy though and I agree with your point that the slide ordering reveal.js uses normally looks confusing.

Still putting this here for people who stumble across this report trying to find a quick fix.

hacker-DOM commented 6 years ago

+1 on this!