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

Nav: current location shown is incorrect when on ./index #2805

Closed
bhj opened this issue Dec 8, 2024 · 1 comment
Closed

Nav: current location shown is incorrect when on ./index #2805

bhj opened this issue Dec 8, 2024 · 1 comment
Labels
bug Functionality does not match expectation

Comments

@bhj
Copy link

bhj commented Dec 8, 2024

Search terms

Navigation, index, module, current class

Expected Behavior

current class either matches current location's nav item, or is not present

Actual Behavior

When viewing ./index.html, the current class is instead present on the entry for ./modules.html

Steps to reproduce the bug

Hey, thanks for all your work - I'm new to typedoc but it's immensely helpful. I have a pretty simple repo with a README and a single module. Essentially, in the screenshot below I am viewing the README (index) page, but the nav has the current class on the modules page instead.

Screenshot 2024-12-08 at 11 59 28 AM

I think it would be better if the current class were not present in the nav in this case. Navigating to the modules page now shows different content, but the nav's current page indicator has not changed, which is confusing.

{
  "$schema": "https://typedoc.org/schema.json",
  "entryPoints": ["./src/index.ts"],
  "plugin": ["typedoc-plugin-merge-modules"],
  "defaultCategory": "General",
  "categoryOrder": ["General", "*"],
  "disableSources": true,
  "sort": ["kind", "source-order"],
  "visibilityFilters": {},
  "headings": {
      "readme": false,
      "document": true,
  },
}

I did try disabling typedoc-plugin-merge-modules (using 6.1.0) without change.

Environment

  • Typedoc version: 0.27.3
  • TypeScript version: 5.7.2
@bhj bhj added the bug Functionality does not match expectation label Dec 8, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 9, 2024

I agree, easy fix!

@Gerrit0 Gerrit0 closed this as completed in cf901f4 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants