-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ui2: disable chonk opt in if user has exceeded subscriptions #100927
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
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
if (exceededCategories.length === 0) { | ||
return null; | ||
} | ||
|
||
return <ChonkOptInBannerComponent collapsed="never" />; |
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.
Potential bug: The conditional logic for displaying the ChonkOptInBannerComponent
is inverted, causing it to show only when subscription quotas are exceeded, which is the opposite of the intended behavior.
-
Description: The conditional logic to display the
ChonkOptInBannerComponent
is inverted. The code currently checks ifexceededCategories.length
is zero and returnsnull
, which means the banner is only shown when a user has exceeded their subscription quotas. This directly contradicts the intended behavior stated in the pull request title, which is to disable the opt-in banner when quotas are exceeded. As a result, the banner promoting a new UI is displayed to users who may be dealing with billing issues, while it is hidden from users with no quota problems. -
Suggested fix: Invert the conditional logic to hide the banner when quotas are exceeded. The check should be
if (exceededCategories.length > 0)
to returnnull
, and the component should be rendered in the default case.
severity: 0.55, confidence: 0.98
Did we get this right? 👍 / 👎 to inform future reviews.
yeah feels like there should be some unified way to display notifications, probably with some central-ish registry so you can prioritize them. |
Co-authored-by: jonas.badalic <jonas.badalic@sentry.io>
Fixes DE-276
What this PR does:
Some concerns and why I'm not sure if this is something we should land:
Imo, this makes is a bit nicer, but it's not a good solution at all, and we should revisit how notifications in our app work (least in the sidebar) and find a more complete solution. The independent messaging/signaling that each sidebar entry now does is not a scalable approach going forward