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

Allow free users with flag to set dotblog as primary #97200

Closed
wants to merge 2 commits into from

Conversation

aneeshd16
Copy link
Contributor

@aneeshd16 aneeshd16 commented Dec 7, 2024

Related to https://github.com/Automattic/martech/issues/3561

Proposed Changes

This PR contains 2 changes:

  • When the CAMPAIGN_PRIMARY_DOTBLOG_ON_FREE_2024 flag is set for a user, allow the user to select a .blog domain and a free plan in the onboarding flow, without showing any dialog.
  • When the CAMPAIGN_PRIMARY_DOTBLOG_ON_FREE_2024 flag is set for a user, allow the user to select a .blog domain as primary for a free site on the /domains/manage/<site slug> screen.

Why are these changes being made?

  • Please see p5uIfZ-gr1-p2

Testing Instructions

Testing the onboarding flow

  • Apply 168070-ghe-Automattic/wpcom
  • Set the flag for your user by following the instructions in 168070-ghe-Automattic/wpcom
  • Go to /start.
  • Select a .blog domain. For testing, it's best to select a domain with random characters.
  • On the plans step, select the Free plan.
  • Confirm that you are not shown any dialog and are taken directly to checkout.
  • If you don't have a .blog domain on the site, purchase it using credits for the next step.

Testing setting the .blog domain as primary

  • Apply 168070-ghe-Automattic/wpcom
  • Set the flag for your user by following the instructions in 168070-ghe-Automattic/wpcom
  • Go to /domains/manage/<site slug> where is for a site on the free plan with a .blog domain mapped to it.
  • Confirm that you see the dropdown for selecting a primary domain.
  • Confirm that you can set the .blog domain as primary by clicking on the CTA.
image

Testing to confirm that non .blog domains cannot be set as primary.

  • Map a non .blog domain to the same site.
  • Go to /domains/manage/<site slug>.
  • Confirm that you see the dropdown for selecting a primary domain and both the .blog and non-.blog domains are present in the list.
  • Select the non .blog domain.
  • Confirm that the CTA is disabled and a message is shown below it:
image

Testing for regressions

  • Delete the flag by following the instructions in 168070-ghe-Automattic/wpcom
  • Go to /domains/manage/<site slug> for the same site.
  • Confirm that the dropdown is not visible and you see a message for a plan upgrade.
image
  • Please see client/my-sites/domains/domain-management/components/primary-domain-selector/test/index.tsx for additional cases.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@aneeshd16 aneeshd16 requested a review from a team December 7, 2024 00:11
@aneeshd16 aneeshd16 self-assigned this Dec 7, 2024
@aneeshd16 aneeshd16 requested a review from southp December 7, 2024 00:11
@aneeshd16 aneeshd16 requested a review from a team as a code owner December 7, 2024 00:11
@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 Dec 7, 2024
@matticbot
Copy link
Contributor

matticbot commented Dec 7, 2024

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

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

name                   parsed_size           gzip_size
entry-stepper               +120 B  (+0.0%)      +57 B  (+0.0%)
entry-main                   +48 B  (+0.0%)      +49 B  (+0.0%)
entry-subscriptions          +24 B  (+0.0%)      +28 B  (+0.0%)
entry-login                  +24 B  (+0.0%)      +28 B  (+0.0%)
entry-domains-landing        +24 B  (+0.0%)      +28 B  (+0.0%)
entry-browsehappy            +24 B  (+0.0%)      +28 B  (+0.0%)

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

Sections (~932 bytes added 📈 [gzipped])

name                                parsed_size           gzip_size
domains                                  +656 B  (+0.0%)     +135 B  (+0.0%)
plugins                                  +484 B  (+0.0%)     +159 B  (+0.0%)
plans                                    +471 B  (+0.0%)     +175 B  (+0.0%)
jetpack-app                              +471 B  (+0.1%)     +164 B  (+0.1%)
update-design-flow                       +368 B  (+0.0%)     +125 B  (+0.0%)
link-in-bio-tld-flow                     +344 B  (+0.0%)     +115 B  (+0.0%)
signup                                    +88 B  (+0.0%)      +44 B  (+0.1%)
site-purchases                            +51 B  (+0.0%)      +32 B  (+0.0%)
site-overview                             +51 B  (+0.0%)      +34 B  (+0.0%)
purchases                                 +51 B  (+0.0%)      +32 B  (+0.0%)
hosting                                   +51 B  (+0.0%)      +34 B  (+0.0%)
copy-site-flow                            +51 B  (+0.0%)      +49 B  (+0.0%)
checkout                                  +51 B  (+0.0%)      +29 B  (+0.0%)
onboarding-flow                           +48 B  (+0.3%)      +16 B  (+0.3%)
with-theme-assembler-flow                 +24 B  (+0.0%)      +15 B  (+0.1%)
update-options-flow                       +24 B  (+0.0%)      +15 B  (+0.2%)
trial-wooexpress-flow                     +24 B  (+0.0%)      +12 B  (+0.2%)
tailored-ecommerce-flow                   +24 B  (+0.0%)      +14 B  (+0.2%)
start-writing-flow                        +24 B  (+0.1%)      +14 B  (+0.2%)
site-setup-wg                             +24 B  (+0.0%)      +13 B  (+0.1%)
site-setup-flow                           +24 B  (+0.0%)      +13 B  (+0.1%)
site-migration-flow                       +24 B  (+0.0%)      +14 B  (+0.1%)
reblogging-flow                           +24 B  (+0.4%)      +17 B  (+0.9%)
readymade-template-flow                   +24 B  (+0.0%)      +11 B  (+0.0%)
newsletter-flow                           +24 B  (+0.1%)      +14 B  (+0.3%)
new-hosted-site-flow-user-included        +24 B  (+0.4%)      +12 B  (+0.6%)
new-hosted-site-flow                      +24 B  (+0.2%)      +11 B  (+0.4%)
migration-signup                          +24 B  (+0.0%)      +13 B  (+0.2%)
migration-flow                            +24 B  (+0.0%)      +14 B  (+0.1%)
import-flow                               +24 B  (+0.0%)      +14 B  (+0.1%)
hosted-site-migration-flow                +24 B  (+0.0%)      +14 B  (+0.1%)
free-post-setup-flow                      +24 B  (+0.0%)      +17 B  (+0.3%)
entrepreneur-flow                         +24 B  (+0.0%)      +18 B  (+0.1%)
design-first-flow                         +24 B  (+0.1%)      +12 B  (+0.2%)
connect-domain                            +24 B  (+0.1%)       +9 B  (+0.1%)
assembler-first-flow                      +24 B  (+0.0%)      +16 B  (+0.1%)
ai-assembler-flow                         +24 B  (+0.0%)      +16 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.

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

name                                                      parsed_size           gzip_size
async-load-signup-steps-plans-theme-preselected                +256 B  (+0.1%)      +85 B  (+0.1%)
async-load-signup-steps-plans                                  +256 B  (+0.1%)      +85 B  (+0.1%)
async-load-signup-steps-domains                                -164 B  (-0.0%)      -62 B  (-0.0%)
async-load-calypso-blocks-product-purchase-features-list       -164 B  (-0.3%)      -58 B  (-0.5%)
async-load-design-blocks                                        +51 B  (+0.0%)      +25 B  (+0.0%)
async-load-calypso-my-sites-checkout-modal                      +51 B  (+0.0%)      +29 B  (+0.0%)
async-load-calypso-blocks-editor-checkout-modal                 +51 B  (+0.0%)      +29 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.

@jeyip
Copy link
Contributor

jeyip commented Dec 16, 2024

Testing

Requirements

/start flow:

  • Confirm that you are not shown any dialog and are taken directly to checkout.
  • If you don't have a .blog domain on the site, purchase it using credits for the next step.
  • Go to /domains/manage/ where is for a site on the free plan with a .blog domain mapped to it.
  • Confirm that you see the dropdown for selecting a primary domain.
  • Confirm that you can set the .blog domain as primary by clicking on the CTA.
  • Confirm that non .blog domains cannot be set as primary.
  • Delete the flag by following the instructions in D168070-code. Go to /domains/manage/ for the same site. Confirm that the dropdown is not visible and you see a message for a plan upgrade.
    image

Browsers

  • Chrome

@jeyip
Copy link
Contributor

jeyip commented Dec 16, 2024

Pausing testing because, for the time being, the project has been cancelled p1734369952367629-slack-C082K0YF2G6

@aneeshd16
Copy link
Contributor Author

@aneeshd16 aneeshd16 closed this Dec 16, 2024
@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 Dec 16, 2024
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.

3 participants