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

Make Run button visible on hover #92058

Merged
merged 1 commit into from
Jan 6, 2022
Merged

Make Run button visible on hover #92058

merged 1 commit into from
Jan 6, 2022

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Dec 18, 2021

This slightly reduces the noisiness of doc pages, making them easier to read.

Demo: https://rustdoc.crud.net/jsha/run-on-hover/std/string/struct.String.html

Discussed on Zulip.

Part of #59845

@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 Dec 18, 2021
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @CraftSpider

(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 Dec 18, 2021
@GuillaumeGomez
Copy link
Member

Looks good to me. Please add a GUI test.

@jyn514
Copy link
Member

jyn514 commented Dec 18, 2021

I thought we were going to remove this button altogether?

@jyn514 jyn514 assigned GuillaumeGomez and unassigned CraftSpider Dec 18, 2021
@GuillaumeGomez
Copy link
Member

From the metrics, it seemed like a lot of people were going to the rust playground from doc.rust-lang.org, so I also understood it like @jsha. But maybe I misunderstood...

@jsha
Copy link
Contributor Author

jsha commented Dec 18, 2021

From the metrics, it seemed like a lot of people were going to the rust playground from doc.rust-lang.org,

Yep, this was also my takeaway.

That doesn't have to mean we keep it, but it means is some constituency for keeping it and I don't feel strongly enough to drive a process of removing it entirely. This feels like a nice easy middle ground.

@jyn514
Copy link
Member

jyn514 commented Dec 18, 2021

Ok, seems like a good starting place :)

@jsha jsha added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 29, 2021
@jsha
Copy link
Contributor Author

jsha commented Dec 30, 2021

Added a GUI test!

@jsha jsha added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 30, 2021
@jsha
Copy link
Contributor Author

jsha commented Jan 2, 2022

@GuillaumeGomez bump on this. :-)

@@ -0,0 +1,4 @@
goto: file://|DOC_PATH|/test_docs/fn.foo.html
assert-css: (".test-arrow", {"visibility": "hidden"})
move-cursor-to: ".test-arrow"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
move-cursor-to: ".test-arrow"
move-cursor-to: ".example-wrap"

This slightly reduces the noisiness of doc pages, making them easier to
read.
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jan 5, 2022

📌 Commit 6409f0d 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 5, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 6, 2022
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#92058 (Make Run button visible on hover)
 - rust-lang#92288 (Fix a pair of mistyped test cases in `std::net::ip`)
 - rust-lang#92349 (Fix rustdoc::private_doc_tests lint for public re-exported items)
 - rust-lang#92360 (Some cleanups around check_argument_types)
 - rust-lang#92389 (Regression test for borrowck ICE rust-lang#92015)
 - rust-lang#92404 (Fix font size for [src] links in headers)
 - rust-lang#92443 (Rustdoc: resolve associated traits for non-generic primitive types)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 50d5e38 into rust-lang:master Jan 6, 2022
@rustbot rustbot added this to the 1.59.0 milestone Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) 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