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

Implement the dotlink version of Link in Bio flow on Stepper #71204

Merged
merged 15 commits into from
Dec 16, 2022

Conversation

southp
Copy link
Contributor

@southp southp commented Dec 14, 2022

Proposed Changes

This PR implements the dotlink version of Link in Bio flow on Stepper, aiming at completly replacing the previous /start/link-in-bio-tld. The TLD suffix is kept, since my understanding is that the possibilities of partnership with different TLDs are still there. The current implmentation is strictly .link only, but it should be enough to provide clues for a more general solution in the future.

Currently, the flow is implmeneted as interweaving of the signup framework and the Stepper framework, initiating from /start/link-in-bio-tld?tld=link. Unfortunately it has encountered an unsolvable issue given that approach(see p2-p4TIVU-akM). Overall the implementation is just:

  1. Add a new flow, LINK_IN_BIO_TLD_FLOW
  2. Add the required boilerplate code for making it functional like the regular Link in Bio flow.
  3. Configure link as promoTlds and managedSubdomains*** props.

By doing so, it also means there are some janitorial tasks that has to be done, and they will be completed by follow-up PRs to keep the scope of this PR. See 1348-gh-Automattic/martech.

Among testing, I've also found a few back-navigation issues:

However, they are more of the general issues that need to happen at the framework level, so this PR won't address them.

Testing Instructions

  1. Access the flow via /setup/link-in-bio-tld
  2. Go through the whole flow. It should be: domains -> users -> (brief processing screen from the signup framework) -> patterns -> Link in Bio site setup -> plans -> processing -> *checkout if there is anything in cart -> Launchpad
  3. At the domains step, note that there should be only link domain to choose from. The free w.link domain should have 2 options.
  4. In the end, you should create a Link in Bio site on w.link or .link successfully.

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 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-ajp-p2)?

Related to #

@southp southp self-assigned this Dec 14, 2022
@github-actions
Copy link

github-actions bot commented Dec 14, 2022

@southp southp requested a review from alshakero December 14, 2022 15:04
@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 14, 2022
Copy link
Member

@alshakero alshakero left a comment

Choose a reason for hiding this comment

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

Pretty cool! I love this, much better than before. I suppose we can remove this logic now?

https://github.com/Automattic/wp-calypso/blob/trunk/client/landing/stepper/declarative-flow/link-in-bio.ts#L141

I'll do a more thorough review soon.

Comment on lines +71 to +74
const logInUrl =
locale && locale !== 'en'
? `/start/account/user/${ locale }?variationName=${ flowName }&pageTitle=Link%20in%20Bio&redirect_to=/setup/${ flowName }/patterns`
: `/start/account/user?variationName=${ flowName }&pageTitle=Link%20in%20Bio&redirect_to=/setup/${ flowName }/patterns`;
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to do this manually?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose we don't. This PR focuses on making the flow work first, so I simply refer to how link-in-bio.ts does it for now. It can be improved as a separate PR for sure :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes @alshakero, this is how we are doing in the LiB flow as well, I think it can be good here for this PR :)

@southp
Copy link
Contributor Author

southp commented Dec 16, 2022

I suppose we can remove this logic now?
https://github.com/Automattic/wp-calypso/blob/trunk/client/landing/stepper/declarative-flow/link-in-bio.ts#L141

You are right. I plan to remove all the previous work as a follow-up PR, and it will be part of the tidying up :)

@matticbot
Copy link
Contributor

This PR modifies the release build for happy-blocks

To test your changes on WordPress.com, run install-plugin.sh happy-blocks update/dotlink-lib-in-stepper on your sandbox.

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

@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/dotlink-lib-in-stepper on your sandbox.

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

@southp southp marked this pull request as ready for review December 16, 2022 08:49
@southp southp requested a review from a team as a code owner December 16, 2022 08:49
@southp southp requested review from aneeshd16 and a team December 16, 2022 08:50
Copy link
Member

@alshakero alshakero left a comment

Choose a reason for hiding this comment

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

From a Stepper standpoint, this looks great. I haven't tested though.

client/landing/stepper/declarative-flow/link-in-bio-tld.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@escapemanuele escapemanuele left a comment

Choose a reason for hiding this comment

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

I tested it and all seems to be working great! I'm glad you managed to get it working on Stepper and found it fast.

I just wanted to ask if we want to have a "Decide Later" here, given that the flow is focused on the link tld
image

? `/start/account/user/${ locale }?variationName=${ flowName }&pageTitle=Link%20in%20Bio&redirect_to=/setup/${ flowName }/patterns`
: `/start/account/user?variationName=${ flowName }&pageTitle=Link%20in%20Bio&redirect_to=/setup/${ flowName }/patterns`;

// for the standard Link in Bio flow
Copy link
Contributor

Choose a reason for hiding this comment

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

Only a minor thing, I think you can change/remove this comment 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.

Good catch. The suggested fix has been taken :D

Comment on lines +71 to +74
const logInUrl =
locale && locale !== 'en'
? `/start/account/user/${ locale }?variationName=${ flowName }&pageTitle=Link%20in%20Bio&redirect_to=/setup/${ flowName }/patterns`
: `/start/account/user?variationName=${ flowName }&pageTitle=Link%20in%20Bio&redirect_to=/setup/${ flowName }/patterns`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes @alshakero, this is how we are doing in the LiB flow as well, I think it can be good here for this PR :)

Remove the non-necessary comment.

Co-authored-by: Omar Alshaker <omar@omaralshaker.com>
@southp
Copy link
Contributor Author

southp commented Dec 16, 2022

@escapemanuele Thanks for taking a look :)

I just wanted to ask if we want to have a "Decide Later" here, given that the flow is focused on the link tld

Yes, it's kept intentionally. When someone clicks "Decide Later", their site will be defaulted to a free w.link domain picked by our system :)

@southp southp merged commit ce42ebb into trunk Dec 16, 2022
@southp southp deleted the update/dotlink-lib-in-stepper branch December 16, 2022 14:39
@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, 2022
@matticbot
Copy link
Contributor

matticbot commented Dec 22, 2022

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

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

name                   parsed_size           gzip_size
entry-stepper              +1907 B  (+0.1%)     +206 B  (+0.0%)
entry-login                  -39 B  (-0.0%)      +60 B  (+0.0%)
entry-gutenboarding          -39 B  (-0.0%)      +60 B  (+0.0%)
entry-domains-landing        -39 B  (-0.0%)      +60 B  (+0.0%)
entry-browsehappy            -39 B  (-0.0%)      +60 B  (+0.2%)
entry-main                   -16 B  (-0.0%)      +92 B  (+0.0%)

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

Sections (~3590 bytes added 📈 [gzipped])

name                     parsed_size           gzip_size
link-in-bio-tld-flow       +682736 B    (new)  +172644 B    (new)
link-in-bio-flow              +461 B  (+0.1%)     +267 B  (+0.2%)
free-flow                     +461 B  (+0.1%)     +274 B  (+0.2%)
tailored-ecommerce-flow       +297 B  (+0.1%)      +77 B  (+0.1%)
signup                        +273 B  (+0.1%)      +40 B  (+0.1%)
videopress-flow               +156 B  (+0.0%)      -48 B  (-0.1%)
newsletter-flow               +156 B  (+0.0%)      +24 B  (+0.0%)
jetpack-connect               +136 B  (+0.0%)       +9 B  (+0.0%)
accept-invite                 +136 B  (+0.0%)       +9 B  (+0.0%)
site-purchases                 +47 B  (+0.0%)      -13 B  (-0.0%)
purchases                      +47 B  (+0.0%)      -13 B  (-0.0%)
domains                        +47 B  (+0.0%)      -28 B  (-0.0%)
checkout                       +47 B  (+0.0%)      -13 B  (-0.0%)
gutenberg-editor               +34 B  (+0.0%)      +15 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 (~254 bytes removed 📉 [gzipped])

name                                             parsed_size           gzip_size
async-load-signup-steps-user                           -85 B  (-0.0%)      -31 B  (-0.1%)
async-load-signup-steps-domains                        +34 B  (+0.0%)       -6 B  (-0.0%)
async-load-signup-steps-design-picker                  +34 B  (+0.0%)      +16 B  (+0.0%)
async-load-calypso-my-sites-checkout-modal             +34 B  (+0.0%)       +9 B  (+0.0%)
async-load-calypso-blocks-editor-checkout-modal        +34 B  (+0.0%)       +9 B  (+0.0%)
async-load-calypso-blocks-inline-help-popover          +23 B  (+0.0%)       +9 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.

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.

4 participants