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

Give precedence to instant previews over title tooltips #8019

Open
4 tasks done
pawamoy opened this issue Feb 20, 2025 · 1 comment
Open
4 tasks done

Give precedence to instant previews over title tooltips #8019

pawamoy opened this issue Feb 20, 2025 · 1 comment
Labels
needs investigation Issue must be investigated by the maintainers

Comments

@pawamoy
Copy link
Contributor

pawamoy commented Feb 20, 2025

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

@squidfunk squidfunk added the needs investigation Issue must be investigated by the maintainers label Feb 20, 2025
@squidfunk
Copy link
Owner

Thanks for suggesting. We need to evaluate, whether instant previews should always "trump" titles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Issue must be investigated by the maintainers
Projects
None yet
Development

No branches or pull requests

2 participants