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

Hide primary sidebar from certain pages of the documentation #2424

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

purva-thakre
Copy link
Collaborator

@purva-thakre purva-thakre commented Jun 27, 2024

Description

Remove the left sidebar from API-doc, Changelog, and References because the primary sidebar is blank.

Related to #2331 where we want to hide the blank sidebar on the left for some pages of the documentation.

Note that the behavior from #2405 (comment) is still present even if we hide the primary sidebar.

This is not fixable by navigation_with_keys=False which makes me think the behavior from the screencast is unrelated to #2405

Kazam_screencast_00003.mp4

License

  • I license this contribution under the terms of the GNU GPL, version 3 and grant Unitary Fund the right to provide additional permissions as described in section 7 of the GNU GPL, version 3.

Before opening the PR, please ensure you have completed the following where appropriate.

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.32%. Comparing base (20732a0) to head (89fe76b).
Report is 55 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2424   +/-   ##
=======================================
  Coverage   98.32%   98.32%           
=======================================
  Files          87       87           
  Lines        4048     4048           
=======================================
  Hits         3980     3980           
  Misses         68       68           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@purva-thakre purva-thakre changed the title Hide primary sidebar in API-doc Hide primary sidebar from certain pages of the documentation Jun 27, 2024
@purva-thakre
Copy link
Collaborator Author

purva-thakre commented Jun 27, 2024

There is an additional blank space on pages where one of the sidebars is disabled. I do not know what the label for this space is which makes it difficult to keyword search in the theme settings.

This blank space is also the reason for the behavior from the screencast.

image

@cosenal
Copy link
Contributor

cosenal commented Jul 1, 2024

My only concern is the one raised by @natestemen, that is, the content view moving around may be distracting for users.
Perhaps @francespoblete has an opinion on this.

Frances, the views to compare are:
(1) https://mitiq--2424.org.readthedocs.build/en/2424/
(2) https://mitiq.readthedocs.io/en/latest

Downside of (2): the API-doc page has an empty Section navigation bar on the left
Downside of (1): the content view of the API-doc page doesn't align with the content view of, say, the Examples page, or any other page that has a non-empty navigation bar on the left-hand side.

@purva-thakre
Copy link
Collaborator Author

purva-thakre commented Jul 1, 2024

the content view moving around may be distracting for users

That's understandable. The content does move around on its own with the current version of the docs and I don't really know what the fix for it would be.

If you are having issues with the screencast video in the PR description, search for represent_operation_with_global_depolarizing_noise on the API doc page. Some things move below the left sidebar on Chrome and Firefox browsers (Linux Mint OS). You have to use right or left arrows on the keyboard to see this particular section.

image

Copy link
Member

@natestemen natestemen left a comment

Choose a reason for hiding this comment

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

IMO it's not ideal how content jumps around when switching to these pages, but it's nice not to have the sidebars when there is nothing in them.

It's wild how many options there are for configuration in sphinx!

@purva-thakre
Copy link
Collaborator Author

IMO it's not ideal how content jumps around when switching to these pages

Should we create a separate issue for this?

@purva-thakre purva-thakre merged commit 231319d into main Jul 15, 2024
18 checks passed
@purva-thakre purva-thakre deleted the hide_sidebar_api branch July 15, 2024 00:42
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