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

Fix Furo styling for API pages with methods on class page (Cherry-pick of #458) #478

Merged
merged 2 commits into from
Jul 11, 2023

Conversation

Eric-Arellano
Copy link
Collaborator

We're planning to switch some Qiskit projects to stop having dedicated HTML pages per method, mostly due to performance concerns.

Closes #466. Methods were using inline-block rather than block when on the classes page, which resulted in a bug when highlighting over the method to show the # anchor tag:

Screenshot 2023-07-07 at 11 25 45 AM

Instead, we now turn off floating of the [source] label because it causes issues on long code signatures:

Screenshot 2023-07-07 at 3 02 44 PM

After:

Screenshot 2023-07-07 at 3 03 08 PM

Even though the [source] floating to the right is more "elegant", we have too many long signatures in Qiskit to be worth it. It's safer to turn off the float.

This also improves the information hierarchy so that page feels less crowded. Relates to
#459:

  • Use a border-width of 2px for top-level code objects, but otherwise 1
  • Increases the font sizes so headings look bigger.

Eric-Arellano and others added 2 commits July 11, 2023 12:37
We're planning to switch some Qiskit projects to stop having dedicated
HTML pages per method, mostly due to performance concerns.

Closes Qiskit#466. Methods
were using `inline-block` rather than `block` when on the classes page,
which resulted in a bug when highlighting over the method to show the
`#` anchor tag:

![Screenshot 2023-07-07 at 11 25 45
AM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/004da4c0-3702-4cd7-9601-5baa46a992a7)

Instead, we now turn off floating of the `[source]` label because it
causes issues on long code signatures:

![Screenshot 2023-07-07 at 3 02 44
PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/19c45f5a-8fc7-44f5-a9d8-997b9a0bfa6e)

After:

![Screenshot 2023-07-07 at 3 03 08
PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/55e865c9-b376-40e0-846d-cfdd4b1efd1a)

Even though the `[source]` floating to the right is more "elegant", we
have too many long signatures in Qiskit to be worth it. It's safer to
turn off the float.

This also improves the information hierarchy so that page feels less
crowded. Relates to
Qiskit#459:

* Use a border-width of 2px for top-level code objects, but otherwise 1
* Increases the font sizes so headings look bigger.
@Eric-Arellano Eric-Arellano merged commit 99e0342 into Qiskit:1.13 Jul 11, 2023
@Eric-Arellano Eric-Arellano deleted the cp-api-docs branch July 11, 2023 18:50
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.

1 participant