Purchases: Revamp Cancellation Flow, take 1 (originally 93211) #94864
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
This PR refactors the purchase cancellation flow.
All the work was done originally by @Aurorum in #93211. This PR is just to move the branch to the calypso repo so that its strings can be translated (see #93211 (comment)).
However, because the other PR contained a merge commit, somehow that seems to have hidden large conflicts with #94213. I've tried my best to resolve them here but I'm not certain about some things.
Unresolved questions from the conflict:
purchase
object actually have asiteUrl
property? If so we need to modify the type. (See this comment.)showSupportLink
to determine which types of dialogs should not show the support link (it looks like domain stuff) but in Purchases: Revamp Cancellation Flow #93211showSupportLink
was removed. Should we remove the support link entirely or show it all the time?I've started converting some of the files to TypeScript to help gain some confidence in the conflict resolution.