wp-calypso icon indicating copy to clipboard operation
wp-calypso copied to clipboard

Modify Applied Coupon Code Copy and Hide Coupon Box

Open briowill opened this issue 1 year ago • 4 comments

PR Will require String Freeze

Related to # Project Thread https://wp.me/pau2Xa-6fe

Proposed Changes

Changes are related to project https://wp.me/pau2Xa-6fe. We will be running an AB Test to verify the impact of removing the coupon box area.

Summary of changes:

  1. Modify applied Coupon Code copy from mentioning Coupon code to "Offer Applied"
  2. Remove coupon box for users assigned to AB Test Treatment

Testing Instructions

How to assign self to treatment bucket To manually assign a variant to yourself or a test user, head over to your experiment’s overview page in ExPlat:

  • Go to details for experiment calypso_checkout_hide_coupon_box in ExPlat and click on the Overview tab.
  • Navigate to the Audience section and hover over the assignment group to be assigned.
  • Upon mouse hover, click on the link to be assigned that assignment group.
  1. Apply patch
  2. Navigate to checkout
  3. If you are assigned to the treatment you should not see the "Have a coupon?" link
image
  1. Embedded a coupon to the checkout URL ?coupon= and refresh.
  2. You should see "Offer Applied" listed where the Coupon code would have been image image

briowill avatar Aug 14 '24 06:08 briowill

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

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

name           parsed_size           gzip_size
entry-stepper       +203 B  (+0.0%)      +80 B  (+0.0%)
entry-main          +176 B  (+0.0%)      +60 B  (+0.0%)

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

Sections (~342 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
checkout                              +650 B  (+0.0%)     +230 B  (+0.0%)
write-flow                             +54 B  (+0.0%)       +9 B  (+0.0%)
videopress-flow                        +54 B  (+0.0%)       +9 B  (+0.0%)
themes                                 +54 B  (+0.0%)      +12 B  (+0.0%)
theme                                  +54 B  (+0.0%)       +9 B  (+0.0%)
staging-site                           +54 B  (+0.0%)      +12 B  (+0.0%)
settings-security                      +54 B  (+0.0%)       +8 B  (+0.0%)
settings-podcast                       +54 B  (+0.0%)       +6 B  (+0.0%)
settings-performance                   +54 B  (+0.0%)       +9 B  (+0.0%)
settings                               +54 B  (+0.0%)       +9 B  (+0.0%)
posts-custom                           +54 B  (+0.0%)       +9 B  (+0.0%)
posts                                  +54 B  (+0.0%)       +9 B  (+0.0%)
plugins                                +54 B  (+0.0%)      +12 B  (+0.0%)
media                                  +54 B  (+0.0%)      +11 B  (+0.0%)
marketing                              +54 B  (+0.0%)       +9 B  (+0.0%)
link-in-bio-tld-flow                   +54 B  (+0.0%)       +9 B  (+0.0%)
jetpack-cloud-plugin-management        +54 B  (+0.0%)      +12 B  (+0.0%)
hosting                                +54 B  (+0.0%)      +12 B  (+0.0%)
earn                                   +54 B  (+0.0%)      +13 B  (+0.0%)
domains                                +54 B  (+0.0%)       +9 B  (+0.0%)
build-flow                             +54 B  (+0.0%)       +9 B  (+0.0%)
activity                               +54 B  (+0.0%)       +8 B  (+0.0%)
gutenberg-editor                       +27 B  (+0.0%)       +9 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.

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

name                                                                              parsed_size           gzip_size
async-load-calypso-my-sites-checkout-modal                                            +7481 B  (+0.6%)    +2896 B  (+0.9%)
async-load-calypso-blocks-editor-checkout-modal                                       +7481 B  (+0.7%)    +2896 B  (+0.9%)
async-load-purchase-modal-wrapper                                                     +7025 B  (+2.0%)    +2750 B  (+2.5%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...      +7025 B  (+2.0%)    +2750 B  (+2.6%)
async-load-signup-steps-page-picker                                                    +194 B  (+0.1%)      +84 B  (+0.1%)
async-load-design-blocks                                                                +54 B  (+0.0%)       +9 B  (+0.0%)
async-load-calypso-reader-sidebar                                                       +54 B  (+0.0%)       +8 B  (+0.0%)
async-load-calypso-post-editor-editor-media-modal                                       +54 B  (+0.0%)      +20 B  (+0.0%)
async-load-calypso-my-sites-stats-summary                                               +54 B  (+0.1%)       +8 B  (+0.1%)
async-load-calypso-my-sites-current-site-notice                                         +54 B  (+0.1%)       +9 B  (+0.0%)
async-load-calypso-components-web-preview-component                                     +54 B  (+0.0%)       +9 B  (+0.0%)
async-load-calypso-blocks-jitm-templates-sidebar-banner                                 +54 B  (+0.1%)       +9 B  (+0.1%)
async-load-calypso-blocks-jitm-templates-notice                                         +54 B  (+0.1%)      +10 B  (+0.1%)
async-load-calypso-blocks-jitm-templates-default                                        +54 B  (+0.1%)       +8 B  (+0.1%)
async-load-signup-steps-design-picker                                                   +27 B  (+0.1%)       +7 B  (+0.0%)

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 avatar Aug 14 '24 06:08 matticbot

implemented a few A/B tests in Checkout earlier this year

Thanks for the reference and yes 😅 this would over complicate the PR

briowill avatar Aug 23 '24 07:08 briowill

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

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

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

a8ci18n avatar Aug 28 '24 22:08 a8ci18n

The failing E2E tests are showing a secret decryption error. Can you try rebasing this PR?

aneeshd16 avatar Aug 29 '24 06:08 aneeshd16

Translation for this Pull Request has now been finished.

a8ci18n avatar Sep 02 '24 07:09 a8ci18n

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/hide-coupon-box-test on your sandbox.

matticbot avatar Sep 04 '24 16:09 matticbot