-
Notifications
You must be signed in to change notification settings - Fork 880
Change exceeding and nearing limits to account for the 1000th card #2345
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,11 +21,11 @@ def billed_bytes_used | |
| end | ||
|
|
||
| def nearing_plan_cards_limit? | ||
| plan.limit_cards? && remaining_cards_count < NEAR_CARD_LIMIT_THRESHOLD | ||
| plan.limit_cards? && remaining_cards_count <= NEAR_CARD_LIMIT_THRESHOLD | ||
| end | ||
|
|
||
| def exceeding_card_limit? | ||
| plan.limit_cards? && billed_cards_count > plan.card_limit | ||
| plan.limit_cards? && billed_cards_count >= plan.card_limit | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I agree with @monorkin, I think this should be just >. I am curious, was this causing some user-facing bug in the app?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The issue is stated well in the Fizzy card. Right now, after you've created 1000 cards and go to create another one, the message says "You've used 1000 of 1000 cards", but you can still create another one (card 1001). Seems like the Upgrade prompt should kick in when you have 1000 cards, not 1001.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I think @andyra's logic is correct here, we want to check for |
||
| end | ||
|
|
||
| def nearing_plan_storage_limit? | ||
|
|
||
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.
Maybe this should be just
>so that the account can't simultaneously be near and over the limit?This conceptually also makes sense - on the free plan you can publish 1000 cards, but you can't publish the 1001st card since it's over the limit.