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

doc: active module page not highlighted in sidebar nav #34975

Closed
1 task
DerekNonGeneric opened this issue Aug 29, 2020 · 1 comment
Closed
1 task

doc: active module page not highlighted in sidebar nav #34975

DerekNonGeneric opened this issue Aug 29, 2020 · 1 comment
Labels
doc Issues and PRs related to the documentations.

Comments

@DerekNonGeneric
Copy link
Contributor

📗 API Reference Docs Problem

  • Version: n/a (current master branch)
  • Platform: n/a
  • Subsystem: docs

Location

Section of the site where the content exists

Affected URL(s):

Description

Concise explanation of the problem

See the title of the issue as is self-explanatory.

Working

image

Non-working

image

This was introduced relatively recently and probably has to do w/ the fact that there are <code> tags in there.

/cc @aduh95 as is most likely the most familiar w/ this problem


  • I would like to work on this issue and
    submit a pull request.
@DerekNonGeneric DerekNonGeneric added the doc Issues and PRs related to the documentations. label Aug 29, 2020
@aduh95
Copy link
Contributor

aduh95 commented Aug 29, 2020

Good catch! So I dig a bit into it, the issue comes from the fact that modules.html link comes before module.html in the list, and it transform the class attribute of the wrong element.

Expected

<li><a href="modules.html" class="nav-modules">Modules: CommonJS modules</a></li>
<li><a href="esm.html" class="nav-esm">Modules: ECMAScript modules</a></li>
<li><a href="module.html" class="nav-module active">Modules: <code>module</code> API</a></li>

Actual

<li><a href="modules.html" class="nav-module actives">Modules: CommonJS modules</a></li>
<li><a href="esm.html" class="nav-esm">Modules: ECMAScript modules</a></li>
<li><a href="module.html" class="nav-module">Modules: <code>module</code> API</a></li>

Patch incoming!

richardlau pushed a commit that referenced this issue Sep 3, 2020
Assign active class to the correct HTML element when one nav-id is a
subset of another one (E.G.: `nav-module` and `nav-modules`).

Fixes: #34975

PR-URL: #34976
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
addaleax pushed a commit that referenced this issue Sep 22, 2020
Assign active class to the correct HTML element when one nav-id is a
subset of another one (E.G.: `nav-module` and `nav-modules`).

Fixes: #34975

PR-URL: #34976
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
addaleax pushed a commit that referenced this issue Sep 22, 2020
Assign active class to the correct HTML element when one nav-id is a
subset of another one (E.G.: `nav-module` and `nav-modules`).

Fixes: #34975

PR-URL: #34976
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
joesepi pushed a commit to joesepi/node that referenced this issue Jan 8, 2021
Assign active class to the correct HTML element when one nav-id is a
subset of another one (E.G.: `nav-module` and `nav-modules`).

Fixes: nodejs#34975

PR-URL: nodejs#34976
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants