Browse Source

fix(mep): User misery renderer (#37065)

- This updates the userMisery component so that it renders the user
  counts too so its closer to the UI for transactions data.
  - Going to revisit introducing the thresholds to MEP longterm
William Mak 2 years ago
parent
commit
2623954ec8
1 changed files with 9 additions and 0 deletions
  1. 9 0
      static/app/components/userMisery.tsx

+ 9 - 0
static/app/components/userMisery.tsx

@@ -42,6 +42,15 @@ function UserMisery(props: Props) {
         userMisery: userMisery.toFixed(3),
       }
     );
+  } else if (defined(miserableUsers) && defined(totalUsers)) {
+    title = tct(
+      'User Misery score is [userMisery], because [miserableUsers] out of [totalUsers] unique users had a miserable experience.',
+      {
+        miserableUsers,
+        totalUsers,
+        userMisery: userMisery.toFixed(3),
+      }
+    );
   } else {
     title = tct('User Misery score is [userMisery].', {
       userMisery: userMisery.toFixed(3),