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

fix: fix the issue where a successful upgrade won't refresh the billing page #9740

Merged
merged 2 commits into from
May 10, 2024

Conversation

tianrunhe
Copy link
Contributor

@tianrunhe tianrunhe commented May 8, 2024

Description

Fixes #9737

Demo

Stripe webhooks are slow locally. Please be patient while viewing this GIF😂:

2024-05-08 14 57 05

Testing scenarios

  • Upgrade to team
    • Upgrade an org to team tier
    • Brew a cup of coffee and wait
    • Observe the billing page refreshes itself and the confetti shows up eventually

Final checklist

  • I checked the code review guidelines
  • I have added Metrics Representative as reviewer(s) if my PR invovles metrics/data/analytics related changes
  • I have performed a self-review of my code, the same way I'd do it for any other team member
  • I have tested all cases I listed in the testing scenarios and I haven't found any issues or regressions
  • Whenever I took a non-obvious choice I added a comment explaining why I did it this way
  • I added the label Skip Maintainer Review Indicating the PR only requires reviewer review and can be merged right after it's approved if the PR introduces only minor changes, does not contain any architectural changes or does not introduce any new patterns and I think one review is sufficient'
  • PR title is human readable and could be used in changelog

@tianrunhe tianrunhe linked an issue May 8, 2024 that may be closed by this pull request
@github-actions github-actions bot added the size/s label May 8, 2024
@tianrunhe tianrunhe marked this pull request as ready for review May 8, 2024 12:04
@tianrunhe tianrunhe requested a review from Dschoordsch May 8, 2024 12:04
Comment on lines 136 to 142
commitLocalUpdate(atmosphere, (store) => {
const organization = store.get(orgId)
if (!organization) return
organization.setValue('team', 'billingTier')
organization.setValue('team', 'tier')
})
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 let's put this logic in the upgradeToTeamTierSuccessUpdater where we also open the drawer and show the confetti

@github-actions github-actions bot added size/xs and removed size/s labels May 8, 2024
@tianrunhe tianrunhe requested a review from Dschoordsch May 8, 2024 19:55
Copy link
Contributor

@Dschoordsch Dschoordsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me it's missing the 2 topmost sections ("Invoices" and "Credit card") after the upgrade without a manual refresh, but it's already an improvement to the state before.

@tianrunhe
Copy link
Contributor Author

tianrunhe commented May 10, 2024

For me it's missing the 2 topmost sections ("Invoices" and "Credit card") after the upgrade without a manual refresh, but it's already an improvement to the state before.

The invoices section is a bit tricky: we need to wait for Stripe to finalize the paid invoice & create the upcoming invoice to have the data to populate that view but those happen a little bit later than the payment success. To give the customer a faster turnaround & an indicator they have successfully upgraded, I think this is fine for now.

@tianrunhe tianrunhe merged commit 9a904d3 into master May 10, 2024
5 checks passed
@tianrunhe tianrunhe deleted the bug/9737/billingPageRefreshAfterUpgrade branch May 10, 2024 18:33
@github-actions github-actions bot mentioned this pull request May 21, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: successful upgrade does not refresh the billing page
2 participants