-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(flags/tagsDrawer): ensure distribution percentages add to 100 #87308
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we're going to make any updates here, can we make sure that the changes are made everywhere (preview, details, drawer)
I can probably make some/all of the edge case screenshots into jest tests, will add within the next day |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Use Math.round for percents and calculate
otherPercentage
by subtracting from 100. Non-zero percents that are rounded to 0 are displayed as "<1%".Sample issue
Closes https://github.com/getsentry/team-replay/issues/562
After

Before

Edge cases

totalValues 1000, topValues 500, 490, 5, 5
totalValues 1000, topValues 500, 490, 4, 3, 3
totalValues 1000, topValues 500, 490, 15, 5
0% are never shown for top values or other