executablebooks / sphinx-copybutton

Add a "copy" button to code blocks in Sphinx
https://sphinx-copybutton.readthedocs.io/en/latest/
MIT License
246 stars 50 forks source link

Use only one tooltip #200

Open jeanas opened 1 year ago

jeanas commented 1 year ago

Context

I know that styling is subjective, so feel free to ignore this suggestion, but I would still like to record it.

image

When I hover on the copy button, two different tooltips saying essentially the same thing are printed. I find this a bit weird and would prefer just one tooltip.

I did this on a project using custom CSS here:

https://gitlab.com/extending-lilypond/extending-lilypond.gitlab.io/-/blob/main/static/better-copybutton.css#L14

Proposal

Either remove one of the tooltips entirely, or make it optional.

Tasks and updates

No response

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

Carreau commented 3 weeks ago

Got the same issue on pydata-sphix-theme, as far as I understand the "copy to clipboard" is not a tooltip but a title element for the svg that is supposed to be there for accessibility reason and happen to be rendered as a tooltip on most of not all browsere.

I do agree that both tooltip are annoying and the non-native one maybe should be removed.