Skip to content

Checklist: Hide banner from too old sites. - #26867

Merged
mattwiebe merged 3 commits into
masterfrom
checklist/hide-banner-from-too-old-site
Aug 24, 2018
Merged

mattwiebe merged 3 commits into
masterfrom
checklist/hide-banner-from-too-old-site

Conversation

@taggon

@taggon taggon commented Aug 24, 2018 •

Copy link
Copy Markdown
Contributor

The onboarding checklist may not work properly for the sites created before the feature was launched due to lack of onboarding_checklist_initialized option that is generated when a site is created. This PR will check if the site is eligible for the checklist and hide the banner if not.

Note: You need to apply D17548-code to your sandbox first.

Test plan

  1. Create a new site.
  2. See if the checklist banner shows up on the stats page. You should be able to see it.
  3. Repeat the above step on the site created before Feb 1, 2018. But this time, the banner should not appear on the page.

@taggon taggon added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Checklist labels Aug 24, 2018
@taggon taggon self-assigned this Aug 24, 2018
@matticbot

Copy link
Copy Markdown
Contributor

@taggon taggon changed the title Checklist: Hide banner from too old site. Checklist: Hide banner from too old sites. Aug 24, 2018
@taggon
taggon force-pushed the checklist/hide-banner-from-too-old-site branch from 1a98fd6 to 76783d8 Compare August 24, 2018 13:37
@taggon

taggon commented Aug 24, 2018

Copy link
Copy Markdown
Contributor Author

Rebased

@taggon
taggon force-pushed the checklist/hide-banner-from-too-old-site branch from 76783d8 to f564eea Compare August 24, 2018 15:37
@taggon
taggon requested a review from sirreal August 24, 2018 15:42
@sirreal
sirreal requested a review from a team August 24, 2018 17:02
Comment thread client/state/sites/constants.js Outdated
'woocommerce_is_active',
'jetpack_version',
'main_network_site',
'onboarding_checklist_initialized',

@gwwar gwwar Aug 24, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we really need this off the site object? Please be careful about bloating the site object further. We do have the option of adding additional endpoints if necessary.

Do you mind expanding on what this prop means? It still looks like the client is performing a number of checks in addition to looking at this value.

@mattwiebe mattwiebe Aug 24, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It basically means that the checklist has been initialized on the server side. I think that in practice it should be pretty redundant with the site age check already happening in the selector so I'll just eliminate it as I'd like to get this out the door.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the extra context @mattwiebe !

@gwwar
gwwar requested review from a team August 24, 2018 17:44
@drwpcom

drwpcom commented Aug 24, 2018

Copy link
Copy Markdown

@taggon Is this also related to #26890 or does it solve it?

redundant with the site age check already happening in the selector
@mattwiebe
mattwiebe self-requested a review August 24, 2018 20:17
@mattwiebe

Copy link
Copy Markdown
Contributor

@damiannep this will solve that issue

@mattwiebe
mattwiebe merged commit 9b4dfcb into master Aug 24, 2018
@mattwiebe
mattwiebe deleted the checklist/hide-banner-from-too-old-site branch August 24, 2018 20:55
@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 Aug 24, 2018
@dmsnell

dmsnell commented Aug 25, 2018

Copy link
Copy Markdown
Member

Did we explore performing this login in the backend? Do we not already poll for the checklist for a site? If the site is ineligible or too old what would prevent us from simply returning a response that indicates as much?

We could keep this code out of Calypso which would help guard against bloat and we could make sure that the mobile teams wouldn't have to recreate the logic and keep it in sync on their end.

sirreal added a commit that referenced this pull request Sep 10, 2018
Changed in #26867, regression introduced during rebase.
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.

6 participants