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

Add default payment block plan name #66338

Merged
merged 2 commits into from
Aug 8, 2022
Merged

Conversation

dsas
Copy link
Contributor

@dsas dsas commented Aug 8, 2022

Proposed Changes

When adding a new payment plan for the Jetpack Payment Button block to
use, the plan name will update depending upon the payment options
selected - whether it's a donation and what the payment frequency is.

This aids users in naming their plans appropriately. Making the form
faster to fill in accurately.

If the user explicitly chooses a name that differs from one of the
possible defaults, then that is respected and not overwritten.

Testing Instructions

  1. Use the generated calypso preview link
  2. On a site with a paid plan, go to Tools -> Earn in the menu
  3. If you haven't already, follow the CTA to connect Stripe
  4. Use 'Manage Payment Button' button
  5. In the 'Manage Plans' section click 'Payment plans'
  6. Press 'Add a new payment plan'
  7. Notice that the plan name is defaulted to Monthly Subscription
  8. Notice that as you use the donation and renewal frequency controls that it updates the plan name
  9. Enter a completely custom plan name, notice that using the donation and renewal frequency controls no longer updates the plan name
trim_jJSyOR.mp4

The below image shows the contents of the textbox with the title:
image

Pre-merge Checklist

Related to Automattic/jetpack#24074, it's essentially the Calypso version of Automattic/jetpack#25397

When adding a new payment plan for the Jetpack Payment Button block to
use, the plan name will update depending upon the payment options
selected - whether it's a donation and what the payment frequency is.

This aids users in naming their plans appropriately. Making the form
faster to fill in accurately.

If the user explicitly chooses a name that differs from one of the
possible defaults, then that is respected and not overwritten.
@dsas dsas self-assigned this Aug 8, 2022
@github-actions
Copy link

github-actions bot commented Aug 8, 2022

@matticbot
Copy link
Contributor

matticbot commented Aug 8, 2022

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

Sections (~93 bytes added 📈 [gzipped])

name  parsed_size           gzip_size
earn       +332 B  (+0.1%)      +93 B  (+0.1%)

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.

@dsas dsas marked this pull request as ready for review August 8, 2022 10:36
@dsas dsas requested a review from a team August 8, 2022 10:52
@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 8, 2022
@dsas dsas merged commit d6c5c53 into trunk Aug 8, 2022
@dsas dsas deleted the update/payment-button-product-names branch August 8, 2022 12:04
@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 Aug 8, 2022
@a8ci18n
Copy link

a8ci18n commented Aug 8, 2022

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

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

@a8ci18n
Copy link

a8ci18n commented Aug 18, 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants