Paperfeed / LiuChan

A Chinese mouseover dictionary extension for Chrome
https://paperfeed.github.io/LiuChan
20 stars 11 forks source link

Hyperlink tooltip displayed over pop-up #3

Open manyfew opened 6 years ago

manyfew commented 6 years ago

Hi, first and foremost, I've just discovered LiuChan and I'm loving it. I've recommended it on Chinese-Forums (view thread) and I feel is so damn good I'm switching to Chrome, finally.

I've been using it all morning and noticed a small issue with hyperlink tooltips, see the screenshot below:

tooltip problem

As I hover the mouse over the Chinese text on certain hyperlinks, the tooltip obstructs the top of the pop-up which, as in this example, can be a problem.

If for technical reasons this cannot be addressed, a simple solution would be to offset the pop-up a little bit so that it appears below the tooltip.

Thank you!

Paperfeed commented 6 years ago

Hey Manuel!

Thank you for the bug reports! I'll try to get the fixes and suggestions through as soon as possible.

Some things I'm not entirely sure whether or not I can fix them though, as it seems to be browser behavior (since the pop-up is displayed inline, it automatically zooms with the page and alt text automatically pops up over it. I can however implement some workaround such as a way to switch to a smaller size on the press of a button and trying to make sure the pop-up is never located under the alt text.

Maybe I'll find a perfect solution or perhaps it'll be a hacky solution, but hopefully it will make liuchan now convenient to use!

As for more theme customization options, I'm on it 😃

Cheers, Aldert

On Nov 4, 2017 05:11, "Manuel Fernandez" notifications@github.com wrote:

Hi, first and foremost, I've just discovered LiuChan and I'm loving it. I've recommended it on Chinese-Forums (view thread) and I feel is so damn good I'm switching to Chrome, finally.

I've been using it all morning and noticed a small issue with hyperlink tooltips, see the screenshot below:

[image: tooltip problem] https://user-images.githubusercontent.com/11704566/32402174-33a02670-c159-11e7-8702-c1e2ae5301fe.png

As I hover the mouse over the Chinese text on certain hyperlinks with alt text, the tooltip obstructs the top of the pop-up which, as in this example, can be a problem.

Thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Paperfeed/LiuChan/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/ABj8V0FZHVidznGHLHNQ25AOKQRoCbavks5sy-PjgaJpZM4QR4f3 .

manyfew commented 6 years ago

I just noticed there's a keyboard shortcut to shift the pop-up down (Y), but the pop-up moves back near the mouse pointer once it moves. Technically the pop-up and the tooltip are both a form of pop-up, so trying to display both on the same spot is never going to work--either one will try to be on top. IMO the only sensible solution is to detect the extent of the tooltip and ensure the pop-up is display below the tooltip. If that's not possible, then perhaps allowing the pop-up to appear at a fixed donward offset from the default position would work well, since most tooltips are one-liners. In the rare event of a multi-line tooltip, users can temporarily hit Y a couple of times to get the pop-up into view.

Thanks!

Paperfeed commented 6 years ago

There's code in that should lower the popup if it's a hyperlink.

Please send me any edge cases where it's not working correctly (URL's and how to reproduce the bug), thanks!

manyfew commented 6 years ago

Just tested and it's working well. Will report here if I find any edge cases, thanks.

The tooltip still covers a bit of the pop-up's edge at the top, maybe this is intentional i.e. to make the tooltip more obvious? At least it doesn't cover the text, which was the main issue :)

clipping

Here's the link to the above page:

https://detail.tmall.com/item.htm?id=45668678310&ns=1&abbucket=3