fix(scorecard): Add a view data source menu on homepage sparkline card - #4877
Conversation
Changed Packages
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4877 +/- ##
=======================================
Coverage 63.81% 63.82%
=======================================
Files 2698 2700 +2
Lines 107951 107973 +22
Branches 30265 30268 +3
=======================================
+ Hits 68887 68911 +24
+ Misses 38546 38545 -1
+ Partials 518 517 -1
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
3c32b6e to
fe77560
Compare
|
dzemanov
left a comment
There was a problem hiding this comment.
I would like to point out that not all metrics with visualization: sparkline have collectors in View datasources - only metrics that are composite (like DORA). Non-composite metrics should show metric description. You can see it in the design:
Screen.Recording.2026-09-21.at.11.48.51.mov
Currently, there is no way to set visualization to a different type then the default type, and we have only DORA metric (that is composite). But, in future with CRUD, users can configure visualization type (so for example github.openPRs can be shown as 30 days trend). Furthermore, even now, users can contribute their own metrics and they can set defaultVisualization to sparkline, which would mean, View datasources is showing nothing for them (same for the entity page).
You can test it out by setting defaultVisualization for GithubOpenPrsProvider to sparkline and updating openPrsKpi from statusGrouped to type: average.
Design also shows that View datasources should be shown in all scorecards (homepage and entity page), not only sparkline scorecards. It can be fixed as a bug.
We have discussed this in slack.
Adding metric description above collector description for View datasources entity and homepage is also to be worked upon as a separate bug. Translation of collectors description as well. I will create those tickets now to not forget.
I have tested that for composite metrics, VIew datasources works correctly:
(at the end, there is shown the bug for non-composite metric with sparkline.
Screen.Recording.2026-09-21.at.11.36.27.mov
Translation + no View datasources dialog in drill down:



Hey, I just made a Pull Request!
Fix - https://redhat.atlassian.net/browse/RHIDP-17125
Follow-up to #4596. Homepage sparkline cards were missing View data sources; the entity sparkline already had it.
What
Adds a View data sources kebab on homepage sparkline cards, next to the last-updated info button. Collectors load when the dialog opens. Homepage and entity sparklines now share
SparklineDataSources/useSparklineDataSources.Screenshots
What changed
AggregatedSparklineCard— last-updated (i) plus View data sources menu (hidden on drill-down viashowInfo={false}).SparklineDataSources/useSparklineDataSources— shared menu, collector fetch, and dialog used by homepage and entity cards.EntitySparklineCard— uses the shared helper; behavior unchanged.formatSparklineDateLabel— shared axis date formatting.How to test
✔️ Checklist