fix : version picker to the API docs and highlight the overview as active#160
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const versionItems = versions.map(version => ({ | ||
| value: `/docs/api/v${major(version)}.x`, | ||
| label: `v${major(version)}.x`, | ||
| })); |
There was a problem hiding this comment.
this can go outside the function, right?
There was a problem hiding this comment.
it's already sits at the top of the component , so it is only build once when the file loads.
…and-version-picker
|
@avivkeller @bjohansebas Do we need version dropdown in this one also ? or the current implementation for the API ones are good ? |
|
No, I don't think so |
There was a problem hiding this comment.
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.
| const versionItems = versions.map(version => ({ | ||
| value: `/docs/api/v${major(version)}.x`, | ||
| label: `v${major(version)}.x`, | ||
| })); |
|
the sidebar is now highlighting |


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