unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
344 stars 145 forks source link

Hide primary sidebar from certain pages of the documentation #2424

Open purva-thakre opened 4 days ago

purva-thakre commented 4 days ago

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 https://github.com/unitaryfund/mitiq/issues/2405#issuecomment-2183583772 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

https://github.com/unitaryfund/mitiq/assets/66048318/7cef51f8-f2c7-4276-80fd-a12c23700685


License

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

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

purva-thakre commented 4 days ago

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 commented 8 hours ago

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 commented 3 hours ago

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