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

Update Jetpack Cancellation form input #68999

Merged
merged 7 commits into from
Oct 18, 2022

Conversation

CodeyGuyDylan
Copy link
Contributor

@CodeyGuyDylan CodeyGuyDylan commented Oct 12, 2022

Proposed Changes

  • Add new answer for cancellation form: "I no longer need a website"
  • Add optional text field to all answers of the form
  • Make "Other" text field required so they have to fill out a reason before cancelling

Discussion

P2s:
p1HpG7-hcM-p2
p1HpG7-hzP-p2
pbNhbs-3MF-p2

Asana:
1161179020265237-as-1202940054684628/f

Testing Instructions

  1. Checkout this branch via git switch update/jetpack-cancellation-form-input
  2. Purchase any Jetpack plan on whichever site you would like.
  3. Start Jetpack Cloud via yarn start-jetpack-cloud
  4. Go to http://jetpack.cloud.localhost:3000/purchases/subscriptions/{site}
  5. Select a subscription and then select "Remove Subscription"
    Screen Shot 2022-10-12 at 1 30 34 PM
  6. Select "Next Step"
    Screen Shot 2022-10-12 at 11 01 42 AM
  7. Go through and select all of the answers, and notice the optional text field that shows up underneath them. Also notice the "Remove Subscription" button is NOT disabled or greyed out. Also notice the new "I no longer need a website" answer
    image
  8. Select "Other" and notice the different wording and the "(required)" indicator
    image
  9. With "Other" selected and the text box empty, notice that the "Remove Subscription" button is greyed out and disabled
    image
  10. Type some text into the "Other" text field and notice the "Remove Subscription" button become enabled and its regular color
    image
  11. Test the survey on mobile and desktop to make sure the layout looks good in all widths.
  12. Next, cancel the jetpack cloud local environment and start regular calypso via yarn start
  13. Navigate to http://calypso.localhost:3000/me/purchases/{site}/
  14. Repeat steps 5-11 on this page to test out Calypso Blue. The behavior should be exactly the same except the "Remove Subscription" button will stay "Next Step" instead
    image

Pre-merge Checklist

@github-actions
Copy link

github-actions bot commented Oct 12, 2022

@matticbot
Copy link
Contributor

matticbot commented Oct 12, 2022

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

Sections (~17 bytes added 📈 [gzipped])

name            parsed_size           gzip_size
site-purchases       +115 B  (+0.0%)      +17 B  (+0.0%)
purchases            +115 B  (+0.0%)      +17 B  (+0.0%)
domains              +115 B  (+0.0%)      +17 B  (+0.0%)

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

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.

@CodeyGuyDylan CodeyGuyDylan marked this pull request as draft October 12, 2022 17:28
@CodeyGuyDylan CodeyGuyDylan marked this pull request as ready for review October 12, 2022 19:24
@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 Oct 13, 2022
@IanRamosC IanRamosC self-requested a review October 17, 2022 19:07
Copy link
Contributor

@IanRamosC IanRamosC left a comment

Choose a reason for hiding this comment

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

Tests well! I left one minor comment, but that's not a blocker.


// Disable continuation button if "Other" is selected but no reason is written in
useEffect( () => {
if ( surveyAnswerId === 'another-reason' && surveyAnswerText === '' ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about doing something like
if ( surveyAnswerId === 'another-reason' && surveyAnswerText.trim() === '' )
in order to avoid people leaving blank spaces as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good thinking, I'll add that

rest: 'Please share any additional details.',
};

describe( 'JetpackCancellationSurvey', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice working adding tests.

@CodeyGuyDylan CodeyGuyDylan force-pushed the update/jetpack-cancellation-form-input branch from 3f3caec to 6b99d88 Compare October 17, 2022 20:25
Copy link
Contributor

@IanRamosC IanRamosC left a comment

Choose a reason for hiding this comment

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

:shipit:

@IanRamosC IanRamosC added [Status] Reviewer Approved and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Oct 18, 2022
@CodeyGuyDylan CodeyGuyDylan merged commit da5b2bb into trunk Oct 18, 2022
@CodeyGuyDylan CodeyGuyDylan deleted the update/jetpack-cancellation-form-input branch October 18, 2022 14:22
@a8ci18n
Copy link

a8ci18n commented Oct 18, 2022

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

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

@a8ci18n
Copy link

a8ci18n commented Oct 27, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants