Skip to content

Give precedence to instant previews over title tooltips #8019

@pawamoy

Description

@pawamoy

Context

mkdocstrings uses mkdocs-autorefs to handle cross-references. What we call cross-references are links to documented symbols (for example Python objects), whether they are internal to the current docs, or external (appearing on other sites).

A cross-reference will usually only display a short symbol name, for example Car instead of the Fully Qualified Name (FQN) carlicious.models.Car. To provide more information to readers, mkdocs-autorefs sets the FQN as HTML title attribute, so that hovering on the link shows the FQN.

Image

The issue however is that the presence of the title attribute prevents instant previews from showing up (whether they're enabled globally or for this link specifically).

Description

I'd like instant previews to always show up, even if the link has a title.

I'd like to let mkdocs-autorefs set titles, always, without it preventing the instant previews feature from working. The alternatives are:

  • We try to be smart and set titles or not depending on whether instant previews are enabled and how, and whether the links are internal/external (since instant previews only work for internal links anyway).
  • We add a configuration option to deactivate titles.

Related links

Use Cases

Keep providing tooltips with extra info to readers on link hover, while allowing writers to enable instant previews without feature clash.

Visuals

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions