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: Restore underline text decoration on hover for FQN in header #74067

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

rye
Copy link
Contributor

@rye rye commented Jul 5, 2020

This causes the components of FQN's (e.g. std, net, and Ipv4Addr of the FQN std::net::Ipv4Addr) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation.

I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to.

📸 Before, mouse hovered over "net" in the FQN A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change
📸 After, mouse hovered over "net" in the FQN A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse

This causes the components of FQN's to behave similarly to other links
in the contents of rustdoc-styled pages.

I (and I hope others at least in part) have found the prior design to be
somewhat confusing, as it is not clear (upon hovering) that the various
parts of the FQN are actually links that the user can navigate to.

In short, this patch makes links in the FQN have an underline when the
user hovers over them, more clearly indicating that they can be used for
navigation.

Signed-off-by: Kristofer Rye <kristofer.rye@gmail.com>
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 5, 2020
@GuillaumeGomez
Copy link
Member

I agree that it's a welcome improvement. So if everyone in @rust-lang/rustdoc agree, r=me.

@kinnison
Copy link
Contributor

kinnison commented Jul 6, 2020

@GuillaumeGomez Fine by me.

@GuillaumeGomez
Copy link
Member

Great, then let's go! Thanks @rye!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 6, 2020

📌 Commit 2f31426 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 Jul 6, 2020
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 6, 2020
…GuillaumeGomez

rustdoc: Restore underline text decoration on hover for FQN in header

This causes the components of FQN's (e.g. `std`, `net`, and `Ipv4Addr` of the FQN `std::net::Ipv4Addr`) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation.

I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to.

<details><summary>📸 Before, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change" src="https://user-images.githubusercontent.com/1566689/86538363-4c827000-bebb-11ea-8291-5ea6b85d7e19.png" />
</details>
<details><summary>📸 After, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse" src="https://user-images.githubusercontent.com/1566689/86538471-d3374d00-bebb-11ea-9bb3-7aa2d7a4800b.png" />
</details>
Manishearth added a commit to Manishearth/rust that referenced this pull request Jul 6, 2020
…GuillaumeGomez

rustdoc: Restore underline text decoration on hover for FQN in header

This causes the components of FQN's (e.g. `std`, `net`, and `Ipv4Addr` of the FQN `std::net::Ipv4Addr`) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation.

I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to.

<details><summary>📸 Before, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change" src="https://user-images.githubusercontent.com/1566689/86538363-4c827000-bebb-11ea-8291-5ea6b85d7e19.png" />
</details>
<details><summary>📸 After, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse" src="https://user-images.githubusercontent.com/1566689/86538471-d3374d00-bebb-11ea-9bb3-7aa2d7a4800b.png" />
</details>
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Jul 6, 2020
…GuillaumeGomez

rustdoc: Restore underline text decoration on hover for FQN in header

This causes the components of FQN's (e.g. `std`, `net`, and `Ipv4Addr` of the FQN `std::net::Ipv4Addr`) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation.

I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to.

<details><summary>📸 Before, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change" src="https://user-images.githubusercontent.com/1566689/86538363-4c827000-bebb-11ea-8291-5ea6b85d7e19.png" />
</details>
<details><summary>📸 After, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse" src="https://user-images.githubusercontent.com/1566689/86538471-d3374d00-bebb-11ea-9bb3-7aa2d7a4800b.png" />
</details>
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 7, 2020
…arth

Rollup of 14 pull requests

Successful merges:

 - rust-lang#70563 ([rustdoc] Page hash handling)
 - rust-lang#73856 (Edit librustc_lexer top-level docs)
 - rust-lang#73870 (typeck: adding type information to projection)
 - rust-lang#73953 (Audit hidden/short code suggestions)
 - rust-lang#73962 (libstd/net/tcp.rs: #![deny(unsafe_op_in_unsafe_fn)])
 - rust-lang#73969 (mir: mark mir construction temporaries as internal)
 - rust-lang#73974 (Move A|Rc::as_ptr from feature(weak_into_raw) to feature(rc_as_ptr))
 - rust-lang#74067 (rustdoc: Restore underline text decoration on hover for FQN in header)
 - rust-lang#74074 (Fix the return type of Windows' `OpenOptionsExt::security_qos_flags`.)
 - rust-lang#74078 (Always resolve type@primitive as a primitive, not a module)
 - rust-lang#74089 (Add rust-analyzer to the build manifest)
 - rust-lang#74090 (Remove unused RUSTC_DEBUG_ASSERTIONS)
 - rust-lang#74102 (Fix const prop ICE)
 - rust-lang#74112 (Expand abbreviation in core::ffi description)

Failed merges:

r? @ghost
@bors bors merged commit 3199aeb into rust-lang:master Jul 7, 2020
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 14, 2020
…arth

Rollup of 14 pull requests

Successful merges:

 - rust-lang#70563 ([rustdoc] Page hash handling)
 - rust-lang#73856 (Edit librustc_lexer top-level docs)
 - rust-lang#73870 (typeck: adding type information to projection)
 - rust-lang#73953 (Audit hidden/short code suggestions)
 - rust-lang#73962 (libstd/net/tcp.rs: #![deny(unsafe_op_in_unsafe_fn)])
 - rust-lang#73969 (mir: mark mir construction temporaries as internal)
 - rust-lang#73974 (Move A|Rc::as_ptr from feature(weak_into_raw) to feature(rc_as_ptr))
 - rust-lang#74067 (rustdoc: Restore underline text decoration on hover for FQN in header)
 - rust-lang#74074 (Fix the return type of Windows' `OpenOptionsExt::security_qos_flags`.)
 - rust-lang#74078 (Always resolve type@primitive as a primitive, not a module)
 - rust-lang#74089 (Add rust-analyzer to the build manifest)
 - rust-lang#74090 (Remove unused RUSTC_DEBUG_ASSERTIONS)
 - rust-lang#74102 (Fix const prop ICE)
 - rust-lang#74112 (Expand abbreviation in core::ffi description)

Failed merges:

r? @ghost
@rye rye deleted the rustdoc-fqn-hover-underline branch July 30, 2021 12:19
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants