Skip to content

Highlight only the closest matching menu page - #87

Merged
koo-ec merged 1 commit into
mainfrom
fix/research-dropdown-active-item
Sep 24, 2026
Merged

koo-ec merged 1 commit into
mainfrom
fix/research-dropdown-active-item

Conversation

@koo-ec

@koo-ec koo-ec commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

When viewing a nested Research page, the dropdown currently highlights both Research overview and Blogs because both paths are prefixes of the URL. Pick the longest matching dropdown link within each menu, so the blog listing and its articles highlight Blogs alone. Preserve active styling for the parent Research tab and aria-current for exact pages.

Validation: node --check docs/assets/javascripts/xwhy-nav.js; verify the live Research dropdown after deployment.

@koo-ec
koo-ec merged commit bf9c3fe into main Sep 24, 2026
3 checks passed
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant