Skip to content

Harmonize hover interactions #91100

Closed
@jsha

Description

@jsha

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-uiArea: Rustdoc UI (generated HTML)T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions