-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Gutenboarding: Remove all unused bits and reorganize the rest #74475
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~375546 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~19467 bytes removed 📉 [gzipped])
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 (~60613 bytes removed 📉 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
@@ -24,3 +25,5 @@ export const USER_STORE = User.register( { | |||
} ); | |||
|
|||
export const AUTOMATED_ELIGIBILITY_STORE = AutomatedTransferEligibility.register(); | |||
|
|||
export const PLANS_STORE = Plans.register(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good example of how importing directly from the actual store is useful! This change probably wouldn't have been needed if the code was already using the new redux pattern :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No concerns on my end!
That said, I'd love to get confirmation from the product side that gutenboarding is fully dead and that there aren't any future plans for it.
a2cd29e
to
fb9fc7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I'm not part of the reviewers list, but wanted to say thank you for going back and removing deprecated code. It's an underappreciated task.
I do not believe any E2E tests remain that uses Gutenboarding, but POMs do remain. I will create another PR based on this branch that cleans those POMs up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any info on the usage of this flow, but from a Payments perspective, removing it is great! We've had to do a bunch of extra work to support Gutenboarding in addition to signup in past years so this would mean one fewer thing to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a quick sweep, and it's much easier to review than I thought! LGTM!
Disclaimer: I didn't test. Only reviewed.
/* | ||
* Parses the `anchor_podcast` parameter from a given URL. | ||
* Returns `true` if provided URL is an anchor FM signup URL. | ||
*/ | ||
function getIsAnchorFmSignup( urlString ) { | ||
if ( ! urlString ) { | ||
return false; | ||
} | ||
|
||
// Assemble search params if there is actually a query in the string. | ||
const queryParamIndex = urlString.indexOf( '?' ); | ||
if ( queryParamIndex === -1 ) { | ||
return false; | ||
} | ||
const searchParams = new URLSearchParams( | ||
decodeURIComponent( urlString.slice( queryParamIndex ) ) | ||
); | ||
const anchorFmPodcastId = searchParams.get( 'anchor_podcast' ); | ||
return Boolean( anchorFmPodcastId && anchorFmPodcastId.match( /^[0-9a-f]{7,8}$/i ) ); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have another one of these here. Maybe worth putting in the onboarding
package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that those are different functions, I preferred not to introduce additional dependencies to the Login block used in multiple places, but this is definitely something worth arranging at some point.
Not gonna lie, having spent months working on this, it breaks my heart a little. |
Thank you all for taking a look 🙌
I totally sympathize. It served us really well! |
While working on #74399 I noticed that none of Gutenboarding is accessible, since it would always redirect to
/start
:wp-calypso/client/server/pages/index.js
Lines 901 to 915 in 3626bab
Regardless that we won't be using it, we are building the Gutenboarding entry point along with all of its code.
Might be easier to review on a per-commit basis, since all changes that aren't removals are in separate commits.
Proposed Changes
This PR removes the unused Gutenboarding entry point, along with all unused code from there.
The little remaining code is being moved where it is currently used and makes more sense.
Testing Instructions
/new*
)