-
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: Update the cancellation confirmation screen for domains #4495
Conversation
@@ -0,0 +1,25 @@ | |||
.confirm-cancel-domain { | |||
// the following is a hack so the dropdown selector is not cropped when it overflows its container |
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.
paths.confirmCancelPurchase(), | ||
'Confirm Cancel Purchase' | ||
paths.confirmCancelDomain(), | ||
'Confirm Cancel Domain' |
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.
Can we use titles.confirmCancelDomain
here?
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.
We could yeah, is it clearer what information is sent to the analytic engine though?
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.
I don't think we want to pass a translated string to recordPageView
.
I see this when I try to cancel a business plan:
|
95c2397
to
69cb2de
Compare
return false; | ||
} | ||
|
||
if ( [ 'other_host', 'transfer' ].indexOf( selectedReason.value ) >= 0 ) { |
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.
Super minor, but you could replace this clause and the tail return with
return [ 'other_host', 'transfer' ].indexOf( selectedReason.value ) === -1;
c68f6fb
to
62e8796
Compare
function loadEndpointForm( selectedPurchase, onSuccess ) { | ||
const { id, productId } = selectedPurchase; | ||
|
||
wpcom.getCancellationPageHTML( id, productId, ( error, response ) => { |
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.
We should remove this endpoint from wpcom-undocumented/lib/unpublished.js
.
I believe I took care of most of your concerns. |
9876823
to
e49047b
Compare
This works well, and the code looks good to me. I updated the commit history with a couple minor changes: CSS naming fixes, as well as removing |
This looks good. I noticed #4518 while testing, but we should fix that in a different PR. LGTM 👍 |
Reimplement confirm cancel puchase form for domain on the client. Previously the form was returned by the API and injected into Calypso
Edited the logic of `isCancellable( purchase )`. A purchase can have its `isCancellable` property set to `false` when a request to cancel have already been made for instance.
e49047b
to
373ac2b
Compare
Purchases: Update the cancellation confirmation screen for domains
Reimplement the "confirm cancel puchase" form for domains on the client.
Previously the form was returned by the API and injected into Calypso.
Testing Instructions
git fetch -a && git checkout update/confirm-cancel
Cancel Domain and Refund
option should be displayed.Cancel Domain and Refund
Cancel Domain
."[domain] was successfully cancelled and refunded."
Reviews