dart-lang/pub-dev

fix: downloads sparkline hover is hidden under mouse

eseidel opened this issue · 8 comments

When you hover the sparkline the number tracks under your cursor (rather than the line), so you can't move the mouse off from over the number to see it.

image

Screenshots don't show the mouse cursor, so it's hard to show you the bug.

FYI @szakarias

Ah! When I capture with the mouse pointer enabled I see the potential bug:
image

I have mouse cursor zoom enabled (which it appears the screenshot tool does not respect, and the pub.dev code does not account for):

image

Here is how it looks taken from my phone camera looking at my screen:
image

According to https://stackoverflow.com/questions/1889487/get-size-of-mouse-cursor-in-javascript there is no way of querying for the cursor size from a web-context.

We could maybe change the cursor to a size of our liking when hovering the sparkline - but that seems unfriendly to people who chose a larger cursor.

Perhaps we should put the tooltip in a fixed position?

I'd probably just put it in a fixed position. NPM for example puts it to the side:
image

Github puts it above the cursor:
image

Anyway, I'm not a UI designer, I defer to folks with much more design ability than myself. Just wanted to report that at least in my setup I couldn't read the numbers. Thanks!

I think having it above the cursor makes much more sense.

Box anchor should be bottom right.

@szakarias what do you think - should we move the sparkline hover above?