asciidoc-py2 icon indicating copy to clipboard operation
asciidoc-py2 copied to clipboard

Fix navigation issue (slidy) when using a fragment identifier other than "(xx)"

Open arnauldvm opened this issue 10 years ago • 5 comments

Hi!

With slidy, I noticed an issue in the javascript in the find_slide_number function. Only fragments like #(3) would work (jumping to page 3), but not #_my_heading (should jump to slide "My Heading"). As far as I understood it's a scope issue with the object slides. Referencing this.slides instead seems to solve the issue.

(Tested with asciidoc 8.6.9 (brew install on OSX) and Chrome 46.)

Kr.

arnauldvm avatar Oct 24 '15 13:10 arnauldvm

IIUC slidy.js is a direct copy of the W3C provided script so Asciidoc can provide for offline operation. I would be hesitant to diverge from their version, though I don't know if that has changed recently meaning this should be updated.

elextr avatar Oct 24 '15 13:10 elextr

I did some digging. Here is the outcome:

  • slidy.js was imported on 29-Sep-2010 from https://phillordbio-asciidoc-fixes.googlecode.com/hg/
  • there, the file was imported on 16-Sep-2010, and never changed since then. The whole project is stalled since Oct-2010 (and it does not seem the author (Phillip Lord) migrated the repository to GitHub, though he is active on GitHub (https://github.com/phillord?tab=repositories)
  • Slidy itself originates from W3C. This seems to be the current version of the script : http://www.w3.org/Talks/Tools/Slidy2/scripts/slidy.js . That file is different from the one in asciidoc, but still seem to contain the same issue I found. (I also tried to drop the version of W3C in place of the asciidoc one, but to no avail.) (On another hand, it is not clear whether Slidy has been superseded by Slidy2, or if it is the same thing)
  • On W3C, there is no official repository for this. And it does not seem to be actively maintained.

Maybe I should take contact with Dave Raggett [email protected]?

arnauldvm avatar Oct 24 '15 14:10 arnauldvm

I guess once the slidy backend was added to Asciidoc Philip didn't need to maintain his version, and googlecode is dead anyway.

There is also this from the plugin list which notes a more recent date, but again its googlecode. And it notes that the slidy.js is modified (though it looks like only a minor thing for footnotes). Does the version that was initially imported match the w3c version? If this is a better version, maybe it should be moved from googlecode into the asciidoc github for safekeeping.

I don't use slidy so I don't know which is used most, which (if either) is "better" the standard backend or the plugin. So input from slidy users is needed what is best to do (and someone to propose a PR to do it).

elextr avatar Oct 25 '15 00:10 elextr

PS It won't hurt to ask Dave Ragget if he accepts updates.

elextr avatar Oct 25 '15 00:10 elextr

I had a look at slidy2.js (from JM Inglebert on GoogleCode). The initial version (r2) is an already modified one. And it's difficult to say where it originates from. It's likely a version intermediate between the one initially imported by Phillip, and the one currently made available by Dave at W3C. But it's difficult to say, without access to the source repository of Dave (if there is one ?).

(It's even worse than that: I noticed many other forks of slidy across various projects.)

I'll send an email to Dave.

arnauldvm avatar Oct 25 '15 04:10 arnauldvm