Skip to content

New purchase cancelation dialog #67090

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

Closed
wants to merge 512 commits into from
Closed

Conversation

ciprianimike
Copy link
Contributor

@ciprianimike ciprianimike commented Aug 29, 2022

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.

Before

before

After

Pmtriv.mp4

Issue

Related to 1039-gh-Automattic/martech

@ciprianimike ciprianimike requested review from taggon and ddc22 August 29, 2022 10:15
@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 Aug 29, 2022
@github-actions
Copy link

github-actions bot commented Aug 29, 2022

@matticbot
Copy link
Contributor

matticbot commented Aug 29, 2022

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

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

name           parsed_size           gzip_size
entry-stepper      +3036 B  (+0.1%)     +779 B  (+0.1%)

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

Sections (~2817 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
site-purchases                       +9872 B  (+0.7%)    +2817 B  (+0.8%)
purchases                            +9872 B  (+0.6%)    +2817 B  (+0.7%)
domains                              +9183 B  (+0.6%)    +2706 B  (+0.6%)
themes                               +3036 B  (+0.4%)     +781 B  (+0.4%)
theme                                +3036 B  (+0.6%)     +781 B  (+0.5%)
stats                                +3036 B  (+0.4%)     +781 B  (+0.4%)
signup                               +3036 B  (+0.7%)     +781 B  (+0.9%)
settings-writing                     +3036 B  (+0.4%)     +781 B  (+0.4%)
settings-security                    +3036 B  (+0.6%)     +781 B  (+0.6%)
settings-performance                 +3036 B  (+0.5%)     +781 B  (+0.5%)
settings                             +3036 B  (+0.4%)     +781 B  (+0.4%)
scan                                 +3036 B  (+0.4%)     +781 B  (+0.4%)
purchase-product                     +3036 B  (+1.6%)     +781 B  (+1.5%)
posts-custom                         +3036 B  (+0.5%)     +781 B  (+0.4%)
posts                                +3036 B  (+0.5%)     +781 B  (+0.4%)
plugins                              +3036 B  (+0.3%)     +781 B  (+0.3%)
plans                                +3036 B  (+0.3%)     +781 B  (+0.3%)
people                               +3036 B  (+0.5%)     +781 B  (+0.4%)
migrate                              +3036 B  (+0.7%)     +781 B  (+0.6%)
media                                +3036 B  (+0.2%)     +781 B  (+0.2%)
marketplace                          +3036 B  (+0.4%)     +781 B  (+0.4%)
marketing                            +3036 B  (+0.4%)     +781 B  (+0.4%)
jetpack-search                       +3036 B  (+0.7%)     +781 B  (+0.6%)
jetpack-connect                      +3036 B  (+0.3%)     +781 B  (+0.3%)
jetpack-cloud-settings               +3036 B  (+0.7%)     +781 B  (+0.6%)
jetpack-cloud-pricing                +3036 B  (+0.5%)     +781 B  (+0.5%)
jetpack-cloud-plugin-management      +3036 B  (+0.4%)     +781 B  (+0.3%)
jetpack-cloud-partner-portal         +3036 B  (+0.7%)     +781 B  (+0.6%)
jetpack-cloud-agency-dashboard       +3036 B  (+0.6%)     +781 B  (+0.5%)
hosting                              +3036 B  (+0.5%)     +781 B  (+0.5%)
home                                 +3036 B  (+0.4%)     +781 B  (+0.4%)
help                                 +3036 B  (+0.4%)     +781 B  (+0.4%)
email                                +3036 B  (+0.5%)     +781 B  (+0.4%)
earn                                 +3036 B  (+0.5%)     +781 B  (+0.5%)
checkout                             +3036 B  (+0.2%)     +781 B  (+0.2%)
backup                               +3036 B  (+0.3%)     +781 B  (+0.3%)
activity                             +3036 B  (+0.4%)     +781 B  (+0.4%)
accept-invite                        +3036 B  (+0.6%)     +781 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 (~781 bytes added 📈 [gzipped])

name                                                              parsed_size           gzip_size
async-load-masterbar-cart-masterbar-cart-wrapper                      +3036 B  (+1.8%)     +781 B  (+1.5%)
async-load-design-playground                                          +3036 B  (+0.2%)     +781 B  (+0.2%)
async-load-design-blocks                                              +3036 B  (+0.1%)     +781 B  (+0.1%)
async-load-design                                                     +3036 B  (+0.2%)     +781 B  (+0.2%)
async-load-calypso-reader-sidebar                                     +3036 B  (+2.0%)     +781 B  (+1.9%)
async-load-calypso-post-editor-editor-media-modal                     +3036 B  (+0.2%)     +781 B  (+0.2%)
async-load-calypso-my-sites-current-site-stale-cart-items-notice      +3036 B  (+3.5%)     +781 B  (+3.5%)
async-load-calypso-my-sites-current-site-notice                       +3036 B  (+2.7%)     +781 B  (+2.7%)
async-load-calypso-components-web-preview-component                   +3036 B  (+0.5%)     +781 B  (+0.5%)
async-load-calypso-blocks-jitm-templates-sidebar-banner               +3036 B  (+3.1%)     +781 B  (+3.1%)
async-load-calypso-blocks-jitm-templates-notice                       +3036 B  (+3.1%)     +781 B  (+3.0%)
async-load-calypso-blocks-jitm-templates-default                      +3036 B  (+3.1%)     +781 B  (+3.1%)
async-load-calypso-blocks-inline-help-popover                         +3036 B  (+0.5%)     +781 B  (+0.4%)
async-load-calypso-blocks-editor-checkout-modal                       +3036 B  (+0.3%)     +781 B  (+0.3%)
async-load-automattic-help-center                                     +3036 B  (+0.5%)     +781 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.

Copy link
Contributor

@ddc22 ddc22 left a comment

Choose a reason for hiding this comment

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

Approach looks good and I left some comments. Also add a screenshot if possible 👍

@@ -360,6 +388,7 @@ class RemovePurchase extends Component {
<Gridicon className="card__link-indicator" icon="trash" />
</Wrapper>
{ this.shouldShowNonPrimaryDomainWarning() && this.renderNonPrimaryDomainWarningDialog() }
{ this.shouldShowPlanWarning() && this.renderPlanWarningDialog() }
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not normally with this pattern of multiple render functions inside a component, but that seems to be the current approach of this file.
Personally I like to see a declarative component tree with lot's of ternaries and conditional logic which is much more readable at a glance. But YMMV.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was fixed


import './style.scss';

class RemovePlanDialog extends Component {
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it's better to use function components instead of class components. For one it's less code/boilerplate all round and its much simpler to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines 1 to 3
.non-primary-domain-dialog {
max-width: 500px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a prop called isFullScreen maybe you can utilize that prop here.

Also the guide to style the dialog component can be found in the docs.
https://wpcalypso.wordpress.com/devdocs/packages/components/src/dialog/README.md?term=Dialog

@ciprianimike ciprianimike added the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Sep 6, 2022
@a8ci18n
Copy link

a8ci18n commented Sep 6, 2022

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7513450

Thank you @ciprianimike for including a screenshot in the description! This is really helpful for our translators.

@ciprianimike ciprianimike marked this pull request as ready for review September 6, 2022 15:11
@ciprianimike ciprianimike requested a review from a team as a code owner September 6, 2022 15:11
Copy link
Contributor

@DavidRothstein DavidRothstein left a comment

Choose a reason for hiding this comment

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

I'm not sure how far along this is, but I tried it and the main thing I noticed is that I couldn't trigger it in the way I expected to:

  • Purchased a plan
  • Visited the purchase management page
  • Clicked "Cancel Subscription and Refund" to remove the plan
  • Didn't see the dialog anywhere during the process of removing the plan

In order to see it, I needed a plan that was no longer refundable and that already had auto-renew disabled (in other words, was already "cancelled" in some sense). Then I saw the dialog when I went to completely remove the subscription afterwards. Is that expected?

Also noticed that when I tried to remove a Pro plan, the feature list is missing:

pro-plan

I assume we should add a feature list for Pro and Starter (since there are plenty of those around that people might cancel), but either way, there should also be a fallback where if an unrecognized plan is being cancelled, the "If you cancel your plan, you will lose" sentence doesn't display.

const freeDomainFirstYear = String( translate( 'Your free domain for the first year' ) );
const freeDomain = String(
translate( 'Your free domain www.%(slug)s', {
args: { slug: domainSlug },
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really understand the above wording.... We don't take away anyone's domain when they cancel the plan. We might subtract its cost from their refund (if the plan is within the refund window and the domain isn't) but that would be in the refund flow, which is different than the main flow you're in here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

domains labels and logic were removed in the design vTj2aknM6tRUQndWtOcURT-fi-445%3A10488

} )
);
const bestInClassHosting = String( translate( 'Best-in-class hosting' ) );
const addFreeSite = String( translate( 'An add-free site' ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be "ad-free"

Copy link
Contributor Author

@ciprianimike ciprianimike Sep 13, 2022

Choose a reason for hiding this comment

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

this was fixed, the copy structure refatore, see

I'm not sure how far along this is, but I tried it and the main thing I noticed is that I couldn't trigger it in the way I expected to:

  • Purchased a plan
  • Visited the purchase management page
  • Clicked "Cancel Subscription and Refund" to remove the plan
  • Didn't see the dialog anywhere during the process of removing the plan

In order to see it, I needed a plan that was no longer refundable and that already had auto-renew disabled (in other words, was already "cancelled" in some sense). Then I saw the dialog when I went to completely remove the subscription afterwards. Is that expected?

Also noticed that when I tried to remove a Pro plan, the feature list is missing:

pro-plan

I assume we should add a feature list for Pro and Starter (since there are plenty of those around that people might cancel), but either way, there should also be a fallback where if an unrecognized plan is being cancelled, the "If you cancel your plan, you will lose" sentence doesn't display.

The logic changed, the modal now support subscription and you should be able to access the modal consistently.
PRO and Starte plans were added.
Copy is updated and moved to https://github.com/Automattic/wp-calypso/pull/67090/files#diff-8f9fb14a44111dd55e67d9462573bf9233849ac1d9a77bf65b56e1f6ce22d384

const collectPayments = String( translate( 'The ability to collect payments' ) );
const emailCustomerSupport = String( translate( 'Unlimited customer support via email' ) );
const liveChat = String( translate( 'Access to live chat support' ) );
const earnAndRevenue = String( translate( 'The ability to earn and revenue' ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that's supposed to be "earn ad revenue"?

const analyticsIntegration = String( translate( 'Google Analytics integration' ) );
const accessPlugins = String( translate( 'Access to more than 50,000 plugins' ) );
const seoTools = String( translate( 'Advanced SEO tools' ) );
const automatedBackups = String( translate( 'Automated site backupsand one-click restore' ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo, "backupsand"

const accessPlugins = String( translate( 'Access to more than 50,000 plugins' ) );
const seoTools = String( translate( 'Advanced SEO tools' ) );
const automatedBackups = String( translate( 'Automated site backupsand one-click restore' ) );
const sftpAndDatabase = String( translate( 'SFTP and Database access' ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure "Database" should be capitalized there.

automatedBackups,
sftpAndDatabase,
bestInClassHosting,
liveChat,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does liveChat belong here? It's not listed for the other monthly plans, and seems to contradict https://wordpress.com/pricing/.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Features were updated in the design vTj2aknM6tRUQndWtOcURT-fi-445%3A10488

action: 'removePlanAndAllSubscriptions',
label: translate( 'Cancel my plan', {
comment:
'This button removes the active plan and all active Marketplace subscriptions on the site',
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what this has to do with marketplace subscriptions or removePlanAndAllSubscriptions. I think it just removes the plan and nothing else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was updated

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm still seeing the reference to "marketplace subscription" in the above comment, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, I'm also seeing it. @ciprianimike maybe the commit isn't pushed?
Either way, I don't think we need this translator comment, since "Cancel my plan" has already been translated in other places since 2 years ago: https://translate.wordpress.com/projects/wpcom/-all-translated/282389/ . So let's remove this comment entirely :)

const shouldUseSiteThumbnail =
isComingSoon === false && isPrivate === false && launchedStatus === true;
const withinFirstYear =
site.options.created_at !== undefined ? dateWithinLastYear( site.options.created_at ) : false;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure what the site creation date has to do with anything.... Are you actually trying to figure out if their custom domain is more than a year old, maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part is deprecated as the design changed and there are no more domains involved.

isComingSoon === false && isPrivate === false && launchedStatus === true;
const withinFirstYear =
site.options.created_at !== undefined ? dateWithinLastYear( site.options.created_at ) : false;
const hasDomain = site.URL !== undefined && site.URL === site.options.unmapped_url ? false : true;
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be checking whether the site has a custom primary domain? Doesn't seem like what you want here. My guess is you want to know something more along the lines of whether they used their domain credit and still have the domain they used it on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part is deprecated as the design changed and there are no more domains involved.

@@ -211,6 +222,23 @@ class RemovePurchase extends Component {
);
}

shouldShowPlanWarning() {
const { isAtomicSite, purchase } = this.props;
return isPlan( purchase ) && ! isAtomicSite;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not for Atomic sites?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was fixed

Copy link
Contributor

@ddc22 ddc22 left a comment

Choose a reason for hiding this comment

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

I did a quick run through the PR. I will have a look again but left some feedback.

Comment on lines 32 to 49
const bestInClassHosting = String( translate( 'Best-in-class hosting' ) );
const addFreeSite = String( translate( 'An add-free site' ) );
const collectPayments = String( translate( 'The ability to collect payments' ) );
const emailCustomerSupport = String( translate( 'Unlimited customer support via email' ) );
const liveChat = String( translate( 'Access to live chat support' ) );
const earnAndRevenue = String( translate( 'The ability to earn and revenue' ) );
const premiumThemes = String( translate( 'Access to premium themes' ) );
const analyticsIntegration = String( translate( 'Google Analytics integration' ) );
const accessPlugins = String( translate( 'Access to more than 50,000 plugins' ) );
const seoTools = String( translate( 'Advanced SEO tools' ) );
const automatedBackups = String( translate( 'Automated site backupsand one-click restore' ) );
const sftpAndDatabase = String( translate( 'SFTP and Database access' ) );
const acceptPayments = String( translate( 'Accept payments in 60+ countries' ) );
const shippingCarriers = String( translate( 'Integration with top shipping carriers' ) );
const premiumDesign = String(
translate( 'Premium design options customized for online stores' )
);
const more = String( translate( 'and more' ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to cast this result to string?

Copy link
Member

@sirbrillig sirbrillig Sep 7, 2022

Choose a reason for hiding this comment

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

I think the reason is that translate() can be used to create interpolated React components, so its return type is TranslateResult (this is similar to ReactNode). This function returns string[], which is a sensible return value, since all of the translate() calls above will in fact only return strings, but TypeScript doesn't know that. The cast forces the results to be strings in case they are not. We do this in a lot of places.

title={ String( translate( 'Checkout modal' ) ) }

I learned recently that there's another way to do this which might be more semantic. The translate() method accepts an options object as its second parameter and that object can have the textOnly property. If set, TypeScript will know that the function will return a string.

alt={ translate( 'My Profile', { textOnly: true } ) }

So this line could be:

	const more = translate( 'and more', { textOnly: true } );

Copy link
Contributor

Choose a reason for hiding this comment

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

But can't we return TranslateResult[] and avoid all the confusion? @sirbrillig

Copy link
Member

Choose a reason for hiding this comment

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

Certainly, if you like. Sometimes that's the more useful fix.

Copy link
Contributor

Choose a reason for hiding this comment

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

I leave that judgment call to you @ciprianimike :) I am ok either way too 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jdc91 I see this approach used all over the codebase so I would keep it as it is for consistency, this is the reason why I used it

@@ -0,0 +1,257 @@
import {
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you thought about a different way to do this possibly by maintaining a matrix (2d array). So that these feature's are easier to maintain and are more readable?

//Plan Slugs
const BUSINESS_PLAN = "BUSINESS_PLAN";
const PREMIUM_PLAN = "PREMIUM_PLAN";
...

//Periods
const MONTHLY = "MONTHLY"
const YEARLY = "YEARLY"

const planMatrix = {
    "BUSINESS_PLAN" : {
        "MONTHLY" : [ bestInClassHosting, addFreeSite, collectPayments, emailCustomerSupport  ],
        "YEARLY" : [ ... ],
    },
     "PREMIUM_PLAN" : {
        "MONTHLY" : [ ... ],
        "YEARLY" : [ ... ],
    },
    ...
}

And you can do a final processing on the resulting array to figure out the domain related stuff. :)
This can possibly reduce some repetitive logic as well.

Copy link
Member

@michaeldcain michaeldcain Sep 7, 2022

Choose a reason for hiding this comment

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

@ciprianimike: Can most of the typos and maintenance concerns be addressed by using and/or extending @automattic/calypso-products/plans-list and adding something along the lines of getCancellationFlowFeatures()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The cancellation flow feature list is now integrate in the @automattic/calypso-products/plans-list as requested

$modal-breakpoint-tablet: 1070px;
$modal-breakpoint-mobile: 480px;

.dialog__content.remove-plan-dialog {
Copy link
Contributor

Choose a reason for hiding this comment

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

All of the code in this sass file can be moved under this class there is no need to repeat this class on 17 and 132 and 138 can also be brought within this class to maintain a clear inheritance structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This request was addressed

align="left"
/>
<p>{ translate( 'If you cancel your plan, you will lose:' ) }</p>
<FeaturesList />
Copy link
Contributor

Choose a reason for hiding this comment

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

nit : this can just be shown inline :)

*/
const buttons = [
{
action: 'cancel',
Copy link
Member

Choose a reason for hiding this comment

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

A bit of a nitpick, but does this action need to be "cancel"? Since the primary action here is to "cancel my plan", it can be misleading.

<ul className="remove-plan-dialog__list-plan-features">
{ planFeatures.map( ( feature, index ) => {
return (
<li key={ index }>
Copy link
Member

Choose a reason for hiding this comment

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

It might be fine here, but in general, using index as a key is an anti-pattern.

Copy link
Member

Choose a reason for hiding this comment

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

Good find. In this case feature should be a unique string so we can probably use that instead!

buttons={ buttons }
className={ dialogClassName }
isVisible={ isDialogVisible }
onClose={ closeDialog }
Copy link
Member

Choose a reason for hiding this comment

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

It would be a good idea to include some Tracks events with any user actions in this dialog.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch! Yes please, let's add Tracks events so we can measure user interaction in this dialog 🙏

@@ -352,16 +380,29 @@ class RemovePurchase extends Component {

const wrapperClassName = classNames( 'remove-purchase__card', className );
const Wrapper = useVerticalNavItem ? VerticalNavItem : CompactCard;
const getWarningDialog = () => {
if ( this.shouldShowPlanWarning() ) {
return this.renderPlanWarningDialog();
Copy link
Member

Choose a reason for hiding this comment

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

Does the plan warning dialog cover the same information in the non-primary domain warning dialog below? Since you're overriding the dialog, I think we need to let users with the hasNonPrimaryDomainsFlag flag and a custom domain know that their site will be redirected to the simple site address on removal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JanaMW27 can you take a look at this case?

Copy link

@JanaMW27 JanaMW27 Sep 14, 2022

Choose a reason for hiding this comment

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

Yes, here is the solution: pebzTe-gw-p2

@ciprianimike ciprianimike removed the [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging label Sep 8, 2022
gcsecsey and others added 2 commits September 8, 2022 14:20
* remove feature flag guard from WP.org plugin search

* Revert "remove feature flag guard from WP.org plugin search"

This reverts commit 5ed4719.

* update `marketplace-jetpack-plugin-search` to true on all environments
@a8ci18n
Copy link

a8ci18n commented Sep 8, 2022

Translation for this Pull Request has now been finished.

andrii-lysenko and others added 3 commits September 8, 2022 15:46
…eeding an update (#67525)

* Don't update up-to-date plugins

* Don't update up-to-date plugins when retrying and on clicking on update

Co-authored-by: Yashwin <[email protected]>
@ciprianimike ciprianimike removed the request for review from taggon September 8, 2022 16:25
ciprianimike and others added 5 commits September 8, 2022 18:45
* allow the Add Subscribers screen to be revisited

* fix typo

* change styling to match mockup

* simplify styles

* simplify dynamic classnames

* simplify dynamic classnames

* use goToStep instead of actionUrl
* Correct uses of stylelint disable

When using "stylelint-disable-line" with no scope, autofix
does not work. As a result, we MUST scope every disable line
in order for autofix to work on the rest of the file.

* Replace standalone 'stylelint-disable' with 'stylelint-disable-line'

* Fix uses of disable-next-line
@ciprianimike ciprianimike requested review from a team September 20, 2022 04:40
@ciprianimike ciprianimike requested review from noahtallen and a team as code owners September 20, 2022 04:40
@ciprianimike ciprianimike requested a review from a team September 20, 2022 04:40
@ciprianimike ciprianimike requested a review from a team as a code owner September 20, 2022 04:40
@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 on your sandbox.

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

@JessBoctor
Copy link
Contributor

I did a functional review of this, and it seems to work as expected now. I tested each of the plans on my test account. This included:

  • Blogger
  • Personal
  • Starter
  • Premium
  • Pro
  • Business
  • Ecommerce

GH67090-Remove-Plan

Some minor observations:

  1. On the Blogger plan, it looks like the check for site features works now. Nothing was shown except the confirmation for cancelling the plan:

GH67090-Blogger-cancel

  1. I am not sure if this is related to this PR: On plans which have the preview of the site showing in the cancellation dialogue (it looks like these are Public sites), the previews were all blurry for me. This happened each time I clicked on the Remove link for a public sites.

GH67090-eCommerce-Preview-Cancel

  1. In the dialogues that have the And more... option, would it make sense to link that to the plan features page? That way, the customer can easily find what those additional features are.

GH67090-Pro-Cancel-MoreLink

@ciprianimike
Copy link
Contributor Author

I did a functional review of this, and it seems to work as expected now. I tested each of the plans on my test account. This included:

  • Blogger
  • Personal
  • Starter
  • Premium
  • Pro
  • Business
  • Ecommerce

GH67090-Remove-Plan GH67090-Remove-Plan

Some minor observations:

  1. On the Blogger plan, it looks like the check for site features works now. Nothing was shown except the confirmation for cancelling the plan:
GH67090-Blogger-cancel
  1. I am not sure if this is related to this PR: On plans which have the preview of the site showing in the cancellation dialogue (it looks like these are Public sites), the previews were all blurry for me. This happened each time I clicked on the Remove link for a public sites.
GH67090-eCommerce-Preview-Cancel
  1. In the dialogues that have the And more... option, would it make sense to link that to the plan features page? That way, the customer can easily find what those additional features are.
GH67090-Pro-Cancel-MoreLink

@JessBoctor there's a new PR since I corrupted this one (100 my bad). About your points:

  1. I'm working on a fix for the Blogger plan
  2. I'll check the blur image, in the meanwhile can you provide more details? Were you testing on your local environment? Were you using the sandbox?
  3. I suppose this can be postponed, I'd ask @JanaMW27 's opinion about this

@JanaMW27
Copy link

Regarding point 3, the priority is to ship the modal, we can improve it once v1 is live

@mreishus
Copy link
Contributor

mreishus commented Sep 23, 2022

I think something strange happened with the latest update of this branch. Github is showing 512 commits and 2,082 files changed:
2022-09-23_11-15
I believe this represents all the changes made to calypso in the last 3-4 weeks.

The latest commit has two parents (it's a merge, not a rebase), and its comments mention both "merge" and "rebase". If I check the lineage in tig, the two parents it is merging look to be two copies of the same series of commits, but those have different parents:

2022-09-23_11-24

The parent of the left side is 254d863 from 2022-09-19, the parent of the right side is 94dcdfa from 2022-08-29.

I'm not yet sure if this represents an actual danger upon merging, or if it's only confusing github's change detection.

My current hypothesis is that the branch was rebased, and then the rebased commit was merged with the unrebased branch (instead of being force pushed). Remedition would be to force push the most recent commit on the rebased side as the branch. fd19d9e
See: update/pre-cancelation-modal-2 #68222 for the results of this

@ciprianimike
Copy link
Contributor Author

I think something strange happened with the latest update of this branch. Github is showing 512 commits and 2,082 files changed: 2022-09-23_11-15 I believe this represents all the changes made to calypso in the last 3-4 weeks.

The latest commit has two parents (it's a merge, not a rebase), and its comments mention both "merge" and "rebase". If I check the lineage in tig, the two parents it is merging look to be two copies of the same series of commits, but those have different parents:

2022-09-23_11-24

The parent of the left side is 254d863 from 2022-09-19, the parent of the right side is 94dcdfa from 2022-08-29.

I'm not yet sure if this represents an actual danger upon merging, or if it's only confusing github's change detection.

My current hypothesis is that the branch was rebased, and then the rebased commit was merged with the unrebased branch (instead of being force pushed). Remedition would be to force push the most recent commit on the rebased side as the branch. fd19d9e See: update/pre-cancelation-modal-2 #68222 for the results of this

@mreishus please refer to this PR #68067 as this was corrupted

@michaeldcain
Copy link
Member

@ciprianimike: if this is no longer being used, and you don't want to try @mreishus's fix above, then let's close it.

@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 27, 2022
@sirreal sirreal deleted the update/pre-cancelation-modal branch January 14, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.