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

Tooltips+Toggle Usability Problem - Proposed Resolution Provided #361

Open
Unemyr opened this issue Apr 11, 2024 · 2 comments
Open

Tooltips+Toggle Usability Problem - Proposed Resolution Provided #361

Unemyr opened this issue Apr 11, 2024 · 2 comments

Comments

@Unemyr
Copy link

Unemyr commented Apr 11, 2024

While using categorical charts (for example a Bar chart) with tooltips and the Toggle() function, it seems the two functions are impacting each other in a way that is quite annoying to users. As soon as tooltips is enabled, you will need to click 3 times (instead of 1 time as is desired and the way it works without tooltips) in order to filter and select that bar. This issue is observed across all major browsers I tried (Chrome, Safari, Edge, Firefox) but does not seem to be an issue on touch-based devices such as mobiles and tablets.

I have made a quick modification for proposed implementation as below - its just a one liner. It seems to work fine in all my tests, and also still good on mobile devices although the speed of selecting the bar seem to be slightly impacted on touch-devices.

[packages/plot/src/interactors/Toggle.js]
One line 63, change the event listener type from 'pointerdown' to 'mousedown'

Apologize for not submitting a pull request directly for this, but my fork's commit also had other code changes that we should not apply into the main project.

As a side note, the interval() function are working fine, also with tooltips as the implementation approach is different.

@jheer
Copy link
Member

jheer commented Apr 11, 2024

Thanks for sharing the issue @Unemyr. I'm hesitant to change the event type as this might break support for touch input or other non-mouse pointer types. I've opened an issue with Observable Plot in hopes that if might be addressed there: observablehq/plot#2052

@Unemyr
Copy link
Author

Unemyr commented Apr 11, 2024

Thanks @jheer, that is a good approach too. Let's see what they say.

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

No branches or pull requests

2 participants