[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#872944: #872944 www.debian.org: Remove JavaScript from Policy Manual published on web mirrors



Hello www team and debian-policy editor team,


in-line with activating the new html theme on our website I also
worked on the javascript front:

to make the html theme work on small screens (smartphones) the readthedocs.org
theme relies on javascript functionality, to display a sidebar with the table
of content only, when the device is in landscape direction resp. when the 
burger button is pressed.

The second javascript functionality is the full-text search.

I made all needed changings, to get the above functions work and they are doing 
fine now. See <https://www.debian.org/doc/debian-policy/index.html>

Please note, that I made use of javascript by intend, despite of this bug 
requesting to remove all js functionality.
This is because I wanted to find out,  what we need (aka which javascript 
packages) to make all the above mentioned functions work. 
Since I lack the skills to value this simply by studying source code and 
reading documentation, I had to test this in live to be sure.

The outcome of this is:
we need content of the javascript packages "libjs-sphinxdoc" and "libjs-jquery" 
existing in the manuals' path, to accomplish the above goals.

We need to decide now, if we want these functionality, when they require 
those javascript packages. 
Or if we skip such functionality.

Note: apparently we have no alternative beside js, if we want full-text 
search for html output (single-page html could be a possible way, but 
that output format has been disabled due to various other issues).

And being able to show/hide the sidebar on smartphones is a great benefit
when screen size is limited.


There are requests to not use js, but it has also been mentioned, that it
may be worth it enabling js, because of the relatively reduced amount of js 
use in sphinxdoc / jquery.
Note: I'm lacking skills to inspect source code, which other functions are
integrated in the doctools.js / jquery.js / searchtools.js / sphinx-highlight.js
scripts resp. what the functions I find there are doing exactly! 
Maybe someone can make a statement here?

I would like to mention another point:
it's a Browser functionality for decades to have the possibility to disable
use of JavaScript. So people who want to avoid any risk due to js, can or
will most probably have JavaScript disabled in the Browser settings anyway.


Please note, that this decision is not only for debian-policy, but for
all sphinx-based manuals on Debian website.
(I hope we don't make different decisions on this question for the 
various manuals we have. That would make the implentation once again
more difficult.)



What should be done now?


Holger


Reply to: