Skip to content
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

feat: show alert when we automatically apply billing limit upon subscribe #18668

Merged
merged 7 commits into from
Nov 21, 2023

Conversation

xrdt
Copy link
Contributor

@xrdt xrdt commented Nov 16, 2023

Problem

We want to alert users when we apply billing limits upon subscription to new products.

Changes

Screen.Recording.2023-11-15.at.4.22.18.PM.mp4

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

How did you test this code?

@xrdt
Copy link
Contributor Author

xrdt commented Nov 16, 2023

Notes:

  • This requires a backend change to update the url we redirect to to include the list of products that were updated.
    • ~~Is there a way around doing the redirection and instead getting information which product was just updated through the billing API? It seems like we're supplying a redirect url because users who don't have a subscription will be redirected to input payment details in Stripe. ~`
  • We don't redirect users upon deactivation...we should probably do that so the url isn't fixed at ?upgraded=true&products={product_name}.
    • Should also reset custom_limits_map for the deactivated product on the backend.

Copy link
Contributor

github-actions bot commented Nov 16, 2023

Size Change: -26.6 kB (-1%)

Total Size: 1.97 MB

Filename Size Change
frontend/dist/toolbar.js 1.97 MB -26.6 kB (-1%)

compressed-size-action

@xrdt xrdt requested a review from raquelmsmith November 16, 2023 00:32
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@xrdt
Copy link
Contributor Author

xrdt commented Nov 16, 2023

Using banner instead, let users modify the billing limit by clicking on button in the banner.

Screen.Recording.2023-11-16.at.2.36.41.PM.mp4

@xrdt xrdt force-pushed the by/show-banner-for-auto-applied-billing-limit branch from 021065f to a83d738 Compare November 16, 2023 23:37
@xrdt xrdt force-pushed the by/show-banner-for-auto-applied-billing-limit branch from a83d738 to 3ab685b Compare November 20, 2023 22:16
@xrdt
Copy link
Contributor Author

xrdt commented Nov 20, 2023

Should merge this first: #18668

@xrdt
Copy link
Contributor Author

xrdt commented Nov 20, 2023

Updated copy, changed banner type to warning.
Screenshot 2023-11-20 at 2 49 15 PM

frontend/src/scenes/billing/BillingLimitInput.tsx Outdated Show resolved Hide resolved
frontend/src/scenes/billing/billingLogic.ts Outdated Show resolved Hide resolved
frontend/src/scenes/billing/billingLogic.ts Outdated Show resolved Hide resolved
frontend/src/scenes/billing/billingLogic.ts Outdated Show resolved Hide resolved
@xrdt
Copy link
Contributor Author

xrdt commented Nov 21, 2023

Confirmed it still works as expected

284685945-01dc0e91-59fc-4396-a10b-c1d846fdaabc.mp4

@xrdt xrdt requested a review from raquelmsmith November 21, 2023 18:53
@xrdt
Copy link
Contributor Author

xrdt commented Nov 21, 2023

Would it make sense to show productSpecificAlerts only on the onboarding/billing page?
Screenshot 2023-11-21 at 11 17 08 AM

@raquelmsmith
Copy link
Member

Would it make sense to show productSpecificAlerts only on the onboarding/billing page?

Oh, yes. only on the billing page, this is already handled for onboarding.

@xrdt
Copy link
Contributor Author

xrdt commented Nov 21, 2023

Updated so the banner only shows on organization/billing page until it's dismissed.

284734012-725e278f-9eab-49d8-b6e7-df9fe42ab3c8.mp4

@xrdt xrdt merged commit 491c783 into master Nov 21, 2023
76 checks passed
@xrdt xrdt deleted the by/show-banner-for-auto-applied-billing-limit branch November 21, 2023 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants