Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve page table of contents settings for Qiskit release notes #941

Closed
Tracked by #479
Eric-Arellano opened this issue Feb 29, 2024 · 0 comments · Fixed by #965
Closed
Tracked by #479

Improve page table of contents settings for Qiskit release notes #941

Eric-Arellano opened this issue Feb 29, 2024 · 0 comments · Fixed by #965

Comments

@Eric-Arellano
Copy link
Collaborator

We set that release notes should only show h2 headers:

} else if (result.isReleaseNotes) {
const versionStr = pkg.hasSeparateReleaseNotes
? ` ${pkg.versionWithoutPatch}`
: "";
const descriptionSuffix = pkg.hasSeparateReleaseNotes
? `in ${pkg.title}${versionStr}`
: `to ${pkg.title}`;
result.markdown = `---
title: ${pkg.title}${versionStr} release notes
description: Changes made ${descriptionSuffix}
in_page_toc_max_heading_level: 2
---

(Note that in_page_toc_min_heading_level is set to 2 by default)

That setting to only show h2 works great for Runtime and Provider. Their release notes are very small in each release, and they have a lot of releases all on the same page.

But this is a bad setting for Qiskit, which has a dedicated release note per version:

  • For Qiskit <=0.44 with its metapackage, we should be setting in_page_toc_max_heading_level to 4
  • For Qiskit 0.45+, we should be using the default of in_page_toc_max_heading_level being 3, rather than setting it to 2.
    • Why is the setting only being applied for 0.45.md and not 0.46 and 1.0?
@Eric-Arellano Eric-Arellano changed the title Improve page table of contents settings for release notes Improve page table of contents settings for Qiskit release notes Feb 29, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 5, 2024
Closes #941

This PR sets the `in_page_toc_max_heading_level` to 4 for legacy
versions of qiskit (< 0.45) and to 3 for 0.45+ versions. It also changes
the description of all the release notes to match the one we are using
in the API generation script: `Changes made in Qiskit {version}`

Given that we don't regenerate legacy release notes using the script, we
can set the `in_page_toc_max_heading_level` to 3 for all qiskit versions
and 2 for the rest of the APIs.

The changes to the latest release note were done by removing the file
and regenerating the 1.0.1 version. The rest of the files we manually
updated.
frankharkins pushed a commit to frankharkins/documentation that referenced this issue Jul 22, 2024
Closes Qiskit#941

This PR sets the `in_page_toc_max_heading_level` to 4 for legacy
versions of qiskit (< 0.45) and to 3 for 0.45+ versions. It also changes
the description of all the release notes to match the one we are using
in the API generation script: `Changes made in Qiskit {version}`

Given that we don't regenerate legacy release notes using the script, we
can set the `in_page_toc_max_heading_level` to 3 for all qiskit versions
and 2 for the rest of the APIs.

The changes to the latest release note were done by removing the file
and regenerating the 1.0.1 version. The rest of the files we manually
updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants