Uh oh!
There was an error while loading. Please reload this page.
Conversation
Uh oh!
There was an error while loading. Please reload this page.
aduh95
commented
Jan 12, 2021
Also, we need to adjust the stylesheet to the new DOM structure. You should replace Lines 475 to 477 in 1a0c5d5 with #toc>ul {
margin-top:1.5rem;
} |
This PR breaks the script that generates the Lines 34 to 37 in 1a0c5d5 to constmatch=/(<\/ul>\s*)?<\/\w+>\s*<\w+id="apicontent">/.exec(data);contents+=data.slice(0,match.index).replace(/[\s\S]*?id="toc"[^>]*>\s*<\w+>.*?<\/\w+>\s*(<ul>\s*)?/,'')and Line 62 in 1a0c5d5 to consttocStart=/<\w+id="toc"[^>]*>\s*<\w+>.*?<\/\w+>\s*/.exec(all); |
aduh95
commented
Jan 12, 2021
I'm confused, why do you want to revert? |
aduh95
commented
Jan 12, 2021
Would it help if I push myself the changes I'm suggesting to your branch to make the CI content? |
aduh95
commented
Jan 12, 2021
@mattiapontonio you actually can add several files in one PR; if you want to do so from GitHub web UI, you need to visit the file on your branch (https://github.com/mattiapontonio/node/blob/patch-1/tools/doc/allhtml.js), click edit, and commit on the same |
aduh95
left a comment
There was a problem hiding this comment.
I stand by my original comment – repeating "Table of content" is not great, and we should have the open attribute so the TOC is not hidden by default.
You are going to need to update the allhtml.js file as described in my above comment, and also update the style.css before this can land.
aduh95
commented
Jan 13, 2021
@mattiapontonio are you closing this because you don't want to work on it anymore or did you get block in the process? I hope my comments didn't discourage you, I'm convinced this PR could greatly improve our docs, especially for people browsing them on mobile, and I'm eager to help you land it – if you need or want any help. |
@aduh95 |
aduh95
commented
Jan 13, 2021
No, you need to change at least three files. But why is that stopping you? You can modify as many files as you want in one PR by adding more commits to the branch. |
I'm from a smartphone... |
aduh95
commented
Jan 13, 2021
You can do that from the GitHub web CI. I just added a commit to your branch using my smartphone. Try to follow this link and click the edit button: https://github.com/mattiapontonio/node/blob/patch-1/tools/doc/allhtml.js |
Yes but i don't want to do that, i want to wrap the TOC in a Lets wait CI for this commit. |
aduh95
commented
Jan 13, 2021
What's the reason you don't want that? Do you think it would look worse or you just don't want to touch the other files because it's not easy to do from a smartphone? |
The second one. Side issue |
aduh95
commented
Jan 13, 2021
OK, so are you OK if I push those changes to your branch myself? I'm afraid that's the only way to get a green CI if you change this part of the HTML. |
Yes but please let me see the change (for learning). |
aduh95
commented
Jan 13, 2021
You mean you'd prefer without the /cc @nodejs/documentation what are your thoughts on this? |
See MDN for a preview (Jump to section). |
ghost
commented
Jan 13, 2021
Yes |
ghost
commented
Jan 14, 2021
It's ok for me to leave this |
I'd be fine with that too. I was thinking maybe we could add a tiny JS script that automatically removes the |
aduh95
commented
Jan 14, 2021
aduh95
commented
Jan 14, 2021
Landed in 2ba8728 |
ghost
commented
Jan 14, 2021
What landed means? |
ghost
commented
Jan 14, 2021
I think is better to be consistent between HTMLs |
RaisinTen
commented
Jan 14, 2021
@mattiapontonio your patch has been applied on the HEAD of the master branch instead of performing a merge commit because merges break our tooling. |
Weird. So it's not deployed. And It Will not be? I'm from a smartphone, i can only screeshot what I see here. I'm expecting something like this |
aduh95
commented
Jan 14, 2021
It will be part of the next release (well not the next one, because v15.6.0 cut off date has already passed, so the one after that), and then the docs on nodejs.org will be updated with your change. You may use the build artefact from GitHub CI to see the result already: https://github.com/nodejs/node/suites/1829898807/artifacts/35314688 |
ghost
commented
Jan 14, 2021
Ok 👍 |
One small issue this creates is that the triangle symbol now means different things (or at least behaves differently) in nearby places in the page. It's different in the version picker drop-down than it is for the table of contents. We might want to think about modifying the version picker slightly. |
ghost
commented
Jan 14, 2021
Should be intresting to see this deployed not in nodejs.org |
Where is the HTML of that? |
Trott
commented
Feb 23, 2021
No, it's not a details tag. <ahref="#">View another version <span>▼</span></a> |
ghost
commented
Feb 23, 2021
Apparently not even ToC. |




Fixes: #36885
Note: small change made via GitHub UI without ant locale testing.