docs: Version switcher is broken / misleadingΒ #23979
Copy link
Copy link
Closed
Labels
docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.
Description
Currently if you try to switch to other semver major versions of the same docs on the docs site, you get extremely inconsistent results. Questions I had as I was going throught
As an example, here are the HTTP/2 docs:
v10.x (where is v8.x, and why wasn't this doc listed on the v8.x or v9.x docs pages?)

v11.x (why wasn't this listed on any of the other pages?)

I experienced this in a few other docs pages as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to Node.js documentation.Issues and PRs related to Node.js documentation.


Activity
addaleax commentedon Oct 30, 2018
Iβm not sure who to ping for this, but Iβm sure @rubys or @vsemozhetbyt would know?
richardlau commentedon Oct 30, 2018
Not sure of the answer to all of the questions, but at least for:
I think we need to add to:
node/tools/doc/html.js
Lines 403 to 416 in 2cab511
and get it backported to all non-EOL release lines. I'll raise a PR (edit: #23980).
refack commentedon Oct 30, 2018
So AFAICT it depends on what was backported when...
I think since v8.0.0 did not have HTTP/2 our inference logic fails.
Also we have the limitation that once a doc version was built it is static. ATM we don't have a way to update it of newer versions.
vsemozhetbyt commentedon Oct 30, 2018
If we want this to work for backported docs, maybe we need to move this from doctools to some webpage dynamic script.
sagitsofan commentedon Oct 31, 2018
It is possible, but i am not sure it is worth all the hard work for that small feature.
Maybe just fix it manually in the backported docs?
Trott commentedon Nov 25, 2018
The cause here is a bug in
tools/doc/html.js. PR coming shortly.tools,doc: fix version picker bug in html.js
Trott commentedon Nov 25, 2018
Proposed fix in #24638
tools,doc: fix version picker bug in html.js
Trott commentedon Nov 28, 2018
Fix landed in 6f64cda. Not sure why this didn't auto-close....
tools,doc: fix version picker bug in html.js
tools,doc: fix version picker bug in html.js
tools,doc: fix version picker bug in html.js
tools,doc: fix version picker bug in html.js