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

Some functions and exceptions don't show up in the right sidebar #714

Closed
Tracked by #479
Eric-Arellano opened this issue Jan 26, 2024 · 2 comments
Closed
Tracked by #479

Comments

@Eric-Arellano
Copy link
Collaborator

Eric-Arellano commented Jan 26, 2024

Thanks to #713 and #683, we now add headers at level 3, whereas before we didn't add headers. This is a big UX improvement because in most cases, the headers show up in the right side bar; it also allows users to get an anchor link to the code object.

However, h3 is not always the right choice; it depends on the heading level of the surrounding context. For example:

  • /api/qiskit/circuit#circuiterror should be h4
  • All exceptions in /api/qiskit/exceptions should be h2

Some of the functions in api/qiskit/utils should be h2, whereas some should remain h3.

This issues causes certain code objects to not show up in the right sidebar.

Example: utils module

Screenshot 2024-01-26 at 10 24 09 AM

an h2:

Screenshot 2024-01-26 at 10 24 28 AM

an h3:

Screenshot 2024-01-26 at 10 24 58 AM

Alternative: change right side bar behavior

Visual design wise, is it okay for some functions/exceptions to be h2?

The alternative would be to change the right sidebar so that h3 shows up even if there isn't a parent h2. That way we're consistent with how functions look.

Alternative: change the content itself to always have h2 headers

For example, in utils, add a section like ## General utility functions

@Eric-Arellano Eric-Arellano changed the title Function and exception header levels should be determined by context Function and exception header levels should be determined by context? Jan 26, 2024
@Eric-Arellano Eric-Arellano changed the title Function and exception header levels should be determined by context? Some functions and exceptions don't show up in the right sidebar Jan 26, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 26, 2024
Quick fix to use the same logic for functions and exceptions. Closes
#712.

A known problem with this implementation is that some headings should
not be `h3`, but it depends on the page. See
#714.
@javabster
Copy link
Collaborator

After discussion with design we think this is the best option moving forward:
Screenshot 2024-01-26 at 12 46 59

@Eric-Arellano
Copy link
Collaborator Author

Fixed by Eric Harvey in closed source. Thanks!

frankharkins added a commit to frankharkins/documentation that referenced this issue Jul 22, 2024
Quick fix to use the same logic for functions and exceptions. Closes
Qiskit#712.

A known problem with this implementation is that some headings should
not be `h3`, but it depends on the page. See
Qiskit#714.
@javabster javabster removed this from Docs Planning Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants