-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
fix(usage overview): Display add-on categories with reserved volume #104465
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
base: master
Are you sure you want to change the base?
Conversation
❌ 13 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| ).flatMap(addOnInfo => addOnInfo.dataCategories); | ||
| const addOnDataCategories = Object.values(subscription.planDetails.addOnCategories) | ||
| .flatMap(addOnInfo => addOnInfo.dataCategories) | ||
| .filter(category => checkIsAddOnChildCategory(subscription, category, true)); |
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: Categories with zero reserved hidden when add-on has mixed values
When an add-on has multiple data categories with mixed reserved values (some with non-zero reserved volume, some with zero), categories with zero reserved become invisible. This happens because: (1) zero-reserved categories are added to addOnDataCategories and filtered out of the main list, (2) but the add-on section returns null when ANY sub-category has non-zero reserved. The comment on line 89-90 claims these categories will render in sortedCategories, but this only applies to categories that fail checkIsAddOnChildCategory - zero-reserved categories pass the check and get excluded from both locations.
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.
documenting assumption for now since we don't currently support a mix
Fixes a bug where we didn't display add-on sub-categories that had a non-reserved budget / non-unlimited volume: