Polish Value Stream Dashboard sparkline UI
What does this MR do and why?
Closes #385643 (closed)
Cleans up the sparkline charts for Value Stream Dashboards by making a bunch of small changes:
-
Disables pointer events on the chart
- Forces
cursor: default
when hovering the chart, there isn't an easy to way disablecursor: pointer
via the current GlSparklineChart API - Hides the tooltip. The existing content isn't customizable and doesn't match our use-case well.
- Forces
- Implements GlSparklineChart.smooth
-
Implements GlSparklineChart.gradient
- Inverts the colors based on the existing trend indicator
- Adds a loading skeleton
-
Shrink the Y-padding on the chart table cell
- Using the default padding for the chart was stretching out the content for the rest of the table. This will prevent the table from resizing when the chart loads
Screenshots or screen recordings
State | Before | After |
---|---|---|
Loading | ![]() |
![]() |
Loaded | ![]() |
![]() |
How to set up and validate locally
- Seed cycle analytics data
-
Create an environment from the UI named
production
- Open the rails console
$ rails c
- Seed DORA daily metrics in the environment using the new environment
// Within the rails console $ e = Environment.order(:id)[-1] $ 100.times { |i| Dora::DailyMetrics.create(environment_id: e.id, date: (i + 1).days.ago, deployment_frequency: rand(50), incidents_count: rand(5), lead_time_for_changes_in_seconds: rand(50000), time_to_restore_service_in_seconds: rand(100000)) }
- Enable the Exec dashboard
Feature.enable(:group_analytics_dashboards_page)
- Visit the exec dashboard:
http://gdk.test:3000/groups/${YOUR_GROUP}/-/analytics/dashboards
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Alex Pennells