documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Qiskit release notes: the latest major version should be open by default

Open Eric-Arellano opened this issue 3 months ago • 0 comments

In docs/api/qiskit/release-notes, @1ucian0 requested that the newest major version is open by default:

Image

We can do that by simply adding open to the <details>, like this:

<details open>
<summary>v2</summary>
- [v2.2](./2.2)
- [v2.1](./2.1)
- [v2.0](./2.0)
</details>

You'll need to modify this function to take an additional argument like kwargs: {isLatestVersion: boolean}. Change how <details> is set up based on it.

https://github.com/Qiskit/documentation/blob/513f344b6dd68eeb6dc6c5f6a66d5728760d5a7d/scripts/js/lib/api/releaseNotes.ts#L289

Update the call site to set isLatestVersion if it's the first entry in the for loop. You could switch the for loop to instead be a call to .forEach((version, idx) => ...)

https://github.com/Qiskit/documentation/blob/513f344b6dd68eeb6dc6c5f6a66d5728760d5a7d/scripts/js/lib/api/releaseNotes.ts#L174

Eric-Arellano avatar Sep 26 '25 18:09 Eric-Arellano