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

Tailored Flows: Redirect Sensei tailored flow #95464

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

rcrdortiz
Copy link
Contributor

@rcrdortiz rcrdortiz commented Oct 17, 2024

Related to:

Proposed Changes

  • A redirect for the Sensei flow was added.
  • Made some minor code improvements.
  • A missing BLOG_FLOW constant was added to the flows file.

Why are these changes being made?

  • We need to redirect the Sensei flow from /setup to a non-tailored flow since we're reducing the complexity of the flow that we have in WordPress.com.

Testing Instructions

  • Open the Calypso live link
  • While logged out
    • Visit /setup/sensei/senseiSetup?ref=senseilms,
    • You should land on /plugins/sensei-pro?ref=senseilms
    • Visit /setup/sensei
    • You should land on /plugins/sensei-pro
    • Visit /setup/sensei/es
    • You should land on /es/plugins/sensei-pro
  • Repeat while logged in

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

@rcrdortiz rcrdortiz requested a review from a team as a code owner October 17, 2024 11:19
@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 17, 2024
@rcrdortiz rcrdortiz self-assigned this Oct 17, 2024
@matticbot
Copy link
Contributor

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

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

name           parsed_size           gzip_size
entry-stepper       +816 B  (+0.0%)     +246 B  (+0.0%)

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

Sections (~133 bytes added 📈 [gzipped])

name                               parsed_size           gzip_size
themes                                   +20 B  (+0.0%)      +10 B  (+0.0%)
theme                                    +20 B  (+0.0%)      +10 B  (+0.0%)
staging-site                             +20 B  (+0.0%)       +9 B  (+0.0%)
sites-dashboard                          +20 B  (+0.0%)       +9 B  (+0.0%)
site-purchases                           +20 B  (+0.0%)      +10 B  (+0.0%)
site-performance                         +20 B  (+0.0%)       +9 B  (+0.0%)
site-monitoring                          +20 B  (+0.0%)       +9 B  (+0.0%)
site-logs                                +20 B  (+0.0%)       +9 B  (+0.0%)
site-blocks                              +20 B  (+0.0%)      +12 B  (+0.0%)
signup                                   +20 B  (+0.0%)      +12 B  (+0.0%)
settings                                 +20 B  (+0.0%)       +9 B  (+0.0%)
security                                 +20 B  (+0.0%)      +12 B  (+0.0%)
purchases                                +20 B  (+0.0%)      +12 B  (+0.0%)
privacy                                  +20 B  (+0.0%)      +12 B  (+0.0%)
plugins                                  +20 B  (+0.0%)      +11 B  (+0.0%)
plans                                    +20 B  (+0.0%)      +12 B  (+0.0%)
notification-settings                    +20 B  (+0.0%)      +12 B  (+0.0%)
me                                       +20 B  (+0.0%)      +12 B  (+0.0%)
marketplace                              +20 B  (+0.0%)      +10 B  (+0.0%)
jetpack-connect                          +20 B  (+0.0%)      +10 B  (+0.0%)
jetpack-cloud-settings                   +20 B  (+0.0%)       +8 B  (+0.0%)
jetpack-cloud-pricing                    +20 B  (+0.0%)      +11 B  (+0.0%)
jetpack-cloud-features-comparison        +20 B  (+0.0%)      +11 B  (+0.0%)
jetpack-app                              +20 B  (+0.0%)       +9 B  (+0.0%)
hosting-features                         +20 B  (+0.0%)       +9 B  (+0.0%)
hosting                                  +20 B  (+0.0%)       +9 B  (+0.0%)
home                                     +20 B  (+0.0%)      +12 B  (+0.0%)
help                                     +20 B  (+0.0%)      +12 B  (+0.0%)
github-deployments                       +20 B  (+0.0%)       +9 B  (+0.0%)
email                                    +20 B  (+0.0%)      +11 B  (+0.0%)
domains                                  +20 B  (+0.0%)      +11 B  (+0.0%)
developer                                +20 B  (+0.0%)      +12 B  (+0.0%)
checkout                                 +20 B  (+0.0%)      +11 B  (+0.0%)
account-close                            +20 B  (+0.0%)      +12 B  (+0.0%)
account                                  +20 B  (+0.0%)      +12 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 (~59 bytes added 📈 [gzipped])

name                                                                              parsed_size           gzip_size
async-load-purchase-modal-wrapper                                                       +20 B  (+0.0%)      +10 B  (+0.0%)
async-load-my-sites-checkout-purchase-modal-is-eligible-for-one-click-checkou...        +20 B  (+0.0%)       +9 B  (+0.0%)
async-load-design-blocks                                                                +20 B  (+0.0%)       +9 B  (+0.0%)
async-load-calypso-my-sites-current-site-stale-cart-items-notice                        +20 B  (+0.1%)       +9 B  (+0.1%)
async-load-calypso-layout-masterbar-checkout                                            +20 B  (+0.0%)      +10 B  (+0.0%)
async-load-calypso-blocks-editor-checkout-modal                                         +20 B  (+0.0%)      +12 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.

@rcrdortiz rcrdortiz requested a review from a team October 17, 2024 11:27
@xavier-lc
Copy link
Contributor

  • You should land on /plugins/sensei?ref=senseilms

I landed on /plugins/sensei-pro?ref=senseilms

  • You should land on /plugins/sensei

I landed on /plugins/sensei-pro

  • /setup/sensei/es

I landed on /es/plugins/sensei-pro

Copy link
Member

@mmtr mmtr left a comment

Choose a reason for hiding this comment

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

Works great!

@mmtr
Copy link
Member

mmtr commented Oct 17, 2024

@xavier-lc I think the testing instructions don't reflect the expected path, it should be sensei-pro since that's the plugin installed in the previous flow

@rcrdortiz
Copy link
Contributor Author

@xavier-lc I think the testing instructions don't reflect the expected path, it should be sensei-pro since that's the plugin installed in the previous flow

Oh yes, my bad, I'll update the testing instructions.

@rcrdortiz rcrdortiz merged commit b08db47 into add/redirect-tailored-flows Oct 17, 2024
16 checks passed
@rcrdortiz rcrdortiz deleted the add/redirect-sensei-flow branch October 17, 2024 12:47
@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 Oct 17, 2024
rcrdortiz added a commit that referenced this pull request Oct 17, 2024
)

* Redirected tailored flows

* Removed unnecessary default value for referrer

* Refactored function definition and updated call

* Small change so that we match flow names explicitly while still using starts with

* Added inline comment for the new function

* Removed the Sensei flow redirect

* We now take into account the rest of the path and the query params

* Implemented as routes for better case handling

* Renamed the from property to flow

* Added a redirect for the sensei flow and made some minor code improvements (#95464)

---------

Co-authored-by: mmtr <[email protected]>
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