Skip to content

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

Open
@cbum-dev

Description

@cbum-dev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: In ProgressThis issue is being worked on, and has someone assigned.🐛 BugIndicates that the issue is a bug or defect.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions