Stepper: Add fallback header and loading#101840
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~8681 bytes added 📈 [gzipped]) DetailsCommon code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~55810 bytes added 📈 [gzipped]) DetailsSections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~12721 bytes removed 📉 [gzipped]) DetailsReact 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. Generated by performance advisor bot at iscalypsofastyet.com. |
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
| const DEFAULT_PLACEHOLDER = ( | ||
| <div className="fallback-signup-header"> | ||
| <FallbackHeader /> | ||
| <Loading title="Turning on the lights" /> |
There was a problem hiding this comment.
Let's add translations here and where you added a title
There was a problem hiding this comment.
Thanks Renan for working on this.
I believe this is re-introducing a problem, that is the loading bar jumping up and down, that creates a worse experience for the user.
With this PR (slow connection to better see):
VXNzJV.mp4
Production:
Qd56Qu.mp4
You can see that the bar stays in the same place in production, that's because we're here removing margin-tops.
|
Work has been done here by Quake team already, so I'm closing this. |
Context thread p1741878991651569-slack-C02T4NVL4JJ
Proposed Changes
Before: Loading without logo on top left and title

After: Loading with title and Logo

Why are these changes being made?
In stepper, sometimes we have to navigate outside the flow and then navigate back, for instance, to the checkout page. This navigation causes some visual issues since it requires a page refresh when leaving and when redirected back to stepper. Currently, there are some fallbacks in place to prevent blank screen to users while loading content, they are:
All these three fallbacks, depending on the flow, can sometimes happen, Onboarding flow is an example of it, just check after the checkout the loading states and header. Sometimes there is a header, sometimes there is no title, sometimes there is both.
These fallbacks they also happen sequentially, since after a page load, the flow needs to be loaded with its dependencies and the same for the step.
This PR idea is to add the same loading style that Stepper has when using the processing step, which should be a title, loading bar and a header.
To achieve that, I had added a fallback header that will render the reader properly when one of the three fallbacks above are being rendered.
Testing Instructions
/setup/onboarding/, pick a paid plan and check the redirects and loading after the checkout. (compare side by side with production).