Skip to content

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Jan 25, 2022

We already have overflow: hidden on these links, but if there is a possibility to wrap, they will wrap. This happens in particular for trait implementations because the punctuation (<>, ) introduces opportunities for breaks. That produces inconsistent UI. Fix it by forcing them not to wrap.

Demo: https://rustdoc.crud.net/jsha/sidebar-nowrap/std/string/struct.String.html

To see the effect, scroll down to the "Trait Implementations" portion of the sidebar and look at IndexMut. Compare vs:

https://doc.rust-lang.org/std/string/struct.String.html
https://doc.rust-lang.org/nightly/std/string/struct.String.html

r? @camelid

We already have overflow: hidden on these links, but if there is a
possibility to wrap, they will wrap. This happens in particular for trait
implementations because the punctuation (`<>, `) introduces opportunities
for breaks. That produces inconsistent UI. Fix it by forcing them not to
wrap.
@rust-highfive
Copy link
Contributor

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 25, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 25, 2022
@GuillaumeGomez
Copy link
Member

So just to make it more obvious. Before this PR:

Screenshot from 2022-01-25 16-48-33

After this PR:

Screenshot from 2022-01-25 16-48-35

I have to admit that I'm not a big fan of this change...

@camelid
Copy link
Member

camelid commented Jan 25, 2022

Sorry, I don't have time to take on more PRs right now. r? @notriddle

@rust-highfive rust-highfive assigned notriddle and unassigned camelid Jan 25, 2022
@jsha
Copy link
Contributor Author

jsha commented Jan 25, 2022

@GuillaumeGomez I think you have before and after reversed.

Before:
image

After:

image

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jan 25, 2022

Oh indeed, you're absolutely right! My bad. Then I'm 100% for this change! :)

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 25, 2022

📌 Commit abffd4a has been approved by GuillaumeGomez

@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 Jan 25, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 25, 2022
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#93250 (Remove deduplication of early lints)
 - rust-lang#93286 (Add white-space: nowrap to links in the sidebar)
 - rust-lang#93291 (minor fix for rust-lang#93231)
 - rust-lang#93300 (make Windows abort_internal Miri-compatible)
 - rust-lang#93303 (Fix ICE when parsing bad turbofish with lifetime argument)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c8999d9 into rust-lang:master Jan 26, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 26, 2022
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.

7 participants