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

ToC links to 'static' slides #5

Open
yanhasu opened this issue Jul 25, 2021 · 3 comments
Open

ToC links to 'static' slides #5

yanhasu opened this issue Jul 25, 2021 · 3 comments

Comments

@yanhasu
Copy link

yanhasu commented Jul 25, 2021

Hello! I just tried navigating the tutorial in https://ucsd-progsys.github.io/intro-refinement-types/120/ and the the table of contents only seems to work if clicking on the links leading to section titles. For instance, when going to https://ucsd-progsys.github.io/intro-refinement-types/120/01-index.html#/whats-this, neither Chrome 19.0 nor Firefox 76.0 can move through the slides.

Originally posted by @facundominguez in ucsd-progsys/liquidhaskell#1859 (comment)

@yanhasu
Copy link
Author

yanhasu commented Jul 25, 2021

A bit of poking around finds that numeric hashes do work, i.e.
https://ucsd-progsys.github.io/intro-refinement-types/120/01-index.html#4
gives the moth page as before, but this time with the navigation working.

It appears that these links are generated by:

makeLink file ref = htmlFile file ++ "#" ++ ref

so patching that should make the issue go away.

@facundominguez
Copy link

This links works indeed https://ucsd-progsys.github.io/intro-refinement-types/120/01-index.html#4
but only the first time the page is loaded. If one refresh the page, or returns to the page with the "back" and "forward" buttons of the browser, then the slide navigation breaks again. I see this javascript error in the console.

onepagescroll.js:86 Uncaught TypeError: Cannot read property 'dataset' of null
    at init (onepagescroll.js:86)
    at onePageScroll (onepagescroll.js:489)
    at 01-index.html:608

@yanhasu
Copy link
Author

yanhasu commented Jul 26, 2021

I think the break-on-reload problem is due to the automatic redirection from https://ucsd-progsys.github.io/intro-refinement-types/120/01-index.html#4 to https://ucsd-progsys.github.io/intro-refinement-types/120/01-index.html#/4 (notice the extra slash at the end).

It also happens if you use the normal navigation buttons at the bottom right of the presentation, although the (Firefox 90.1) back/forward buttons didn't break it for me.

The error is raised in the part of the onepagescroll.js script which parses the string after the hash. The string isn't in the right format, so a null gets returned and the website bugs out.

Unless the redirection is something we explicitly added on (@ranjitjhala?), then I don't think there's much we can do about the break-on-reload problem other than update reveal.js and/or tell its developers.

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

2 participants