-
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
Jetpack Connect: abstract an HoC that handles connection redirects for JP sites. #42621
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~171 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. 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. |
634a604
to
a7507e4
Compare
Tested this a bit and everything I was (kinda randomly) testing seemed to work fine. Should we get a code review from someone in Jetpack on this refactor though? |
a7507e4
to
d0f7727
Compare
2ea9816
to
1492b8f
Compare
1492b8f
to
730eac8
Compare
unrelated test failures after most recent rebase. |
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 ran through the connect flow several times. All the copy looks as I would expect, and I didn't notice anything broken. Going through flows for a specific plan ended up at checkout, and without a plan ended up at the Plans page.
I thoroughly reviewed the code as well, and other than one possible stray semi-colon in a render
function, I think it's good to go. 👍
730eac8
to
1bd9d2b
Compare
We extract functionality to be reused in product purchase flows, for Jetpack sites that need to be activated/connected.
…ction functionality.
…larations. Also we creates a single redirect function for handling distinct connection states. Previosuly, there were 4 separate functions. Remove obsolete props.
1bd9d2b
to
9b92710
Compare
Changes proposed in this Pull Request
This is a preparation for the WP.com/JP Jetpack Search purchase integration
to handle non-Jetpack sites and move away from the
jetpack/connect
route. Purchasing a product for the Jetpack sites includes connection checks, shared with the Jetpack Connect Flow.The change is substantial, so for ease of review, this PR avoids major re-writes e.g. introducing Redux. Any further improvements can be handled separately.
Testing instructions
Connection Flow should change for none of the Jetpack statuses.
/jetpack/connect/premium
and verify that form copy, footer, input box, redirects are correct and functional, and that the flow leads to checkout. In order to verify that the plugin was correctly setup, to be tested with a Jetpack site that is unconnected, plugin deleted, or inactive./jetpack/connect
without plan specified should end at the canonical plans page.