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

Purchase Management: add new cancelation modal #68067

Draft
wants to merge 33 commits into
base: trunk
Choose a base branch
from

Conversation

ciprianimike
Copy link
Contributor

@ciprianimike ciprianimike commented Sep 20, 2022

Pemise

The PR #67090 is corrupted, I opened this new and addressed the change requests.

P2: pebzTe-6r-p2

  • Add new remove-plan-dialog component to the remove purchases page

#### Issue
1039-gh-Automattic/martech

Acceptance Criteria

1039-gh-Automattic/martech

Proposed Changes

  • Add a new dialog component to show up before the user starts the cancelation flow.

Testing Instructions

  • Checkout update/pre-cancelation-modal
  • Test Calypso locally
  • Visit http://calypso.localhost:3000/
  • Select a site with an active subscription plan
  • Click on te sidebar item Upgrade / Purchases
  • Select the plan
  • Click on the CTA `Remove plan
  • Verify the screenshot image is not blurry

Edge cases:

  • Site isComingSoon or private: the modal won't show the site screenshot
  • Mobile screen size: the modal won't show the site screenshot
  • If the user are cancelling a Jetpack, Professional emails plan: the modal won't show up
  • If the user are cancelling a subscription (auto renew on) within the refund window, with a domain, the modal informs them they are going to love the domain and the traffic will be redirected to the related WPCom URL.

Before

before

After

Pmtriv.mp4

Issue

Related to 1039-gh-Automattic/martech

@matticbot
Copy link
Contributor

matticbot commented Sep 21, 2022

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~815 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper      +3656 B  (+0.1%)     +815 B  (+0.1%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~4210 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
site-purchases                      +14742 B  (+1.0%)    +4210 B  (+1.1%)
purchases                           +14742 B  (+0.9%)    +4210 B  (+1.0%)
domains                             +11239 B  (+0.7%)    +3214 B  (+0.8%)
themes                               +3656 B  (+0.5%)     +813 B  (+0.4%)
theme                                +3656 B  (+0.7%)     +813 B  (+0.5%)
stats                                +3656 B  (+0.5%)     +813 B  (+0.4%)
signup                               +3656 B  (+0.9%)     +813 B  (+0.9%)
settings-writing                     +3656 B  (+0.5%)     +813 B  (+0.4%)
settings-security                    +3656 B  (+0.8%)     +813 B  (+0.6%)
settings-performance                 +3656 B  (+0.6%)     +813 B  (+0.5%)
settings                             +3656 B  (+0.5%)     +813 B  (+0.4%)
scan                                 +3656 B  (+0.5%)     +813 B  (+0.4%)
purchase-product                     +3656 B  (+1.9%)     +813 B  (+1.6%)
posts-custom                         +3656 B  (+0.6%)     +813 B  (+0.4%)
posts                                +3656 B  (+0.6%)     +813 B  (+0.4%)
plugins                              +3656 B  (+0.2%)     +813 B  (+0.1%)
plans                                +3656 B  (+0.4%)     +813 B  (+0.3%)
people                               +3656 B  (+0.6%)     +813 B  (+0.5%)
migrate                              +3656 B  (+0.9%)     +813 B  (+0.6%)
media                                +3656 B  (+0.2%)     +813 B  (+0.2%)
marketplace                          +3656 B  (+0.5%)     +813 B  (+0.4%)
marketing                            +3656 B  (+0.5%)     +813 B  (+0.4%)
jetpack-search                       +3656 B  (+0.8%)     +813 B  (+0.6%)
jetpack-connect                      +3656 B  (+0.3%)     +813 B  (+0.3%)
jetpack-cloud-settings               +3656 B  (+0.8%)     +813 B  (+0.6%)
jetpack-cloud-pricing                +3656 B  (+0.6%)     +813 B  (+0.5%)
jetpack-cloud-plugin-management      +3656 B  (+0.5%)     +813 B  (+0.4%)
jetpack-cloud-partner-portal         +3656 B  (+0.9%)     +813 B  (+0.6%)
jetpack-cloud-agency-dashboard       +3656 B  (+0.7%)     +813 B  (+0.6%)
hosting                              +3656 B  (+0.6%)     +813 B  (+0.5%)
home                                 +3656 B  (+0.4%)     +813 B  (+0.3%)
help                                 +3656 B  (+0.5%)     +813 B  (+0.4%)
email                                +3656 B  (+0.5%)     +813 B  (+0.4%)
earn                                 +3656 B  (+0.7%)     +813 B  (+0.5%)
checkout                             +3656 B  (+0.2%)     +813 B  (+0.2%)
backup                               +3656 B  (+0.4%)     +813 B  (+0.3%)
activity                             +3656 B  (+0.5%)     +813 B  (+0.4%)
accept-invite                        +3656 B  (+0.8%)     +813 B  (+0.8%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~813 bytes added 📈 [gzipped])

name                                                              parsed_size           gzip_size
async-load-masterbar-cart-masterbar-cart-wrapper                      +3656 B  (+2.1%)     +813 B  (+1.6%)
async-load-design-playground                                          +3656 B  (+0.2%)     +813 B  (+0.2%)
async-load-design-blocks                                              +3656 B  (+0.2%)     +813 B  (+0.1%)
async-load-design                                                     +3656 B  (+0.2%)     +813 B  (+0.2%)
async-load-calypso-reader-sidebar                                     +3656 B  (+2.4%)     +813 B  (+2.0%)
async-load-calypso-post-editor-editor-media-modal                     +3656 B  (+0.2%)     +813 B  (+0.2%)
async-load-calypso-my-sites-current-site-stale-cart-items-notice      +3656 B  (+4.2%)     +813 B  (+3.7%)
async-load-calypso-my-sites-current-site-notice                       +3656 B  (+3.3%)     +813 B  (+2.7%)
async-load-calypso-components-web-preview-component                   +3656 B  (+0.6%)     +813 B  (+0.5%)
async-load-calypso-blocks-jitm-templates-sidebar-banner               +3656 B  (+3.8%)     +813 B  (+3.1%)
async-load-calypso-blocks-jitm-templates-notice                       +3656 B  (+3.8%)     +813 B  (+3.1%)
async-load-calypso-blocks-jitm-templates-default                      +3656 B  (+3.8%)     +813 B  (+3.1%)
async-load-calypso-blocks-inline-help-popover                         +3656 B  (+0.5%)     +813 B  (+0.4%)
async-load-calypso-blocks-editor-checkout-modal                       +3656 B  (+0.4%)     +813 B  (+0.3%)
async-load-automattic-help-center                                     +3656 B  (+0.6%)     +813 B  (+0.5%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit update/pre-cancelation-modal-new on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@ciprianimike ciprianimike marked this pull request as ready for review September 22, 2022 17:33
@ciprianimike ciprianimike requested a review from a team as a code owner September 22, 2022 17:33
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 22, 2022
Copy link
Member

@dzver dzver left a comment

Choose a reason for hiding this comment

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

The screenshot is blurry or me if width and height props are not provided. Providing width and height resolves the problem.
Screenshot 2022-09-23 at 13 56 13

@ciprianimike
Copy link
Contributor Author

The screenshot is blurry or me if width and height props are not provided. Providing width and height resolves the problem. Screenshot 2022-09-23 at 13 56 13

@dzver I pushed a fix for this.

@DavidRothstein
Copy link
Contributor

I did a quick test and saw that most of the issues from my comment at #67090 (review) are still present (in particular the first, "We seem to have a double confirmation", and the third, "This is being applied to Jetpack too")?

Also noticed that the messaging seems backwards between refundable and non-refundable cancellations:

  1. I saw this when cancelling a refundable subscription (where it's actually going to be removed immediately, not "once it expires"):

refundable

  1. And this when cancelling a non-refundable subscription (which is actually going to just turn off auto-renew, not remove anything right away):

non-refundable

Seems like it should be the other way around.

Also in the above screenshots, I thought "Best in-class hosting" wasn't supposed to be there anymore (since they aren't losing their hosting)?

And in the first screenshot, "custom domain as primary"... I saw that message even though I don't have a custom domain. Also, even if I did have one, the wording seems pretty confusing to me.

* Plan cancellation dialog.
*/
return (
<Dialog
Copy link
Member

Choose a reason for hiding this comment

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

This is still missing Tracks events: #67090 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@michaeldcain could you please reviews the changes above?

Copy link
Member

Choose a reason for hiding this comment

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

@ciprianimike: sorry I missed this ping. Those events look good to me.

client/me/purchases/remove-plan-dialog/index.tsx Outdated Show resolved Hide resolved
@JessBoctor
Copy link
Collaborator

👋 From my initial review

It looks like the issues I raised have all been resolved.

  1. The Blogger plan now has a feature description:

GH68067-BloggerPlan

  1. The images for the public sites are no longer blurry:

GH68067-BlurryImage

For posterity, I was testing on my 14" MBP A2442. MacOS version 12.5 and Chrome version 105.0.5195.125. Display resolution is set to Default settings and the presets to Apple XDR Display (P3-1600 nits). I used an A8c sandbox with local Calypso build for testing.

  1. My suggestion about the link for And many more was address by @JanaMW27's comment.

@spraveenitpro
Copy link
Contributor

spraveenitpro commented Sep 23, 2022

Some additional functional testing:

For personal plan:

9m1nxP.png

For premium plan:

ZgnAw5.png

For business plan:

dhT0S0.png

@JanaMW27
Copy link

We need the wording: If you cancel your plan, once it expires, you will lose:
In all the modals but the one in the refund window
the: once it expires, is important

@dzver
Copy link
Member

dzver commented Sep 29, 2022

I just want to confirm, is this step supposed to be visible as a second step after clicking the Cancel subscription and refund? (the PR needs rebase, these buttons are now with a different color and copy)

Screenshot 2022-09-29 at 10 30 47

CC @JanaMW27

@ciprianimike
Copy link
Contributor Author

I just want to confirm, is this step supposed to be visible as a second step after clicking the Cancel subscription and refund? (the PR needs rebase, these buttons are now with a different color and copy)

Screenshot 2022-09-29 at 10 30 47

CC @JanaMW27

@dzver that step will be skipped, I discussed it yesterday with @JanaMW27 and worked on the fix

@JanaMW27
Copy link

After some scope and edge cases considerations, we have decided to keep this screen ONLY for users within the refund window.
The rest of the users should ONLY see the modal and not this screen.

@ciprianimike
Copy link
Contributor Author

I did a quick test and saw that most of the issues from my comment at #67090 (review) are still present (in particular the first, "We seem to have a double confirmation", and the third, "This is being applied to Jetpack too")?

Also noticed that the messaging seems backwards between refundable and non-refundable cancellations:

  1. I saw this when cancelling a refundable subscription (where it's actually going to be removed immediately, not "once it expires"):

refundable

  1. And this when cancelling a non-refundable subscription (which is actually going to just turn off auto-renew, not remove anything right away):

non-refundable

Seems like it should be the other way around.

Also in the above screenshots, I thought "Best in-class hosting" wasn't supposed to be there anymore (since they aren't losing their hosting)?

And in the first screenshot, "custom domain as primary"... I saw that message even though I don't have a custom domain. Also, even if I did have one, the wording seems pretty confusing to me.

@DavidRothstein I updated the PR, the extra step will be present as per the comment: #68067 (comment)", I updated the checks for the site having primary domain and removed the hosting. I tested Jetpack subscriptions via jurassic-ninja and it should be fine.

@DavidRothstein
Copy link
Contributor

I did another round of brief testing.

I tested Jetpack subscriptions via jurassic-ninja and it should be fine.

For me, the modal is still appearing for Jetpack. Note that you do need to purchase a Jetpack plan to see this (or I think they're calling it "bundle" now) -- for example Jetpack Security, as shown in my original screenshot. A Jetpack product does not have the problem.

"once it expires"

I'm not seeing this text appear at all anymore (even when cancelling a nonrefundable subscription, where it's supposed to appear)?

the extra step will be present as per the comment: #68067 (comment)

The behavior I see now doesn't seem to match that comment -- the extra step is present for me in both cases (not just the refundable case)?

Anyway, I guess I can see the logic of having a two-step confirmation for now (maybe even in both cases). The two steps do provide different information. However, there is also a fair amount of duplicate information if you just keep the second screen exactly as is (for example, the "Plan Features" link on the second screen completely duplicates the first screen). And the biggest thing that feels extremely disjointed is jumping in and out of the modal. You click to cancel, see a modal, click to continue, jump out of the modal, click to continue, and now go into a different kind of modal (full-screen-style) where you get a survey, etc... Couldn't we have both steps of the confirmation inside the modal instead?

And in the first screenshot, "custom domain as primary"... the wording seems pretty confusing to me.

It still seems confusing to me. The full context here being:

If you cancel your plan, you will lose:
-Your custom domain as primary. Your traffic will be redirected to example.wordpress.com

I don't think most people will understand what that means. Whereas the current wording that this is replacing (#39909 shows an almost-accurate screenshot) uses more basic terminology. Couldn't we use something more like that? Perhaps:

If you cancel your plan, you will lose:
-The ability to have example.com as your primary site address. example.wordpress.com will be the new address that people see when they visit your site.

It's longer, but this is a complicated and important concept, and it should be OK to explain it using enough words to make it clear.

@ciprianimike
Copy link
Contributor Author

For me, the modal is still appearing for Jetpack. Note that you do need to purchase a Jetpack plan to see this (or I think they're calling it "bundle" now) -- for example Jetpack Security, as shown in my original screenshot. A Jetpack product does not have the problem.

I pushed a fix, before only Jetpack products were excluded, now alsp Jetpack plans.

@ciprianimike
Copy link
Contributor Author

"once it expires"

I'm not seeing this text appear at all anymore (even when cancelling a nonrefundable subscription, where it's supposed to appear)?

the extra step will be present as per the comment: #68067 (comment)

The behavior I see now doesn't seem to match that comment -- the extra step is present for me in both cases (not just the refundable case)?

This text should be now visible only for all modals but subscriptions in the refund window.

@ciprianimike ciprianimike force-pushed the update/pre-cancelation-modal-new branch from b1beb7e to d635122 Compare October 12, 2022 15:03
@DavidRothstein
Copy link
Contributor

I tested again and am still seeing some of the previously-mentioned problems, in particular:

  • For a non-refundable subscription with auto-renew on, going through the cancellation flow still results in the plan being removed rather than auto-renew being turned off.
  • Although the intro paragraph is now displaying in the modal (that part is fixed) I'm seeing the wrong message in the case of a removable subscription: "If you cancel your plan, once it expires, you will lose" rather than "If you remove your plan, you will lose". It looks like issue I mentioned before (where the translated string is not being assigned to the subTitle variable) was not fixed.

the jumping in and out of different modals while cancelling still seems disjointed to me.

I'm progressing on the work for this case: pebzTe-f6-p2 it will be covered by a different PR and this should be the only disjointed case. For all the other cases the Cancellation Modal shows the survey form without disjunctions.

It's currently happening for any plan cancellation within the refund window (the link you provided is for the case where there's a plan and domain, which is pretty common in its own right, but is not the only case).

Here's a video showing the behavior for cancelling just a plan (no domain involved):

cancel-refundable-plan.mp4

What is the rationale for fixing that flow as a followup, rather than launching this with the intended experience in place to begin with? If the goal is to get something out sooner, would it be better to just release the modal for the non-refundable case only to start (and then hold off on the refundable case until it's actually ready)?

Regarding the non-refundable case, this pull request is indeed replacing the old screen with the new modal, which is good. Comparing them below, I do see two things that have gone missing that may be important:

  1. The "Ask a Happiness Engineer" link -- do we really want to remove that? I would guess it is useful to give people an easy way to contact us if they're thinking of cancelling. And it seems like it would be pretty easy to put that in the modal.
  2. The "subscription will be removed on October 12, 2023" text, although not critical, seems like it provides useful information that allows the person to understand what will happen. Do we want to consider changing the text in the modal to something like: "If you cancel your plan, once it expires (on October 12, 2023) you will lose"?

Old cancel confirmation:

old-cancel-page

New cancel confirmation:

new-cancel-modal

@michaeldcain
Copy link
Member

This is being broken down into smaller diffs per this post: pebzTe-oH-p2

I'm going to make this a draft PR so that we'll get pinged if it ever gets changed back.

@michaeldcain michaeldcain marked this pull request as draft October 18, 2022 16:18
@a8ci18n
Copy link

a8ci18n commented Oct 20, 2022

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants