-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add history link to statistics graph card #28500
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
Add history link to statistics graph card #28500
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.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Please:
|
|
Added screenshot, used PR template and changed title. @MindFreeze |
MindFreeze
left a comment
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.
Looks mostly good to me but the UX team should have a look as they have expressed concern about discoverability for such features.
At the very lease we should add an aria-label and title/ha-tooltip to the link for accessibility
Seems like a good idea, but note that this is already not the case for the existing link in the history card. This PR just makes the behavior consistent between the two existing cards. But I want this merged because I really need to be able to open the history from my statistics cards, so I'll work on it. |
MindFreeze
left a comment
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.
Right, it's the same for the history card ao it should be fine. Thanks
silamon
left a comment
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.
Can you resolve the CI issues?
Pull request was converted to draft
638519a to
1e7e23d
Compare
1e7e23d to
7fe77a8
Compare
|
Hey @silamon, sure. I removed the line that caused the error, rebased onto main and force pushed. |

Proposed change
This PR adds a "next" icon link to the header of the Statistics Graph card.
Clicking this link navigates the user directly to the History panel, with the same entities and time range pre-selected. This improves the user experience by providing a quick way to transition from high-level statistics to detailed history data.
This PR makes the behavior consistent between history and statistics cards. Currently, only the history card shows a link to the history.
Additionally, this PR improves on the accessibility, adding
aria-labeland a tooltip in both cards for this link.(The top item is a statistics card, which did not have a history link. The bottom item is a history card, which already has one.)
Type of change
Example configuration
N/A (Uses existing Statistics Graph card configuration)
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: