-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Purchases: Show the fetching state when visiting ManagePurchase
after renewing
#699
Conversation
I added ca5291a to hide the renewal notice (and the expiring CC notice) after renewal too. I'm good with your commit 👍 |
QA 👍 |
…er renewing Fixes #161.
ca5291a
to
486d00c
Compare
@scruffian Thanks for the commit. Code is 👍 for this, then. |
Purchases: Show the fetching state when visiting `ManagePurchase` after renewing
I just wanted to mention that I think it's indeed the best option we have for now. I've spent quite some time trying to figure out a better approach to no avail. The fundamental flaw here is that the The best workaround I can think of is to ask the store to update the purchase just renewed: this wouldn't perform any call to the API but just update local data. The thing is, it's easy to deduct basic changes client-side such as the new expiration date and perform this optimistic update. However, it's tricky to determine others such as the new price when the user cancels privacy protection. We could reset the corresponding properties in the store though but it doesn't solve everything. For example what if the user uses a different payment method during renewal? Again we would display the former payment method when users are redirected on the So this solution to update the data optimistically isn't a good one, which leaves us with either updating |
This PR updates
ManagePurchase
to render the fetching state when data is fetching after a renewal, to hide any stale data related to the pre-renewal purchase.Previously, we attempted to just obscure the renewal date, but there are other aspects of the purchase (the price, the expired style, etc) that we would need to change temporarily as well. The simplest solution is to just hide the purchase until a new one has been fetched from the API.
Fixes #161.
Testing
ManagePurchase
page for the given purchase, see the success notice, and that the fetching state is displayed below for a moment instead of stale data.