-
Notifications
You must be signed in to change notification settings - Fork 953
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
feat(web): Add tooltip to production source legends in BreakdownChart #6970
feat(web): Add tooltip to production source legends in BreakdownChart #6970
Conversation
@Alportan Do you have any feedback? |
Looking good! 😎 Maybe one small thing, could we use the frosted background blur on the modal? 🙌 I believe we already use it on a few components/elements. |
I have been using background-blur (not sm) to not get the edges to bleed tough, it would be nice if it was the same here :) |
I added the blur and I also changed the mobile version to not be in the middle of the screen, but right above or below the production source icons, because thats what it looked like in figma. Will you take a look at it again @Alportan, and let me know if you would rather have in be in the center on mobile. |
Looks good with the blur! 🫶 Regarding the center modal on mobile, that's a good question. I'm unsure about it for now because adding a tooltip on top of the graph might be disruptive, as the main goal is to help users identify sources on the graph. It's important to keep the design consistent and avoid too many custom components or logic. However, we should review all current use-cases first. There’s a future task to assess and unify tooltips, so we can start with this implementation and refine it later as needed. |
Okay, I'll keep it as it is for now then:) |
/review |
PR Reviewer Guide 🔍
|
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! 🎉
Just one minor thing but nothing blocking! Nice work!
{sources.map((source, index) => ( | ||
<ProductionSourceLegend key={index} electricityType={source} /> | ||
))} |
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.
As the bot suggested you can use the source object directly as a key here as well just as you did later in the code.
…add-legend-tooltip-for-sources
Issue
AVO-234
Description
This PR adds a tooltip to the production source legend list in the BreakdownChart.
Preview
Mobile:
Double check
poetry run test_parser "zone_key"
pnpx prettier@2 --write .
andpoetry run format
in the top level directory to format my changes.