Skip to content

rustdoc source view: hover gap in file picker #100421

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
jsha opened this issue Aug 11, 2022 · 3 comments · Fixed by #102799
Closed

rustdoc source view: hover gap in file picker #100421

jsha opened this issue Aug 11, 2022 · 3 comments · Fixed by #102799
Assignees
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jsha
Copy link
Contributor

jsha commented Aug 11, 2022

Steps to reproduce:

  1. Visit https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2453
  2. In the sidebar, hover mouse over "alloc". Note that mouse indicates a clickable item.
  3. Slowly move the mouse leftwards towards the disclosure element (▶).
  4. Note that at some point, the mouse hits a dead zone where it is no longer over a clickable item. When this happens, clicking does nothing.
  5. If you continue moving the mouse leftwards, onto the disclosure element, it will indicate a clickable item again, and clicking it will open/close the folder.

Expected results:

The whole line, including the disclosure element and the folder name, should be clickable.

@jsha jsha added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Aug 11, 2022
@GuillaumeGomez
Copy link
Member

I can't reproduce this bug. It is using <details> now, not sure if it was merged before or after you opened this issue though. Can you double-check you still have it please?

@jsha
Copy link
Contributor Author

jsha commented Aug 26, 2022

This still reproduces for me. I forgot to mention: this is in Chrome on Linux.

@rol1510
Copy link
Contributor

rol1510 commented Oct 8, 2022

@rustbot claim

@bors bors closed this as completed in fb27d01 Oct 9, 2022
Aaron1011 pushed a commit to Aaron1011/rust that referenced this issue Jan 6, 2023
rustdoc: remove hover gap in file picker

Fixes rust-lang#100421

Before:
<img width="385" alt="image" src="https://user-images.githubusercontent.com/29011024/194677087-fda2db3e-126d-47cf-8152-c554e3c25a54.png">

After:
<img width="388" alt="image" src="https://user-images.githubusercontent.com/29011024/194676774-7a50ace9-4060-492e-849a-ad85d9132630.png">

longe module names also wrap nicely:
<img width="389" alt="image" src="https://user-images.githubusercontent.com/29011024/194678516-f2497b3a-8d50-439b-9d69-3fa9fb43b84d.png">

Also if you zoom out very far, the arrows did move to the left, in relation to the text below. This is now also fixed.
<img width="818" alt="image" src="https://user-images.githubusercontent.com/29011024/194677652-cfdf129d-f5db-4f26-ac3c-3d0853e89619.png">

CSS doesn't have a lot of controll over the `::marker` element, so now the `::after` element is used to draw the arrows.

Now the whole line is clickable wihtout gaps.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants