Skip to content

rustdoc: "copy path" icon should have a title attribute #84639

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

Closed
jsha opened this issue Apr 28, 2021 · 3 comments
Closed

rustdoc: "copy path" icon should have a title attribute #84639

jsha opened this issue Apr 28, 2021 · 3 comments
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jsha
Copy link
Contributor

jsha commented Apr 28, 2021

To indicate what it does, i.e. "Copy use declaration to clipboard." Also, right now the action is triggered by an onclick= attribute in the HTML. It would be slightly nicer to use addEventListener in main.js, so it's easy to see in one place where all handlers are added.

@jsha jsha added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc labels Apr 28, 2021
@rukai
Copy link
Contributor

rukai commented May 1, 2021

Another observation to hopefully improve UX a bit, as I was very confused as to what this new feature did at first.
On crates.io the copy crate name icon looks like this:
image

Whereas the copy button looks like this:
image
Maybe its just how ⎘ displays on my machine?
But the crates.io copy is immediately obvious to me while with the docs copy I would need to look at the proposed title attribute to figure out whats going on.

@ChrisDenton
Copy link
Member

crates.io also shows a message when you click the button that tells you it copied something to the clipboard:

copied

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed T-rustdoc labels May 7, 2021
@jsha
Copy link
Contributor Author

jsha commented Jun 3, 2021

Fixed!

@jsha jsha closed this as completed Jun 3, 2021
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) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants