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

Customer Home: Add a welcome banner. #39557

Merged
merged 8 commits into from
Feb 21, 2020
Merged

Conversation

kwight
Copy link
Contributor

@kwight kwight commented Feb 20, 2020

Add a welcoming banner to Customer Home, so that users that have never been redirected there before can understand why they're there and how the page can help them.

Screen Shot 2020-02-20 at 3 14 17 PM

Screen Shot 2020-02-20 at 3 10 10 PM

Fixes #39178

Testing Instructions

  • Load this branch and select a site's Customer Home ("My Home") page.
  • Enable logging for Tracks in the console with localStorage.debug = 'calypso:analytics:*'.
  • Open DevTools' Network tab.
  • Click the X to close.
  • Verify a successful POST call to /me/preferences was made.
  • Confirm in the console that the Tracks event fired.
  • To retest, use the WP.com API console to POST to /me/preferences with {"dismissible-card-home-welcome-banner-dismissed":null} in the calypso_preferences body.

@kwight kwight requested a review from a team as a code owner February 20, 2020 02:26
@matticbot
Copy link
Contributor

@kwight kwight self-assigned this Feb 20, 2020
@kwight kwight added [Type] Task [Feature] My Home The main dashboard for managing a WordPress.com site. [Status] In Progress labels Feb 20, 2020
@kwight kwight added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Feb 20, 2020
@lcollette lcollette self-requested a review February 20, 2020 23:23
Copy link
Contributor

@gwwar gwwar left a comment

Choose a reason for hiding this comment

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

Thanks @kwight, giving tentative approval here 👍

Verified that the banner dismisses as a user preference, and dispatches the expected analytics.

I think the following screens are okay, but might be visually a lot to process:

  1. New User, launches site:

Screen Shot 2020-02-20 at 4 16 48 PM

  1. New User completes checklist:

Screen Shot 2020-02-20 at 4 17 14 PM

As an aside, what do folks think about adding white-space:no-wrap to the buttons on the page. It looks pretty weird when they wrap to two lines:

Screen Shot 2020-02-20 at 4 19 34 PM

With nowrap:
Screen Shot 2020-02-20 at 4 19 17 PM

@lcollette
Copy link
Contributor

I agree with @gwwar. Those screens are a lot to process visually.

The congratulatory messages should ideally be using the same component. It's a bit strange that they're in different locations with their own visual styles. Can we align those, @danhauk?

I'm also questioning whether both the welcome and congratulatory banners should be displayed together. If you've reached the launched your site step, is a welcome banner still relevant?

As an aside, what do folks think about adding white-space:no-wrap to the buttons on the page.

We should definitely do that. :)

@matticbot
Copy link
Contributor

matticbot commented Feb 21, 2020

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

Sections (~297 bytes added 📈 [gzipped])

name  parsed_size           gzip_size
home       +969 B  (+0.3%)     +297 B  (+0.4%)

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.

@danhauk
Copy link
Contributor

danhauk commented Feb 21, 2020

I'm also questioning whether both the welcome and congratulatory banners should be displayed together. If you've reached the launched your site step, is a welcome banner still relevant?

I agree. If there's a congratulatory banner present we should mark the welcome banner as dismissed so it doesn't show up. I'm not sure this will really be an issue if we add an age check to only show the welcome banner for users who have older sites as mentioned in #39557 (comment), but it's best to add that check to be safe.

@kwight Can we also suppress any upsells to give priority to this welcome banner and avoid stacking large banner cards? Things like this:

image

@kwight
Copy link
Contributor Author

kwight commented Feb 21, 2020

As an aside, what do folks think about adding white-space:no-wrap to the buttons on the page. It looks pretty weird when they wrap to two lines

Yep, agree; #39609 for consideration. @lcollette

@kwight kwight force-pushed the add/customer-home-welcome-banner branch from 2087eb7 to a040c14 Compare February 21, 2020 18:03
@kwight
Copy link
Contributor Author

kwight commented Feb 21, 2020

To summarize our conditions, we display the welcome banner if:

  • there is no congratulatory banner to be shown, and
  • the user was created before 2019-08-06, and
  • the user has not dismissed it (handled by the component automatically)

Also, we only display the upsell banner if we are not displaying the welcome banner.

I think I've got that all covered now 👍

@kwight kwight added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 21, 2020
@gwwar
Copy link
Contributor

gwwar commented Feb 21, 2020

Thanks Kirk, this is good to go after removing the site launch check.

Copy link
Contributor

@lcollette lcollette left a comment

Choose a reason for hiding this comment

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

Thanks, Kirk!

@kwight kwight merged commit 47df84c into master Feb 21, 2020
@kwight kwight deleted the add/customer-home-welcome-banner branch February 21, 2020 20:56
@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 Feb 21, 2020
mmtr added a commit that referenced this pull request Mar 20, 2020
* Moves all Home notices into their own components.
* It also consolidates all of them into the same celebrate format we started to use as a pattern for this kind of notices.
* The introductory welcome banner added for users that have never been redirected there (#39557) has been removed here in order to clean up a bit further the codebase. Likely, most of active users have already seen that banner so it should be safe to remove it
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. [Type] Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customer Home: Add a welcome banner for older sites
6 participants