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

Try Enabling Customer Home for all Simple and Atomic Sites #39071

Merged
merged 3 commits into from
Jan 28, 2020

Conversation

gwwar
Copy link
Contributor

@gwwar gwwar commented Jan 25, 2020

Fixes #38999

This PR adds a new feature flag home/all enabled in development and horizon, that skips the site age check if the flag is set to true and also fixes a small bug where an empty checklist would render for sites created before Aug 19th.

Screen Shot 2020-01-24 at 4 41 27 PM

Open Question

  • Should we include VIP sites? I can update logic to filter them out. Answer: We'll exclude VIP sites for now.

p9GBOq-1A2-p2

Testing Instructions

  • Create a new site on WordPress.com
  • Checkout this branch, verify that "My Home" is visible in sidebar and that a checklist renders in the page
  • Switch sites to a site created before Aug 2019. The checklist should not render and instead we should see Site tools
  • Customer Home should not be visible to Jetpack or VIP sites

@gwwar gwwar added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. DO NOT MERGE labels Jan 25, 2020
@gwwar gwwar requested a review from a team January 25, 2020 00:38
@gwwar gwwar self-assigned this Jan 25, 2020
@matticbot
Copy link
Contributor

@gwwar gwwar added this to the Customer Home Static Update milestone Jan 25, 2020
@matticbot
Copy link
Contributor

matticbot commented Jan 25, 2020

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

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

name        parsed_size           gzip_size
entry-main        +56 B  (+0.0%)      +12 B  (+0.0%)

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

Sections (~3 bytes added 📈 [gzipped])

name  parsed_size           gzip_size
home        +68 B  (+0.0%)       +3 B  (+0.0%)

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.
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.

@mmtr
Copy link
Member

mmtr commented Jan 27, 2020

Customer Home should not be visible to Jetpack or VIP sites

Seems that VIP sites are currently included:

Screenshot 2020-01-27 at 11 21 12

Should we include VIP sites? I can update logic to filter them out.

As long as all the cards, tools, actions and links work there, I'd suggest to have the same behavior always. cc @Automattic/vip for feedback.

Copy link
Contributor

@sixhours sixhours left a comment

Choose a reason for hiding this comment

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

I've tested this with a bunch of different types of sites (private, public, pre-Aug 2019, site created today, site redirect, domain-only) and all worked as expected!

canCurrentUserUseCustomerHome( createState( { created_at: '0000-00-00T00:00:00+00:00' } ) )
).toBe( false );
} );

test( "should return false if user can't manage site options", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a test to check for exclusion of VIP sites, too? Or do those qualify as "jetpack" sites?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original check didn't include VIP as a consideration, but we should verify with folks as that might have been an oversight

@WPprodigy
Copy link

WPprodigy commented Jan 27, 2020

To clarify some of the VIP questions above, we still have sites that are both "traditional" WordPress.com and others are Jetpack/remote. So excluding for VIP would need an additional check to match the ones that are traditional sites, if that were to be desired :)

@gwwar
Copy link
Contributor Author

gwwar commented Jan 27, 2020

Added p9GBOq-1A2-p2

@gwwar
Copy link
Contributor Author

gwwar commented Jan 27, 2020

@WPprodigy @mmtr I've created #39090 to exclude VIP sites for now. I'll rebase this branch after this lands.

@kwight
Copy link
Contributor

kwight commented Jan 27, 2020

This all looks great to me 🎉

I also noticed VIP sites, but it sounds like #39090 is a followup to handle that. It's a nice touch how the "Your site has been created!" celebratory notice goes away after 30 mins. (I really like how joyful it is, compared to the uninspired plain My Home title – I wonder if keeping it around for a few days would be a good idea.)

@gwwar gwwar added [Feature] My Home The main dashboard for managing a WordPress.com site. and removed DO NOT MERGE labels Jan 28, 2020
@gwwar
Copy link
Contributor Author

gwwar commented Jan 28, 2020

Going to land this enabled only in horizon/dev. Thanks for the reviews folks!

@gwwar gwwar merged commit 0b62225 into master Jan 28, 2020
@gwwar gwwar deleted the try/customer-home branch January 28, 2020 19:38
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Jan 28, 2020
mmtr added a commit that referenced this pull request Jan 29, 2020
Fixes a regression that was included in #39071 causing the checklist to be displayed even if it is completed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] My Home The main dashboard for managing a WordPress.com site.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customer Home: Enable for all Simple Sites and Atomic Sites
6 participants