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

Show reference on hover #67

Open
goerz opened this issue Nov 7, 2023 · 1 comment
Open

Show reference on hover #67

goerz opened this issue Nov 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@goerz
Copy link
Member

goerz commented Nov 7, 2023

Clicking on a citation takes the reader out the current context, as it generally links to the References page of the project. Even though the browser's back button will return the location of the citation, it can still be disorienting.

A nicer experience would be to show the full reference when hovering over the citation. A similar feature for footnotes was requested in JuliaDocs/Documenter.jl#2080.

As mentioned there, this feature may be possible to implement with pure CSS, or it might require some javascript. And example for javascript that implements something like this would be https://www.jqueryscript.net/text/Inline-Footnotes-On-Hover.html (demo).

Adding javascript functionality to DocumenterCitations would raise the question on how a user would set this up. We already have instructions for manually adding CSS. Adding .js files to that (especially if they're required for the plugin to function properly) might be a bit too much. It would be good have have capabilities in Documenter to enable plugins to inject custom css/js, see JuliaDocs/Documenter.jl#1612.

On the other hand, if JuliaDocs/Documenter.jl#2080 was implemented first, that might allow DocumenterCitations to just reuse that implementation.

@goerz goerz added the enhancement New feature or request label Nov 7, 2023
@shayandavoodii
Copy link

Hi, 👋🏻

Adding .js files to that (especially if they're required for the plugin to function properly) might be a bit too much.

In my opinion, it's not. "Copy and paste" content that is pre-organized shouldn't be cumbersome :) I should highlight that this is my personal opinion and others might think differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants