Skip to content

Conversation

@joepio
Copy link
Contributor

@joepio joepio commented Dec 11, 2025

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-label and 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.)

Screenshot 2025-12-22 at 16 24 36

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

N/A (Uses existing Statistics Graph card configuration)

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @joepio

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant home-assistant bot marked this pull request as draft December 11, 2025 13:17
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@joepio joepio marked this pull request as ready for review December 11, 2025 13:19
@MindFreeze
Copy link
Member

Please:

  • Fill the screenshots placeholder provided by the LLM
  • Use the PR template
  • Do not use git flow for the PR title

@timmo001 timmo001 marked this pull request as draft December 11, 2025 14:18
@joepio joepio marked this pull request as ready for review December 22, 2025 16:41
@joepio joepio changed the title feat: Add history link to statistics graph card Add history link to statistics graph card Dec 22, 2025
@joepio
Copy link
Contributor Author

joepio commented Dec 22, 2025

Added screenshot, used PR template and changed title. @MindFreeze

@MindFreeze MindFreeze added the Needs UX Pull requests requiring a review from the Home Assistant design team label Dec 23, 2025
Copy link
Member

@MindFreeze MindFreeze left a 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

@joepio
Copy link
Contributor Author

joepio commented Dec 23, 2025

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.

joepio added a commit to joepio/frontend that referenced this pull request Dec 23, 2025
@joepio
Copy link
Contributor Author

joepio commented Dec 23, 2025

There we go. Added aria-label and localized tooltip (also appears on hover, showing tab select here).

Screenshot 2025-12-23 at 12 15 47

MindFreeze
MindFreeze previously approved these changes Dec 23, 2025
Copy link
Member

@MindFreeze MindFreeze left a 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

@MindFreeze MindFreeze removed the Needs UX Pull requests requiring a review from the Home Assistant design team label Dec 23, 2025
@MindFreeze MindFreeze enabled auto-merge (squash) December 23, 2025 11:27
Copy link
Contributor

@silamon silamon left a 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?

@home-assistant home-assistant bot marked this pull request as draft December 26, 2025 10:38
auto-merge was automatically disabled December 26, 2025 10:38

Pull request was converted to draft

@joepio joepio force-pushed the statistics-graph-history-link branch from 638519a to 1e7e23d Compare December 26, 2025 13:50
@joepio joepio force-pushed the statistics-graph-history-link branch from 1e7e23d to 7fe77a8 Compare December 26, 2025 13:50
@joepio joepio marked this pull request as ready for review December 26, 2025 13:51
@home-assistant home-assistant bot requested a review from silamon December 26, 2025 13:51
@joepio
Copy link
Contributor Author

joepio commented Dec 26, 2025

Hey @silamon, sure. I removed the line that caused the error, rebased onto main and force pushed.

@silamon silamon enabled auto-merge (squash) December 26, 2025 13:59
@silamon silamon merged commit cac89e9 into home-assistant:dev Dec 26, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants