-
Notifications
You must be signed in to change notification settings - Fork 0
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
Do not show tooltip when we are blurring the chart #637
base: main
Are you sure you want to change the base?
Conversation
π Visual review for your branch is published πHere are the links to: |
{!yAxis?.isBlur && ( | ||
<ChartTooltip | ||
cursor | ||
content={ | ||
<ChartTooltipContent | ||
indicator="dot" | ||
yAxisFormatter={yAxis?.tickFormatter} | ||
/> | ||
} | ||
/> | ||
)} |
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.
I think we're pushing too much logic on the charts. I would totally rethink this "blur" thing and try to find a higher-order solution (maybe even a higher-order component / wrapper). It can easily pollute the whole codebase.
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.
let's then start rethinking it until it is too late
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.
You mean "before it's too late" because "until it's too late" it's what we want to avoid π
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.
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.
If we wanna blur the YAxis, then the chart needs to know if it should be blurred, right? How else will be blur it? Adding an overlay doesn't make a lot of sense and the alternative would be passing down the className prop which would give too much control of the UI. I understand the concern, I just don't see a better option. It makes sense to me that the chart knows how to blur itself.
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.
Creating a and then letting the card act upon its state would help us avoid that blur
property in the contract and also encourage a global solution. What do you think?
π What?
Do not show tooltip when we are blurring the chart.
πͺ Why?
We shouldn't show any tooltip when hovering the chart in case it's blurred.
ποΈ Visual proof
Screen.Recording.2024-10-01.at.13.44.14.mov