Skip to content

Stepper: Fix blinking W logo#101369

Merged
alshakero merged 7 commits intotrunkfrom
fix/blinking-w
Mar 25, 2025
Merged

Stepper: Fix blinking W logo#101369
alshakero merged 7 commits intotrunkfrom
fix/blinking-w

Conversation

@alshakero
Copy link
Member

@alshakero alshakero commented Mar 14, 2025

Currently, there is an annoying blink of the signup header when you move between two steps. Even preloaded ones. This gets rid of that blink; it makes the product feels much less premium.

Proposed Changes

  1. When the component is preloaded, don't useReact.lazy to render it. The component is preloaded anyways and React.lazy adds a whole layer of asynchronicity.
  2. Don't AsyncLoad the Domains and Plans StepContainer. Stepper and /start use different containers (StepWrapper vs StepContainer). And these steps are shared between /start and Stepper. So to avoid loading an extraneous container in either of the frameworks, I decided to load the container asynchronously based on the current framework. But this adds a blink, and it doesn't make sense anymore because Stepper makes more than 90% of the traffic to the domains and plans step. So I sacrificed adding some bytes to the tiny minority to remove the blink for the vast majority.
  3. Remove the ternary condition when picking the StepContainer in the domains step between the classic container and the hundred-year plan container because this forces React to re-render the whole tree every time, causing a blink.

Why are these changes being made?

UX and performance.

Testing Instructions

  1. Go to /setup/onboarding.
  2. Pick a domain.
  3. Look closely at the W logo before clicking Continue.
  4. It should not blink at all between the domain and plans step.

Regression testing

  1. Make sure the hundred-year flow works:
  2. Go to /setup/hundred-year-domain
  3. Reach checkout.

@github-actions
Copy link

github-actions bot commented Mar 14, 2025

@matticbot
Copy link
Contributor

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 fix/blinking-w on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented Mar 14, 2025

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

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

Details
name                   parsed_size           gzip_size
entry-stepper              -9188 B  (-0.7%)     -345 B  (-0.1%)
entry-login                -1088 B  (-0.1%)    -1430 B  (-0.2%)
entry-subscriptions         -674 B  (-0.0%)     -354 B  (-0.1%)
entry-main                  -465 B  (-0.0%)     -843 B  (-0.1%)
entry-domains-landing       -370 B  (-0.1%)      -27 B  (-0.0%)
entry-browsehappy           -370 B  (-0.2%)      -27 B  (-0.0%)

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

Sections (~8510 bytes added 📈 [gzipped])

Details
name                                parsed_size           gzip_size
async-step-unified-plans               +16112 B  (+1.7%)    +7058 B  (+2.7%)
signup                                 -10364 B  (-3.5%)     -125 B  (-0.2%)
async-step-unified-domains              -2679 B  (-0.2%)    +1843 B  (+0.6%)
new-hosted-site-flow-user-included       -456 B  (-0.3%)      -36 B  (-0.1%)
site-setup-flow                          -387 B  (-0.1%)     +124 B  (+0.1%)
entrepreneur-flow                        -372 B  (-0.2%)     -901 B  (-1.6%)
stepper-user-step                        -325 B  (-0.1%)     -868 B  (-1.0%)
async-step-use-my-domain                 -325 B  (-0.1%)     -864 B  (-0.5%)
security                                 -213 B  (-0.0%)      -26 B  (-0.0%)
privacy                                  -213 B  (-0.0%)      -29 B  (-0.0%)
notification-settings                    -213 B  (-0.0%)      -26 B  (-0.0%)
developer                                -213 B  (-0.0%)      -28 B  (-0.0%)
account-close                            -213 B  (-0.0%)      -27 B  (-0.0%)
home                                     -188 B  (-0.0%)      -22 B  (-0.0%)
transferring-hosted-site-flow            -150 B  (-0.1%)     -768 B  (-0.8%)
plans                                    -129 B  (-0.0%)      -30 B  (-0.0%)
themes                                   -110 B  (-0.0%)      -13 B  (-0.0%)
staging-site                             -110 B  (-0.0%)      -16 B  (-0.0%)
sites-dashboard                          -110 B  (-0.0%)      -17 B  (-0.0%)
site-settings                            -110 B  (-0.0%)      -15 B  (-0.0%)
site-profiler                            -110 B  (-0.0%)      -12 B  (-0.0%)
site-performance                         -110 B  (-0.0%)      -17 B  (-0.0%)
site-monitoring                          -110 B  (-0.0%)      -17 B  (-0.0%)
site-logs                                -110 B  (-0.0%)      -17 B  (-0.0%)
site-blocks                              -110 B  (-0.0%)      -13 B  (-0.0%)
reader                                   -110 B  (-0.0%)      -13 B  (-0.0%)
purchases                                -110 B  (-0.0%)      -13 B  (-0.0%)
purchase-product                         -110 B  (-0.1%)      -16 B  (-0.0%)
plugins                                  -110 B  (-0.0%)      -17 B  (-0.0%)
performance-profiler                     -110 B  (-0.0%)      -12 B  (-0.0%)
patterns                                 -110 B  (-0.0%)      -12 B  (-0.0%)
migrate                                  -110 B  (-0.0%)      -11 B  (-0.0%)
me                                       -110 B  (-0.0%)      -13 B  (-0.0%)
jetpack-social                           -110 B  (-0.0%)      -13 B  (-0.0%)
jetpack-cloud-pricing                    -110 B  (-0.0%)      -13 B  (-0.0%)
jetpack-cloud-plugin-management          -110 B  (-0.0%)      -17 B  (-0.0%)
jetpack-cloud-partner-portal             -110 B  (-0.0%)      -10 B  (-0.0%)
jetpack-cloud-manage-pricing             -110 B  (-0.0%)      -13 B  (-0.0%)
jetpack-cloud-features-comparison        -110 B  (-0.0%)      -13 B  (-0.0%)
jetpack-cloud-agency-signup              -110 B  (-0.1%)      -13 B  (-0.0%)
jetpack-cloud-agency-dashboard           -110 B  (-0.0%)      -10 B  (-0.0%)
hosting                                  -110 B  (-0.0%)      -15 B  (-0.0%)
help                                     -110 B  (-0.0%)      -13 B  (-0.0%)
github-deployments                       -110 B  (-0.0%)      -17 B  (-0.0%)
concierge                                -110 B  (-0.0%)      -10 B  (-0.0%)
comments                                 -110 B  (-0.0%)      -11 B  (-0.0%)
backup                                   -110 B  (-0.0%)      -11 B  (-0.0%)
activity                                 -110 B  (-0.0%)      -10 B  (-0.0%)
account                                  -110 B  (-0.0%)      -13 B  (-0.0%)
a8c-for-agencies-woopayments             -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-team                    -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-sites                   -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-signup                  -110 B  (-0.0%)       -9 B  (-0.0%)
a8c-for-agencies-settings                -110 B  (-0.1%)      -17 B  (-0.0%)
a8c-for-agencies-referrals               -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-purchases               -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-plugins                 -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-partner-directory       -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-overview                -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-migrations              -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-marketplace             -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-landing                 -110 B  (-0.1%)      -17 B  (-0.0%)
a8c-for-agencies-client                  -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies-agency-tier             -110 B  (-0.0%)      -17 B  (-0.0%)
a8c-for-agencies                         -110 B  (-0.1%)      -17 B  (-0.0%)
jetpack-app                              -103 B  (-0.0%)      -30 B  (-0.0%)
overview                                  -97 B  (-0.0%)       -9 B  (-0.0%)
domains                                   -97 B  (-0.0%)      +46 B  (+0.0%)
readymade-template-flow                   +13 B  (+0.0%)      +99 B  (+0.2%)

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 (~11404 bytes added 📈 [gzipped])

Details
name                                                            parsed_size             gzip_size
async-load-automattic-onboarding-src-step-container                -29806 B  (deleted)    -9883 B  (deleted)
async-load-calypso-signup-step-wrapper                             -21524 B   (-53.9%)    -6608 B   (-49.3%)
async-load-signup-steps-social-profiles                            -20616 B   (-32.7%)    -6354 B   (-30.5%)
async-load-signup-steps-site                                       -20616 B   (-25.7%)    -6367 B   (-24.7%)
async-load-signup-steps-clone-destination                          -20616 B   (-30.2%)    -6355 B   (-28.6%)
async-load-signup-steps-site-options                               -20513 B   (-27.9%)    -6324 B   (-26.3%)
async-load-signup-steps-rewind-form-creds                          -20513 B   (-19.3%)    -6336 B   (-19.0%)
async-load-signup-steps-clone-credentials                          -20513 B   (-18.9%)    -6336 B   (-18.7%)
async-load-signup-steps-woocommerce-install-transfer               -20506 B   (-29.5%)    -6354 B   (-27.6%)
async-load-signup-steps-rewind-were-backing                        -20506 B   (-35.2%)    -6340 B   (-32.5%)
async-load-signup-steps-page-picker                                -20506 B    (-4.9%)    -6367 B    (-4.8%)
async-load-signup-steps-hosting-decider                            -20506 B   (-34.6%)    -6343 B   (-31.5%)
async-load-signup-steps-emails                                     -20506 B   (-21.1%)    -6352 B   (-20.1%)
async-load-signup-steps-design-picker                              -20506 B   (-23.7%)    -6377 B   (-22.1%)
async-load-signup-steps-creds-permission                           -20506 B   (-23.0%)    -6356 B   (-21.8%)
async-load-signup-steps-creds-confirm                              -20506 B   (-23.4%)    -6351 B   (-22.2%)
async-load-signup-steps-courses                                    -20506 B   (-16.0%)    -6350 B   (-15.2%)
async-load-signup-steps-clone-start                                -20506 B   (-32.4%)    -6338 B   (-30.0%)
async-load-signup-steps-clone-ready                                -20506 B   (-23.2%)    -6327 B   (-22.6%)
async-load-signup-steps-clone-point                                -20506 B    (-7.2%)    -6351 B    (-7.9%)
async-load-signup-steps-clone-cloning                              -20506 B   (-32.6%)    -6339 B   (-30.3%)
async-load-signup-steps-new-or-existing-site                       -20493 B   (-24.1%)    -6157 B   (-22.3%)
async-load-signup-steps-woocommerce-install-step-store-address     -20460 B   (-19.1%)    -6366 B   (-17.9%)
async-load-signup-steps-woocommerce-install-step-business-info     -20460 B   (-16.4%)    -6364 B   (-15.2%)
async-load-signup-steps-woocommerce-install-confirm                -20460 B   (-22.2%)    -6355 B   (-21.0%)
async-load-signup-steps-p2-site                                    -20410 B   (-22.8%)    -6321 B   (-22.3%)
async-load-step-container-v-2-plans                                -20403 B   (-45.6%)    -6358 B   (-40.0%)
async-load-signup-steps-woocommerce-install                        -20403 B   (-92.1%)    -6358 B   (-89.2%)
async-load-signup-steps-user                                       -20403 B    (-8.3%)    -6346 B    (-8.1%)
async-load-signup-steps-store-features                             -20403 B   (-26.7%)    -6332 B   (-25.3%)
async-load-signup-steps-starting-point                             -20403 B   (-30.4%)    -6323 B   (-28.4%)
async-load-signup-steps-site-or-domain                             -20403 B   (-30.8%)    -6321 B   (-29.0%)
async-load-signup-steps-p2-join-workspace                          -20403 B   (-29.8%)    -6343 B   (-27.8%)
async-load-signup-steps-p2-confirm-email                           -20403 B   (-32.9%)    -6323 B   (-30.3%)
async-load-signup-steps-p2-complete-profile                        -20403 B   (-11.1%)    -6353 B   (-10.7%)
async-load-signup-steps-intent                                     -20403 B   (-29.1%)    -6332 B   (-27.2%)
async-load-calypso-blocks-jitm-templates-modal                     -20403 B   (-43.9%)    -6358 B   (-41.6%)
async-load-signup-steps-site-picker                                -20382 B    (-8.5%)    -6850 B    (-8.8%)
async-load-signup-steps-difm-site-picker                           -20382 B    (-8.5%)    -6848 B    (-8.8%)
async-load-signup-steps-website-content                            -20300 B    (-9.8%)    -6310 B    (-9.2%)
async-load-signup-steps-domains                                    -12456 B    (-1.9%)    -2862 B    (-1.5%)
async-load-signup-steps-plans-theme-preselected                     +5884 B    (+1.3%)    +1847 B    (+1.3%)
async-load-signup-steps-plans                                       +5884 B    (+1.3%)    +1847 B    (+1.3%)
async-load-automattic-help-center-stepper                            -306 B    (-0.0%)     -856 B    (-0.3%)
async-load-calypso-layout-community-translator                       -110 B    (-0.4%)       -9 B    (-0.1%)
async-load-calypso-components-jetpack-portal-nav                     -110 B    (-0.2%)      -11 B    (-0.1%)
async-load-automattic-help-center                                    -110 B    (-0.0%)      -12 B    (-0.0%)
async-load-signup-steps-website-content-section-types                +103 B    (+0.1%)      +25 B    (+0.1%)
async-load-design-playground                                         -103 B    (-0.0%)      -14 B    (-0.0%)
async-load-design                                                    -103 B    (-0.0%)      -14 B    (-0.0%)
async-load-calypso-blocks-jitm                                        -78 B    (-0.1%)      -11 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.

@alshakero alshakero marked this pull request as ready for review March 14, 2025 22:08
@alshakero alshakero requested a review from a team as a code owner March 14, 2025 22:08
@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 Mar 14, 2025
return ! isCopySiteFlow( flow );
};

const Container = [ HUNDRED_YEAR_PLAN_FLOW, HUNDRED_YEAR_DOMAIN_FLOW ].includes( flow )
Copy link
Member Author

@alshakero alshakero Mar 14, 2025

Choose a reason for hiding this comment

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

Creating a React component on the fly forces React to rerender everything down the tree when the state changes.

cc @leonardola

Choose a reason for hiding this comment

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

@alshakero I'm not sure why I got pinged here. Did you mean to ping someone else maybe?

Copy link
Contributor

@oskosk oskosk Mar 17, 2025

Choose a reason for hiding this comment

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

He meant to ping @leonardost

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes hehe, thanks Osk! Thankfully, you're an Automattician as well.

@github-project-automation github-project-automation bot moved this to In progress in Vertex Team Board Mar 14, 2025
@alshakero alshakero added the Reviewer Can Merge PR author indicates the reviewer is free to merge/deploy if they want to own the change. label Mar 14, 2025
@alshakero alshakero self-assigned this Mar 14, 2025
@oskosk
Copy link
Contributor

oskosk commented Mar 17, 2025

Looks like it partially addresses the matter only before the checkout steps.

Partially meaning, that I see the logo is aligned differently afterwards

Screen.Recording.2025-03-17.at.9.46.22.AM.mov

@alshakero
Copy link
Member Author

Looks like it partially addresses the matter

Fixed now.

Only before the checkout steps.

Yes that's expected. The blinking post checkout is a different issue that I'll look into next.

@alshakero alshakero merged commit e9a1b9b into trunk Mar 25, 2025
13 checks passed
@alshakero alshakero deleted the fix/blinking-w branch March 25, 2025 11:46
@github-project-automation github-project-automation bot moved this from In progress to Done in Vertex Team Board Mar 25, 2025
@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 Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewer Can Merge PR author indicates the reviewer is free to merge/deploy if they want to own the change. Stepper

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants

Comments