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

Add "warm welcome" for newly purchased plans #7837

Merged
merged 12 commits into from
Sep 25, 2017
Merged

Conversation

dereksmart
Copy link
Member

@dereksmart dereksmart commented Sep 22, 2017

Fixes #7374

This PR works in the following technical ways:

  • If the Jetpack plan changes, an option show_welcome_for_new_plan will be set and act as a flag to whether or not a "new plan" was purchased. It should not set if the plan changes/downgrades to "free"
  • New <WelcomeNewPlan /> component, which acts as a "parent" component to the dummy individual welcomes.
  • Dismissing simply sets the flag option to false.

To Test:

  • Upgrade to any plan.
  • You should see the warm welcome on any admin screen
  • Dismissing should dismiss
  • Links should all dismiss and take you to the respective places
  • Should not be able to see it at all if not an admin, or on free plan of any kind.

Hacks to make testing easier:

  • manually set the flag option update_option( 'show_welcome_for_new_plan', true ); and then using the dev tools, select a paid plan.
  • Use the dev tools at the bottom of the page to switch between plans and check how it feels
  • Since the modal is hiding the "dev tools" footer link, you can manually trigger it by writing window.dispatch( { type: "DEV_CARD_DISPLAY" } ); in the browser console. If the dev tools little window is opened it won't get covered by the modal

In progress until @MichaelArestad gets his hands on it

@dereksmart dereksmart added Admin Page React-powered dashboard under the Jetpack menu [Status] In Progress [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it labels Sep 22, 2017
@dereksmart dereksmart requested a review from a team as a code owner September 22, 2017 18:11
@MichaelArestad
Copy link
Contributor

Updated the content with help from @nicoleckohler.

Screenshots:

image
image
image

Sorry about the weird crops. My screenshotting tool stopped working :/ CC @rickybanister

@dereksmart I think everything works, but it could use some double checking. Also, you might have a better idea how to insert/use the SVGs. They don't have to be inline.

@dereksmart
Copy link
Member Author

@MichaelArestad thanks. I pushed a30a4bf which cleans up the inline svgs. We already had some of them in Jetpack :)

I also renamed a couple of the new ones based on their ID. Figured it would be easier to cross reference later.

This is ready for final review.

@dereksmart dereksmart added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress labels Sep 23, 2017
@dereksmart dereksmart force-pushed the add/welcome-new-plan branch 2 times, most recently from faeb3a6 to 61dac03 Compare September 23, 2017 16:30
@MichaelArestad
Copy link
Contributor

Nice. Thank you, Derek! Let's get it code reviewed and in. I'd like to swap one of the images in the Personal plan, but I can do that in a further PR.

@@ -201,3 +201,12 @@ export function appsCardDismissed( state ) {
export function emptyStatsCardDismissed( state ) {
return get( state.jetpack.settings.items, 'dismiss_empty_stats_card', false );
}

/**
* Returns true if Empty Stats card has been dismissed.
Copy link
Contributor

Choose a reason for hiding this comment

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

This description for showWelcomeForNewPlan is weird

Copy link
Member Author

Choose a reason for hiding this comment

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

bad copy pasta. fixed in 6c5c299

@oskosk
Copy link
Contributor

oskosk commented Sep 25, 2017

For the Premium plan, click the link "Monetize your site with ads", takes me to the traffic tab, but on a random scroll position. Well, this happens for every link taking to Traffic on Premium and Professional plans, so it's consistent.

Other than that, LGTM !

@MichaelArestad
Copy link
Contributor

@dereksmart are the buttons recording events in tracks?

@oskosk
Copy link
Contributor

oskosk commented Sep 25, 2017

Don't know if this is relevant, but, by switching with the dev tools from admin, to editor, and then from free to premium, I still get to see the modal

@dereksmart
Copy link
Member Author

@oskosk I wouldn't really trust the "role" option in the dev tool ;) Best to log in as a real editor

@oskosk oskosk added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Sep 25, 2017
@dereksmart
Copy link
Member Author

@MichaelArestad PR incoming with tracks

@dereksmart dereksmart merged commit fd23893 into master Sep 25, 2017
@dereksmart dereksmart deleted the add/welcome-new-plan branch September 25, 2017 21:47
@dereksmart dereksmart removed the [Status] Ready to Merge Go ahead, you can push that green button! label Sep 25, 2017
jeherve added a commit that referenced this pull request Sep 26, 2017
dereksmart added a commit that referenced this pull request Sep 26, 2017
* initial commit for running changelog

* Update stable tag in readme

* Changelog: move old releases to changelog.txt.

Also add release post URL for 5.4

* Changelog: add #7729

* Changelog: add #7736

* Changelog: add #7737

* Changelog: add #7740

* Changelog: add #7742

* Changelog: add #7366

* Changelog: add #7664

* Changelog: add #7751

* Changelog: add #7764

* Changelog: add #7768

* Changelog: add #7796

* Changelog: add #7798

* Changelog: add #7822

* Changelog: add #7824

* Changelog: add #7825

* Changelog: add #7826

* Changelog: add #7829

* Changelog: add #7831

* Changelog: add #7837

* Changelog: add #7850

* Changelog: add #7852

* Changelog: add #6538

* Changelog: add #7767

* Changelog: add #7782

* Changelog: add #7797

* Changelog: add #7819

* update to-test to add misc stuff

* add comment edit fix to changelog
dereksmart added a commit that referenced this pull request Sep 26, 2017
* initial commit for running changelog

* Update stable tag in readme

* Changelog: move old releases to changelog.txt.

Also add release post URL for 5.4

* Changelog: add #7729

* Changelog: add #7736

* Changelog: add #7737

* Changelog: add #7740

* Changelog: add #7742

* Changelog: add #7366

* Changelog: add #7664

* Changelog: add #7751

* Changelog: add #7764

* Changelog: add #7768

* Changelog: add #7796

* Changelog: add #7798

* Changelog: add #7822

* Changelog: add #7824

* Changelog: add #7825

* Changelog: add #7826

* Changelog: add #7829

* Changelog: add #7831

* Changelog: add #7837

* Changelog: add #7850

* Changelog: add #7852

* Changelog: add #6538

* Changelog: add #7767

* Changelog: add #7782

* Changelog: add #7797

* Changelog: add #7819

* update to-test to add misc stuff

* add comment edit fix to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Feature] Warm Welcome [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants