pub-dev icon indicating copy to clipboard operation
pub-dev copied to clipboard

fix: downloads sparkline hover is hidden under mouse

Open eseidel opened this issue 1 year ago • 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

eseidel avatar Nov 18 '24 22:11 eseidel

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

eseidel avatar Nov 18 '24 22:11 eseidel

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

eseidel avatar Nov 18 '24 22:11 eseidel

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?

sigurdm avatar Nov 19 '24 09:11 sigurdm

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

eseidel avatar Nov 19 '24 16:11 eseidel

Github puts it above the cursor: image

eseidel avatar Nov 19 '24 16:11 eseidel

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!

eseidel avatar Nov 19 '24 16:11 eseidel

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

Box anchor should be bottom right.

dishankjindal1 avatar Jan 11 '25 08:01 dishankjindal1

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

sigurdm avatar Jan 13 '25 10:01 sigurdm