-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
VizTooltips: Render data links only when anchored #83737
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM - only potential concern I have with this is potential inconsistencies with when data links appear in tooltips across visualizations (unless our plan is to implement this optimization across all visualizations).
Another thing to consider is discoverability of datalinks (i.e. user might not be aware they are even an option and so might miss them entirely unless they pin the tooltip) - whereas before it was a visible indicator / reason to pin tooltip in the first place - maybe we can have some indication / text letting user know that datalinks exist or something 🤷
Screen.Recording.2024-02-29.at.11.35.29.PM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@nmarrs After looking at #83638, it looks like rendering the datalinks only if the tooltip is pinned was already the de facto behavior, so hopefully the discoverability piece won't be any worse? Maybe I'm reading it wrong? |
totally agree on discoverability; that was the main reason for making them visible unconditionally in the previous PR. but the old tooltips only showed them when anchored as well, so we're not regressing anything. i dont intend for this to be the endgame, but optimizing one idea is maybe to defer link rendering after a user has paused over a datapoint for 100ms. this way it's both discoverable and fast when mousing around without intent, but that requires additional debounce changes to the tooltip plugin. let's just do the easy thing for now :) |
yeah. heatmap tooltip is a bit of its own beast currently and has custom link re-gen code in the tooltip itself due to dataframe structure (you know ;). it needs to be refactored to share similar logic with the others, but i'm gonna leave this to another PR. added it to this epic: #83632 |
turns out it's pretty expensive to re-generate datalinks while live-hovering dense datasets.
this rolls back the changes in #83638 until we can improve the datalink gen performance.
(also removes an unnecessary
<div>
wrapper)