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

Guided Tours: Add Jetpack Sign-In Tour #25864

Merged
merged 2 commits into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/layout/guided-tours/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { ChecklistSiteTitleTour } from 'layout/guided-tours/tours/checklist-site
import { ChecklistUserAvatarTour } from 'layout/guided-tours/tours/checklist-user-avatar-tour';
import { JetpackBasicTour } from 'layout/guided-tours/tours/jetpack-basic-tour';
import { JetpackMonitoringTour } from 'layout/guided-tours/tours/jetpack-monitoring-tour';
import { JetpackSignInTour } from 'layout/guided-tours/tours/jetpack-sign-in-tour';
import { SimplePaymentsEmailTour } from 'layout/guided-tours/tours/simple-payments-email-tour';

export default combineTours( {
Expand All @@ -32,6 +33,7 @@ export default combineTours( {
checklistUserAvatar: ChecklistUserAvatarTour,
jetpack: JetpackBasicTour,
jetpackMonitoring: JetpackMonitoringTour,
jetpackSignIn: JetpackSignInTour,
main: MainTour,
editorBasicsTour: EditorBasicsTour,
mediaBasicsTour: MediaBasicsTour,
Expand Down
74 changes: 74 additions & 0 deletions client/layout/guided-tours/tours/jetpack-sign-in-tour.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/** @format */

/**
* External dependencies
*/
import React, { Fragment } from 'react';
import Gridicon from 'gridicons';

/**
* Internal dependencies
*/
import {
ButtonRow,
Continue,
makeTour,
Quit,
SiteLink,
Step,
Tour,
} from 'layout/guided-tours/config-elements';

export const JetpackSignInTour = makeTour(
<Tour name="jetpackSignIn" version="20180704">
<Step
name="init"
target=".sso__card .form-toggle__switch"
arrow="top-left"
placement="below"
style={ {
animationDelay: '0.7s',
zIndex: 1,
} }
>
{ ( { translate } ) => (
<Fragment>
<p>
{ translate(
"Let's enable sign in using WordPress.com's secure authentication " +
'for easy login by activating the toggle switch above.'
) }
</p>
<ButtonRow>
<Continue target=".sso__card .form-toggle__switch" step="finish" click hidden />
<SiteLink href="/checklist/: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(
'You can now sign into your Jetpack site with your WordPress.com account. Would you like to continue setting up the security essential features for your site?'
Copy link
Member

Choose a reason for hiding this comment

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

This line is too long now - care to split it into 2 lines? There are 2 sentences, so it should make sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Weird that eslint didn't complain about this...

Copy link
Member

Choose a reason for hiding this comment

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

Weird that eslint didn't complain about this...

#24635 added prettier eslint config. Line length is handled by prettier and max-length is no longer enforced.

Prettier doesn't break string and it's still nice to break lines that get too long 👍

) }
</p>
<ButtonRow>
<SiteLink isButton href={ '/checklist/:site' }>
{ translate( "Yes, let's do it." ) }
</SiteLink>
<Quit>{ translate( 'No thanks.' ) }</Quit>
</ButtonRow>
</Fragment>
) }
</Step>
</Tour>
);
1 change: 1 addition & 0 deletions client/my-sites/checklist/jetpack-checklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const tasks = {
completedTitle: translate( 'You completed your sign in preferences.' ),
completedButtonText: 'Change',
duration: translate( '3 min' ),
tour: 'jetpackSignIn',
url: '/settings/security/$siteSlug',
},
};
Expand Down