-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guided Tours: Add Jetpack Plugin Autoupdate Tour (#25474)
* Guided Tours: Add Jetpack Plugin Autoupdate Tour * Jetpack Checklist: Trigger Plugin Updates Tour * Plugins: Add plugin slug to Plugin item className * Query Plugins from checklist early
- Loading branch information
Showing
5 changed files
with
105 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
client/layout/guided-tours/tours/jetpack-plugin-updates-tour.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/** @format */ | ||
/** | ||
* External dependencies | ||
*/ | ||
import Gridicon from 'gridicons'; | ||
import React, { Fragment } from 'react'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import PluginsStore from 'lib/plugins/store'; | ||
import { getSelectedSite } from 'state/ui/selectors'; | ||
import { | ||
ButtonRow, | ||
Continue, | ||
makeTour, | ||
Quit, | ||
SiteLink, | ||
Step, | ||
Tour, | ||
} from 'layout/guided-tours/config-elements'; | ||
|
||
export const JetpackPluginUpdatesTour = makeTour( | ||
<Tour name="jetpackPluginUpdates" version="20180611"> | ||
<Step | ||
name="init" | ||
when={ state => { | ||
const site = getSelectedSite( state ); | ||
const res = | ||
! PluginsStore.isFetchingSite( site ) && !! PluginsStore.getSitePlugin( site, 'jetpack' ); | ||
return res; | ||
} } | ||
target=".plugin-item-jetpack .form-toggle__switch" | ||
arrow="top-left" | ||
placement="below" | ||
style={ { | ||
animationDelay: '0.7s', | ||
zIndex: 1, | ||
} } | ||
> | ||
{ ( { translate } ) => ( | ||
<Fragment> | ||
<p> | ||
{ translate( | ||
"Let's activate autoupdates for Jetpack to ensure you're always " + | ||
'up-to-date with the latest features and security fixes.' | ||
) } | ||
</p> | ||
<ButtonRow> | ||
<Continue | ||
target=".plugin-item-jetpack .form-toggle__switch" | ||
step="finish" | ||
click | ||
hidden | ||
/> | ||
<SiteLink href="/plans/my-plan/:site"> | ||
{ translate( 'Return to the checklist' ) } | ||
</SiteLink> | ||
</ButtonRow> | ||
</Fragment> | ||
) } | ||
</Step> | ||
|
||
<Step name="finish" placement="right"> | ||
{ ( { translate } ) => ( | ||
<Fragment> | ||
<h1 className="tours__title"> | ||
<span className="tours__completed-icon-wrapper"> | ||
<Gridicon icon="checkmark" className="tours__completed-icon" /> | ||
</span> | ||
{ translate( 'Excellent, you’re done!' ) } | ||
</h1> | ||
<p> | ||
{ translate( | ||
'Jetpack will now autoupdate for you. Would you like to continue setting up the security essential features for your site?' | ||
) } | ||
</p> | ||
<ButtonRow> | ||
<SiteLink isButton href="/plans/my-plan/:site"> | ||
{ translate( "Yes, let's do it." ) } | ||
</SiteLink> | ||
<Quit>{ translate( 'No thanks.' ) }</Quit> | ||
</ButtonRow> | ||
</Fragment> | ||
) } | ||
</Step> | ||
</Tour> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters