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

rustdoc: remove hover gap in file picker #102799

Merged
merged 2 commits into from
Oct 9, 2022

Conversation

rol1510
Copy link
Contributor

@rol1510 rol1510 commented Oct 8, 2022

Fixes #100421

Before:
image

After:
image

longe module names also wrap nicely:
image

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.
image

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.

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 8, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 8, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @notriddle (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2022
@notriddle
Copy link
Contributor

notriddle commented Oct 8, 2022

This produces a bad result on iOS:

Screenshot 2022-10-07 at 5 46 07 PM

You’ll probably want to copy what rustdoc.css does for its regular disclosure widgets.

details.rustdoc-toggle > summary::-webkit-details-marker,

@rol1510
Copy link
Contributor Author

rol1510 commented Oct 9, 2022

I fixed the issue where the arrow icon would render twice on ios

@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 9, 2022

📌 Commit 7fdce64 has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 9, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 9, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#101118 (fs::get_mode enable getting the data via fcntl/F_GETFL on major BSD)
 - rust-lang#102072 (Add `ptr::Alignment` type)
 - rust-lang#102799 (rustdoc: remove hover gap in file picker)
 - rust-lang#102820 (Show let-else suggestion on stable.)
 - rust-lang#102829 (rename `ImplItemKind::TyAlias` to `ImplItemKind::Type`)
 - rust-lang#102831 (Don't use unnormalized type in `Ty::fn_sig` call in rustdoc `clean_middle_ty`)
 - rust-lang#102834 (Remove unnecessary `lift`/`lift_to_tcx` calls from rustdoc)
 - rust-lang#102838 (remove cfg(bootstrap) from Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fb27d01 into rust-lang:master Oct 9, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 9, 2022
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request 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.
Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
Rollup of 8 pull requests

Successful merges:

 - rust-lang#101118 (fs::get_mode enable getting the data via fcntl/F_GETFL on major BSD)
 - rust-lang#102072 (Add `ptr::Alignment` type)
 - rust-lang#102799 (rustdoc: remove hover gap in file picker)
 - rust-lang#102820 (Show let-else suggestion on stable.)
 - rust-lang#102829 (rename `ImplItemKind::TyAlias` to `ImplItemKind::Type`)
 - rust-lang#102831 (Don't use unnormalized type in `Ty::fn_sig` call in rustdoc `clean_middle_ty`)
 - rust-lang#102834 (Remove unnecessary `lift`/`lift_to_tcx` calls from rustdoc)
 - rust-lang#102838 (remove cfg(bootstrap) from Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc source view: hover gap in file picker
5 participants