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

Truncate left ToC entries for Runtime and Provider #1250

Merged
merged 18 commits into from
Apr 30, 2024
Merged

Conversation

Eric-Arellano
Copy link
Collaborator

Closes #1242. We decided with design that the simplest solution to the visual clutter is to truncate.

Before:

Screenshot 2024-04-26 at 5 04 55 PM

After:

Screenshot 2024-04-26 at 5 05 51 PM

Does not add a hover

We were hoping to allow you to hover to see the full text, like you do with links via title, where we show you the full module path.

But I could not see an easy way to do this because this is plain text rather than a hover. We'd need to add a new mechanism to _toc.json where you can set something like hoverTitle for each entry, and then we'd need to add a new mechanism to the docs app. So, I didn't add this for now.

I think it's obvious enough, especially because we show you the full import path at the top of the module overview page:
Screenshot 2024-04-26 at 5 06 14 PM

Copy link
Member

@frankharkins frankharkins left a comment

Choose a reason for hiding this comment

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

Thanks! Diff is very neat

@Eric-Arellano Eric-Arellano added this pull request to the merge queue Apr 30, 2024
Merged via the queue into main with commit 1d26b08 Apr 30, 2024
5 checks passed
@Eric-Arellano Eric-Arellano deleted the EA/truncate branch April 30, 2024 13:31
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
Closes Qiskit#1242. We decided
with design that the simplest solution to the visual clutter is to
truncate.

Before:

<img width="264" alt="Screenshot 2024-04-26 at 5 04 55 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/df90b11d-d779-4832-9541-92220e39d0c7">

After:

<img width="269" alt="Screenshot 2024-04-26 at 5 05 51 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/d4643c74-c711-4219-a297-845864f09ca2">

## Does not add a hover

We were hoping to allow you to hover to see the full text, like you do
with links via `title`, where we show you the full module path.

But I could not see an easy way to do this because this is plain text
rather than a hover. We'd need to add a new mechanism to `_toc.json`
where you can set something like `hoverTitle` for each entry, and then
we'd need to add a new mechanism to the docs app. So, I didn't add this
for now.

I think it's obvious enough, especially because we show you the full
import path at the top of the module overview page:
<img width="654" alt="Screenshot 2024-04-26 at 5 06 14 PM"
src="https://github.com/Qiskit/documentation/assets/14852634/dd3c9c6b-9274-4317-b090-8804c1725a23">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Truncate long module names in left ToC of API docs
2 participants