Skip to content

fix(theme): pass pathname to NavBar for active link highlighting#171

Open
ryzrr wants to merge 1 commit into
mainfrom
fix/navbar-active-pathname
Open

fix(theme): pass pathname to NavBar for active link highlighting#171
ryzrr wants to merge 1 commit into
mainfrom
fix/navbar-active-pathname

Conversation

@ryzrr

@ryzrr ryzrr commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary
Passed pathname to NavBar for active link highlighting

What kind of change does this PR introduce?
fix

Did you add tests for your changes?
No

Does this PR introduce a breaking change?
No

If relevant, what needs to be documented once your changes are merged or what have you already documented?
NA

Use of AI
No

Copilot AI review requested due to automatic review settings July 5, 2026 19:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-doc-kit Ready Ready Preview, Comment Jul 5, 2026 7:09pm

Request Review

Comment thread components/NavBar.jsx
Comment on lines 16 to +22

return (
<NavBar
Logo={Logo}
sidebarItemTogglerAriaLabel="Toggle navigation menu"
navItems={navbar}
pathname={metadata.path}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pathname={metadata.path}
const currentPath = metadata.path.startsWith('/') ? metadata.path : `/${metadata.path}`;
return (
<NavBar
Logo={Logo}
sidebarItemTogglerAriaLabel="Toggle navigation menu"
navItems={navbar}
pathname={currentPath}

To handle the docs/api link, as we discussed in Discord.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't appear as I want in suggestion, but u understand me right ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes got it , it totally slipped from my mind

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.

4 participants