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

🐛 Bug: Navbar Active State Not Highlighting "Docs" and "Specification" on Related Pages #1535

Open
cbum-dev opened this issue Mar 16, 2025 · 3 comments
Labels
🐛 Bug Indicates that the issue is a bug or defect. Status: In Progress This issue is being worked on, and has someone assigned.

Comments

@cbum-dev
Copy link
Contributor

Describe the bug

Currently, the navbar does not highlight "Docs" or "Specification" as active when visiting pages related to specifications or documentation. This happens because the URL structure does not always contain /docs or /specification, making the active state logic ineffective.

This is little bit related to issue #1375 where previously the navbar was not active on tooling page. After fixing its working on both blogs and tooling page.

Steps To Reproduce

  1. Go to https://json-schema.org/draft/2019-09 (or any specification page).
  2. Notice that the "Specification" tab in the navbar is not highlighted as active.
  3. Similarly, visit any documentation-related page that does not contain /docs directly in the URL.
  4. The "Docs" tab does not show as active.

Expected Behavior

The "Specification" tab should be active when viewing any specification-related page (e.g., /draft/*).
The "Docs" tab should be active when viewing any documentation-related page.

Screenshots

Image

Device Information [optional]

- OS:Linux
- Browser: Firefox
- version:

Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

Yes

@cbum-dev cbum-dev added Status: Triage This is the initial status for an issue that requires triage. 🐛 Bug Indicates that the issue is a bug or defect. labels Mar 16, 2025
@cbum-dev
Copy link
Contributor Author

Navbar before.
Image
Navbar After.
Image

@benjagm whats your thougts about this?

@benjagm
Copy link
Collaborator

benjagm commented Mar 16, 2025

Go ahead. Thanks.

@benjagm benjagm added Status: In Progress This issue is being worked on, and has someone assigned. and removed Status: Triage This is the initial status for an issue that requires triage. labels Mar 16, 2025
@benjagm
Copy link
Collaborator

benjagm commented Mar 16, 2025

This is supposed to work as there is already an implementation for it, so please check this more in terms of bug than missing feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Indicates that the issue is a bug or defect. Status: In Progress This issue is being worked on, and has someone assigned.
Projects
None yet
Development

No branches or pull requests

2 participants