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

Display WooCommerce styles during JP Onboarding when coming from the setup wizard #32993

Merged
merged 3 commits into from
May 21, 2019

Conversation

justinshreve
Copy link
Contributor

@justinshreve justinshreve commented May 13, 2019

This PR detects when we are in the Jetpack onboarding wizard, but have entered through the WooCommerce setup wizard. This is so we can do some co-branding, and keep the connection experience consistent throughout the store setup process. See p6riRB-4rG-p2 and woocommerce/woocommerce-admin#2152.

This is step one of the process. It only adds the ability to target styles for this case, and implements the base background/button styles. It does not update the copy yet, or display the Woo logo, etc. It is also behind a feature flag so we can iterate on these differences without affecting the current flows.

@jameskoster I believe I could use some help here making sure I'm using the correct colors, hovers, accents, etc. I only had the background, text color, and button color to work with. See the mixin.

To Test:

  • Run npm run test-client and make sure all tests pass.
  • Disconnect Jetpack Jetpack > Dashboard > Connections > Site connection > Manage site connection > Disconnect.
  • Click “Setup Jetpack”.
  • On the connection/authorization screen ( https://wordpress.com/jetpack/connect/authorize?client_id= ….. ) copy and paste the whole URL.
  • Replace https://wordpress.com with http://calypso.localhost:3000 and replace the from parameter in the URL (it may be something like connection-banner or landing-page-bottom) with from=woocommerce-setup-wizard . See Pastebin 213d5 or ping me if you have issues.
  • Hit enter, and you should see Woo Purples
  • Disconnect
  • Logout
  • Try the same same URL logged out
  • Test the standard Jetpack connection process, without the WooCommerce query string appended, and verify you see the standard Jetpack Onboarding styles.

Screenshots:

Screen Shot 2019-05-20 at 2 56 57 PM

Screen Shot 2019-05-20 at 2 57 14 PM

@justinshreve justinshreve added Jetpack [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Store labels May 13, 2019
@justinshreve justinshreve self-assigned this May 13, 2019
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

matticbot commented May 13, 2019

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

Webpack Runtime (~528 bytes added 📈)

name      parsed_size           gzip_size
manifest       +528 B  (+0.3%)      +46 B  (+0.2%)

Webpack runtime for loading modules. It is included in the HTML page as an inline script. Is downloaded and parsed every time the app is loaded.

App Entrypoints (~561 bytes added 📈)

name   parsed_size           gzip_size
build       +561 B  (+0.0%)     +143 B  (+0.0%)

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

Legacy SCSS Stylesheet (~1278 bytes added 📈)

name       parsed_size           gzip_size
style.css      +1278 B  (+0.4%)     +238 B  (+0.4%)

The monolithic CSS stylesheet that is downloaded on every app load.
👎 This PR increases the size of the stylesheet, which is a bad news. Please consider migrating the CSS styles you modified to webpack imports.

Sections (~2059 bytes added 📈)

name             parsed_size           gzip_size
jetpack-connect      +1245 B  (+0.2%)     +267 B  (+0.2%)
login                 +814 B  (+0.8%)     +205 B  (+0.8%)

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 (~7887 bytes added 📈)

name                                              parsed_size           gzip_size
async-load-components-jetpack-header-woocommerce      +5613 B    (new)    +1445 B    (new)
async-load-design-blocks                              +1179 B  (+0.0%)     +253 B  (+0.0%)
async-load-design-playground                           +365 B  (+0.0%)      +62 B  (+0.0%)
async-load-design                                      +365 B  (+0.0%)      +54 B  (+0.0%)
async-load-components-jetpack-header                   +365 B  (+5.8%)      +52 B  (+2.4%)

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.

@justinshreve justinshreve force-pushed the add/woocommerce-jetpack-onboarding-styles branch from e1bc782 to ef77228 Compare May 13, 2019 19:20
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Quickly glanced through the code, and it's looking well, nice work 👍

Haven't tested though, and I think this could use some thorough testing in most of the big Jetpack in addition to the mentioned Woo flows.

I'm pinging @Automattic/luna and @Automattic/jetpack-design for review and testing, as I'm no longer working on Jetpack NUX & Onboarding.

@tyxla tyxla requested review from a team May 14, 2019 10:40
@justinshreve
Copy link
Contributor Author

justinshreve commented May 14, 2019

Fixed some issues in 260bfd5. Thanks!

I've been making sure to run through this PR with the normal flow as well (no &from= override) as well as testing this with the feature flag disabled. All looks well.

I've adjusted the testing directions to make sure we get some more 👀 on that as well.

@justinshreve justinshreve force-pushed the add/woocommerce-jetpack-onboarding-styles branch from 260bfd5 to 13cb8d3 Compare May 16, 2019 14:45
Copy link
Contributor

@timmyc timmyc left a comment

Choose a reason for hiding this comment

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

Tested the flows with and without the modified from attribute and both are working as expected.

@timmyc timmyc added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 16, 2019
Copy link
Contributor

@jameskoster jameskoster left a comment

Choose a reason for hiding this comment

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

As I mentioned last week, we might be changing the background color, so no need to change that (or the text color) for now.

I messaged you on Slack re colors in general. The button bg / stroke colors were incorrect (my bad), I've updated this in Figma just now.

For the hover color, we can use Woo Purple 600 for the background.

@justinshreve justinshreve dismissed jameskoster’s stale review May 20, 2019 18:58

I've addressed the color feedback over in the other PR.

…#33073)

* Update co-branded Jetpack & WooCommerce header on connection and login routes

* Additional design treatments to better align with the wp-admin onboarding wizard

* Additional design treatments to better align with the wc-admin onboarding wizard

* Handle PR Feedback: Add a CSS variable for the heading border, adjust line-height for login footer links, add isWoo prop to JetpackHeader for future potential co-branding with hosts.

* Update color schemes for the latest designs

* Fix color and increase thickness.
Use css var instead of sass var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants