-
Notifications
You must be signed in to change notification settings - Fork 902
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
Fix 6203 tooltip overflows behind screen #6359
Fix 6203 tooltip overflows behind screen #6359
Conversation
…reakdownChart.tsx i've managed to, on desktop, get height of header and place a limit to position y of the tooltip so it can not go further. further. On AreaGraphTooltip the same solution does not work so i placed a fixed value on desktop.
…phTooltip also fixed, now working as the BarBreakdownChart toolkit.
…tymaps-contrib into FIX_6203-tooltip-overflows-behind-screen
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.
This works great for the changed tooltips!
However this also affects the exchange tooltips as well so would be good if we could change those too.
I also left some suggestions that could simplify the code.
…contrib into FIX_6203-tooltip-overflows-behind-screen
Hey @PmplCode, let us know if you need any help with implementing the suggestions :) |
Hey, @madsnedergaard @VIKTORVAV99 thanks for the suggestions! During this week I'll try to implement this solution. On the exchange tooltips I haven't seen any style for the position. I'll to figure out how to apply the conditions. Thanks and we stay in touch! |
… how to implement this feature on exchangeArrows, might need some help.
…thub.com/PmplCode/electricitymaps-contrib into FIX_6203-tooltip-overflows-behind-screen
…thub.com/PmplCode/electricitymaps-contrib into FIX_6203-tooltip-overflows-behind-screen
… preventing to overflow offsite top.
Hello, @madsnedergaard @VIKTORVAV99 . Sorry for taking some more time to solve this problem. Today I woke up inspired and I think i got the fix for the exchange tooltips. If you want to check it out and maybe discuss a better solution or approach for this. Thanks and stay in touch! |
Hello! How is it going? |
We have just been a bit busy and unable to prioritize this just yet. I had hoped to get around to it this weekend that was but other things such as parser changes came up instead (which has a higher priority as it affects all our data). Hopefully I'll be able to take another look at it soon though. |
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.
Just some final notes, but it looks very good!
…thub.com/PmplCode/electricitymaps-contrib into FIX_6203-tooltip-overflows-behind-screen
Hey @VIKTORVAV99 , |
Thanks! I'll take a look as soon as possible! |
For a future version (not now) we could consider using https://floating-ui.com/ to handle placement of tooltips, it seems pretty nice and powerful :) |
Looks good, although I have never used floating-ui it seems pretty easy, at least looking at its documentation. |
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.
Hey again, sorry it took so long to get this reviewed again - to avoid wasting your time I've gone ahead and ensured this PR is up-to-date with master
(and fixed a small thing with hooks by renaming getHeaderHeight
to useHeaderHeight
) :)
I have tested it locally and it works great, thanks for taking the time to make this change - I promise the turnaround time is usually significantly faster 😅
Issue
Closes #6203 , although it is my first time taking part on an open source project and i would like guidance.
Description
tooltip remains visible everytime even with scrolled screen.
Preview
https://www.linkedin.com/posts/eloipampliegajose_opensource-frontenddev-electricitymaps-activity-7153079821013508096-yzqW
Double check
poetry run test_parser "zone_key"
pnpx prettier --write .
andpoetry run format
to format my changes.