-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(usage overview): Add breakdown into panel #104141
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
Conversation
| }); | ||
|
|
||
| const formattedAdditionalReserved = null; | ||
| const formattedGifted = displayPriceWithCents({cents: reservedBudget.freeBudget}); |
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.
Bug: Gifted field displays zero values unnecessarily
The formattedGifted variable is always computed regardless of whether freeBudget or free is zero. Since displayPriceWithCents({cents: 0}) returns "$0.00" and formatReservedWithUnits(0, category) returns "0" (both truthy strings), the conditional {formattedGifted && ...} will render the "Gifted" field showing "$0.00" or "0" when there's actually no gifted amount. The tests explicitly set non-zero gifted values, suggesting this zero case wasn't intended to display. Compare this to formattedAdditionalReserved which correctly uses a conditional check before formatting.
Additional Locations (1)
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.
this was intentional however since this is not GA'd yet it's possible we will provide the same treatment as we do for additional reserved or vice versa later on
Split out from #103983
Pt 5 of https://linear.app/getsentry/issue/BIL-1817/update-usage-overview-table-with-new-designs
Introduces the new panel (behind a non-existent FF) + fixes file structure so components are nested
