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

Configuration setting to "unnest" presentation for linear navigation. #1904

Closed
garretwilson opened this issue May 15, 2017 · 12 comments
Closed

Comments

@garretwilson
Copy link

The reveal.js presentation framework is really slick, and I'm constantly learning new things I can do with it. Thanks for putting it together.

I've arranged my presentation into nested <section>, which makes it convenient to navigate down certain "paths" or skip directly to the next section.

But in some circumstances I would like to force the slides to navigate in a linear fashion, as if I were pressing the spacebar, even if I press the right-arrow key. (This is most useful if I want to make a set of slides public; some users may not be aware of the two-dimensional navigation capabilities of reveal.js, and may miss some of the slides if they navigate using the right arrow button.)

Is there a configuration setting (I looked but didn't see one) that would disable the two-dimensional navigation, and only allow navigation forwards and backwards as if there were no nested segments? (In streaming terms, this would work as if all the nested slides had been flat-mapped into a single list.) I'd prefer not to modify my HTML structure; I'd like to simply enable/disable two-dimensional navigation by a single configuration flag.

If such a feature doesn't exist, please consider this a feature request. Thank you!

@garretwilson garretwilson changed the title Configuration to "unnest" presentation for linear navigation. Configuration setting to "unnest" presentation for linear navigation. May 15, 2017
@garretwilson
Copy link
Author

The only workaround I've found so far is to change the key bindings for the left and right arrows so they always go to the "previous" and "next" slides, so that none are inadvertently skipped:

Reveal.initialize({
  keyboard: {
    37: "prev",
    39: "next"
  }
});

But that's a bit of a hack, and the navigation arrows become a little confusing. It would be nice if there were a simple "unnest" toggle.

@earboxer
Copy link
Contributor

There is now navigationMode: "linear", which is still a little WIP, but I think this issue can be closed.

@garretwilson
Copy link
Author

Yes, the new linear navigation mode seems to be just what I was looking for.

I note that if I bring up the outline, I can still navigate in two dimensions, which is very useful. 👍

Thank you so much!

@garretwilson
Copy link
Author

garretwilson commented Sep 3, 2019

Uh, oh: there is a huge issue. This works on a desktop, but on a phone if you swipe left-to-right, you'll only see the first slide of each section. Plus there are no navigation arrows, so the user doesn't even know that there are more slides.

The user would have to swipe down in each section, but the user doesn't know that. So the user misses most of the presentation, doesn't realize it, and wonders why the presentation doesn't make sense at all.

This is a critical issue. Because there are no controls visible, it may affect even non-linear navigation modes. (Maybe there are no controls because of #2470.)

@garretwilson garretwilson reopened this Sep 3, 2019
@earboxer
Copy link
Contributor

earboxer commented Sep 5, 2019

@garretwilson I had a fix in #2416, but it caused a visual problem with vertical-only presentations IIRC, so @hakimel reverted part of it in bba760e

@garretwilson
Copy link
Author

What do you mean "vertical-only presentations"? Do you mean a single section nested inside a single section?

@garretwilson
Copy link
Author

Happy holidays. Can you give me a status on this ticket? Do you plan on fixing it, or is it abandoned?

And note my question above:

What do you mean "vertical-only presentations"? Do you mean a single section nested inside a single section?

@earboxer
Copy link
Contributor

earboxer commented Dec 9, 2019

Absolutely: in my original fix (https://github.com/christian-classics-ethereal-library/reveal.js/tree/1cdddf7) swiping will work correctly, but a vertical-only-presentation had multiple overlapping arrows.
Screen Shot 2019-12-09 at 11 37 43

<section>
  <section>Slide 1</section>
  <section>Slide 2</section>
</section>

My branch at github:christian-classics-ethereal-library/reveal.js#32c5049 seems to work fine (swiping and arrows appearing) for vertical only and for other ones

<section>
  <section>Slide 1</section>
  <section>Slide 2</section>
</section>
<section>
  <section>Slide 3</section>
  <section>Slide 4</section>
</section>

(Though I don't know if I could point you to the specific commit that fixed that).

@garretwilson
Copy link
Author

I'm still confused about the status of this.

@earboxer can you confirm if I'm understanding this correctly?

  • The navigationMode: "linear" feature is broken.
  • There is a branch that seems to fix things.
  • The branch that fixes navigationMode: "linear" hasn't been merged yet.
  • Therefore navigationMode: "linear" is still broken.
  • No one has any idea when this might be resolved.

Did I understand that correctly? Are we really just sitting with a half-working, half-broken feature and no one knows what will happen with it?

@earboxer
Copy link
Contributor

It appears to work in the latest dev and master, and in 4.0.2. (and it's described in the official documentation).

There's only seems to be one little issue: if the last slide has fragments, there will be no "next" arrow to indicate that there are fragments to step through.

So, I think this issue can probably be closed.

@hakimel
Copy link
Owner

hakimel commented Aug 19, 2020

Closing—this feature has been added via the navigationMode: "linear" setting.

@hakimel hakimel closed this as completed Aug 19, 2020
@garretwilson
Copy link
Author

garretwilson commented Oct 14, 2022

@earboxer I finally got a chance to test this in v4.3.1. I can confirm that navigationMode: "linear" addresses the issue, and it even works on mobile now. It works beautifully!

Thank you for your work on this.

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

No branches or pull requests

3 participants