Skip to content

fix : version picker to the API docs and highlight the overview as active#160

Merged
avivkeller merged 4 commits into
mainfrom
fix/sidebar-overview-and-version-picker
Jul 1, 2026
Merged

fix : version picker to the API docs and highlight the overview as active#160
avivkeller merged 4 commits into
mainfrom
fix/sidebar-overview-and-version-picker

Conversation

@ryzrr

@ryzrr ryzrr commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary
Adds the version picker and the fixup to make overview in the governance section as active (highlighted)

What kind of change does this PR introduce?
Fixes some Bug and one improvement

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
for the regex and testing

@vercel

vercel Bot commented Jun 29, 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 1, 2026 5:23pm

Request Review

Comment thread components/SideBar.jsx
Comment on lines +28 to +31
const versionItems = versions.map(version => ({
value: `/docs/api/v${major(version)}.x`,
label: `v${major(version)}.x`,
}));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this can go outside the function, 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.

it's already sits at the top of the component , so it is only build once when the file loads.

Comment thread components/SideBar.jsx Outdated
@ryzrr

ryzrr commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

@avivkeller @bjohansebas Do we need version dropdown in this one also ? or the current implementation for the API ones are good ?
image
image

@avivkeller

Copy link
Copy Markdown
Member

No, I don't think so

Copilot AI review requested due to automatic review settings July 1, 2026 17:21

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.

Pull request overview

This PR updates the documentation site navigation to (1) correctly link the Governance “Overview” page so it highlights as active, and (2) add a webpack version picker for versioned API docs builds.

Changes:

  • Normalize the Governance “Overview” link to /about/governance (instead of /about/governance/index) across generated links.
  • Add a version picker to the sidebar when rendering versioned API docs, and adjust pathname normalization so active-link matching works with version-prefixed routes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/markdown/governance.mjs Adds a pageLink() helper so the generated Governance sidebar/link rewrite map uses /about/governance for the index page.
components/SideBar.jsx Adds a version picker for versioned API docs and adjusts pathname normalization to match absolute versioned sidebar links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/SideBar.jsx
Comment on lines +31 to +34
const versionItems = versions.map(version => ({
value: `/docs/api/v${major(version)}.x`,
label: `v${major(version)}.x`,
}));
@ryzrr

ryzrr commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

the sidebar is now highlighting

@avivkeller avivkeller merged commit 56a3c14 into main Jul 1, 2026
10 checks passed
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.

3 participants