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

Add hover text #10

Merged
merged 1 commit into from Jul 1, 2021
Merged

Add hover text #10

merged 1 commit into from Jul 1, 2021

Conversation

bkoropoff
Copy link
Contributor

@bkoropoff bkoropoff commented Jun 19, 2021

If the link text is not literally the full identifier, show the full identifier on hover.

This will be handy for the way I intend to handle mkdocstrings/mkdocstrings#269

@oprypin
Copy link
Member

oprypin commented Jun 27, 2021

Hmm so this change is good for mkdocstrings usage but I think generally this effect can be undesirable. Consider the main example:

https://github.com/mkdocstrings/autorefs#usage

Or um
if I write

Link to [Hello, World!][hello-world]

I don't want to have the popup text "hello-world", what's the use of it?

So I think it should be mkdocstrings itself that somehow indicates that a hover title should be used.

@bkoropoff
Copy link
Contributor Author

@oprypin I changed it to use a different reference type. I noticed mkdocstrings-identifier seemed to be unused, so I removed it from the regex as well.

@oprypin
Copy link
Member

oprypin commented Jun 27, 2021

Thanks.
Hmm I don't understand something.
If currently mkdocstrings produces only "required references", shouldn't the new thing be "required references with title"? Instead you seem to be adding "optional references with title".

@bkoropoff
Copy link
Contributor Author

bkoropoff commented Jun 27, 2021

mkdocstrings/mkdocstrings#297 uses this to automatically cross-reference base classes. If the base class isn't in the same package, we don't want to warn about an unmapped reference.

This additionally adds the full identifier as hover text, which
is useful for certain references that could be generated by
mkdocstrings.
@pawamoy pawamoy merged commit 0288bdd into mkdocstrings:master Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants