Skip to content

Conversation

@sanne-san
Copy link
Contributor

@sanne-san sanne-san commented Dec 1, 2025

Changes

  • Add percentage values to the reports that are currently lacking this.
  • Change the way percentage is displayed to show only on hover (and tap on mobile). On the dashboard, all report percentages show when hovering the report. In the detailed breakdown, hovering on a row shows the percentage.
  • Remove tooltip for all values except the ones that are abbreviated. The tooltip is still shown for all metrics in comparison mode.
  • In the detailed breakdown, abbreviated numbers are displayed in full when hovering its corresponding table row.
  • Render tooltip via portal as it doesn't play nice with the overflow:hidden class needed to make the sliding hover effect work.
  • Update tooltip style, including removing the arrow for a more modern feel.
  • Remove the logic that hides the Details button when all items are visible on the dashboard, so the detailed breakdown can be viewed at all times.
  • Improved detailed breakdown modal's responsiveness; the inner table is now scrollable, rather than the entire modal.
CleanShot.2025-12-11.at.13.27.17.mp4

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • The UI has been tested both in dark and light mode

@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Preview environment👷🏼‍♀️🏗️
PR-5923

@sanne-san sanne-san changed the title Update report percentages on dashboard and details view WIP - Update report percentages on dashboard and details view Dec 1, 2025
@sanne-san sanne-san force-pushed the sanne-report-percentages branch from f11a50c to bd04d96 Compare December 1, 2025 14:20
@sanne-san sanne-san force-pushed the sanne-report-percentages branch 2 times, most recently from 939409c to 09f0011 Compare December 8, 2025 13:07
- Enable horizontal scroll for details modal on mobile
- Add responsive spacing and positioning to modal
@sanne-san sanne-san force-pushed the sanne-report-percentages branch from 09f0011 to 5360b49 Compare December 8, 2025 13:13
@sanne-san sanne-san force-pushed the sanne-report-percentages branch from 680d2dc to 8628a99 Compare December 9, 2025 12:46
@sanne-san sanne-san force-pushed the sanne-report-percentages branch from fe9b493 to 53b4bdf Compare December 11, 2025 10:43
@sanne-san sanne-san force-pushed the sanne-report-percentages branch from 741cd5e to db70e69 Compare December 11, 2025 11:58
@sanne-san sanne-san changed the title WIP - Update report percentages on dashboard and details view Add report percentages to dashboard and details view Dec 11, 2025
@sanne-san sanne-san marked this pull request as ready for review December 11, 2025 12:16
@sanne-san sanne-san requested a review from a team December 11, 2025 12:34
percentage:
fragment(
"if(? > 0, round(? / ? * 100, 1), null)",
"if(? > 0, round(? / ? * 100, 2), null)",
Copy link
Contributor

Choose a reason for hiding this comment

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

question: If we include another digit, it implies that it's a meaningful digit. Is our tracking accuracy really at this level? Let's say we show the value of 50.04%. Is the true value (assuming perfect tracking) in the range 50.03% ... 50.05% or more like 50.0% ... 50.1%?

I'm also concerned that historical stats API requests would start yielding slightly different values, which may cause frustration when compared with previously requested data.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason this was introduced is because there's often a long tail of <0.1% items. Rather than showing 0% for all of these, we'd like to show 0.05%, 0.06%, etc. So in the majority of cases we don't care about the second decimal, only for numbers below 0.1.

"scroll_depth" => nil,
"name" => "/some-other-page"
"name" => "/some-other-page",
"percentage" => 300.0
Copy link
Contributor

Choose a reason for hiding this comment

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

issue, blocking: something seems to be off when we consider imported data in our calculations. Perhaps its a separate bug and a matter for another time, but I think it may be surprising to customers to see this sort of values.

- Update tests to expect correct percentages (≤100%) when imported data is included. These tests will fail until the percentage calculation bug is fixed, documenting the expected behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants