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

Deactivate sidebar for release notes #27800

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Feb 16, 2024

The release note page is only a structured collection of links to sub-pages. The sidebar would repeat all the titles of the sub-pages and thus basically repeat all the content of the page. Even worse, it does not contain the version sectioning structure of the release notes page itself.

image

It's thus best to deactivate the sidebar here.

Related to #27690 (comment)

@github-actions github-actions bot added the Documentation: build building the docs label Feb 16, 2024
@dstansby
Copy link
Member

I'm not a huge fan of this because the position of the main content of the page shifts to the left (where the sidebar was) relative to other pages.

I think this issue is symptomatic of the page tree needing change instead of removing the sidebar altogether. How about adding another layer of pages above the release notes page, each page being a different version number. Here's a quick go, with just 3.8 and 3.7 changed. Would be happy to do the rest of the versions and PR it if someone else likes this.

Screenshot 2024-02-17 at 09 25 31 Screenshot 2024-02-17 at 09 25 35
diff --git a/doc/users/release_notes.rst b/doc/users/release_notes.rst
index 32bd024320..d3aad9c888 100644
--- a/doc/users/release_notes.rst
+++ b/doc/users/release_notes.rst
@@ -10,31 +10,18 @@ Release notes
 .. include from another document so that it's easy to exclude this for releases
 .. ifconfig:: releaselevel == 'dev'
 
-   .. include:: release_notes_next.rst
+    .. toctree::
+        :glob:
+        :maxdepth: 2
 
+        release_notes_next.rst
 
-Version 3.8
-^^^^^^^^^^^
 .. toctree::
-    :maxdepth: 1
-
-    prev_whats_new/whats_new_3.8.0.rst
-    ../api/prev_api_changes/api_changes_3.8.1.rst
-    ../api/prev_api_changes/api_changes_3.8.0.rst
-    github_stats.rst
-    prev_whats_new/github_stats_3.8.0.rst
-
-Version 3.7
-^^^^^^^^^^^
-.. toctree::
-    :maxdepth: 1
+    :glob:
+    :maxdepth: 2
 
-    prev_whats_new/whats_new_3.7.0.rst
-    ../api/prev_api_changes/api_changes_3.7.0.rst
-    prev_whats_new/github_stats_3.7.3.rst
-    prev_whats_new/github_stats_3.7.2.rst
-    prev_whats_new/github_stats_3.7.1.rst
-    prev_whats_new/github_stats_3.7.0.rst
+    release_notes/3.8.rst
+    release_notes/3.7.rst
 
 Version 3.6
 ^^^^^^^^^^^
diff --git a/doc/users/release_notes/3.7.rst b/doc/users/release_notes/3.7.rst
new file mode 100644
index 0000000000..b70a87d0f1
--- /dev/null
+++ b/doc/users/release_notes/3.7.rst
@@ -0,0 +1,13 @@
+===========
+Version 3.7
+===========
+
+.. toctree::
+    :maxdepth: 1
+
+    ../prev_whats_new/whats_new_3.7.0.rst
+    ../../api/prev_api_changes/api_changes_3.7.0.rst
+    ../prev_whats_new/github_stats_3.7.3.rst
+    ../prev_whats_new/github_stats_3.7.2.rst
+    ../prev_whats_new/github_stats_3.7.1.rst
+    ../prev_whats_new/github_stats_3.7.0.rst
diff --git a/doc/users/release_notes/3.8.rst b/doc/users/release_notes/3.8.rst
new file mode 100644
index 0000000000..8e082fff84
--- /dev/null
+++ b/doc/users/release_notes/3.8.rst
@@ -0,0 +1,12 @@
+===========
+Version 3.8
+===========
+
+.. toctree::
+    :maxdepth: 1
+
+    ../prev_whats_new/whats_new_3.8.0.rst
+    ../../api/prev_api_changes/api_changes_3.8.1.rst
+    ../../api/prev_api_changes/api_changes_3.8.0.rst
+    ../github_stats.rst
+    ../prev_whats_new/github_stats_3.8.0.rst

The release note page is only a structured collection of links to
sub-pages. The sidebar would repeat all the titles of the sub-pages and
thus basically repeat all the content of the page. Even worse, it does
not contain the version sectioning structure of the release notes page
itself. To keep the layout the sidebar gets one empty dummy section.
If we leave the sidebar completely empty, it will be deactivated and
change the layout of the page.

Related to matplotlib#27690 (comment)
@timhoffm
Copy link
Member Author

Agreed, the layout change is undesireable. We can work around that by an empty sidebar -> updated this PR.

I would alternatively fine with the restructuring. Note however, that the links on the sidebar (e.g. "Version 3.8.0") would then only go to the index page of that version and you need to click a second link to get to some content. So the sidebar links for the restructured content are not too practical.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

This seems good. Could put the front page sidebar in there, but this is fine.

@timhoffm
Copy link
Member Author

I rather leave an empty sidebar. The front page sidebar has cheatsheets and the donate button, which are out of scope in the changelog context.

@timhoffm timhoffm added this to the v3.9.0 milestone Feb 19, 2024
@timhoffm timhoffm merged commit 2a2ab56 into matplotlib:main Feb 19, 2024
33 of 34 checks passed
@timhoffm timhoffm deleted the doc-release-notes branch February 19, 2024 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: build building the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants