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

Harmonize hover interactions #91100

Closed
jsha opened this issue Nov 21, 2021 · 0 comments · Fixed by #107340
Closed

Harmonize hover interactions #91100

jsha opened this issue Nov 21, 2021 · 0 comments · Fixed by #107340
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jsha
Copy link
Contributor

jsha commented Nov 21, 2021

We have hover tooltip interactions in at least two places (in addition to the "title" attribute on many items, that leads to a browser-generated tooltip). One is the "notable traits" icon in the return position of methods that return a type that implements Iterator, Future, Read, or Write.

image

image

We should adjust these so they have the same:

  • background-color
  • border
  • border-radius
  • font
  • font-weight
  • padding
  • tail or lack of tail (the pointy thing coming out the left side of the "this example panics" tooltip)

We should also make sure both styles of tooltip can be used on touch devices, and have consistent behavior. Proposed tap behavior:

If a tooltip is open, and was opened by hover, tapping its trigger does nothing.
If a tooltip is closed, clicking (tapping) its trigger opens it.
If a tooltip is open, and was opened by clicking, clicking its trigger again closes it.

This should produce good behavior with both touchscreens and pointer devices. The goal is to avoid a frustrating situation where someone using a pointer device moves the mouse to the trigger with plans to click it, and clicks it milliseconds after the hover triggered, closing the tooltip again.

@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 Nov 21, 2021
@bors bors closed this as completed in 7aa4a20 Feb 13, 2023
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) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant