Skip to content

Commit

Permalink
Move Jetpack connection to first step
Browse files Browse the repository at this point in the history
  • Loading branch information
ebinnion committed Sep 4, 2017
1 parent faffb02 commit 86c59e8
Show file tree
Hide file tree
Showing 5 changed files with 948 additions and 2,037 deletions.
11 changes: 2 additions & 9 deletions client/components/steps/jetpack-jumpstart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,9 @@ var JetpackJumpstart = React.createClass({

handleJetpackConnect: function( event ) {
event.preventDefault();
const path = JPS.bloginfo.type === 'business' ?
Paths.BUSINESS_ADDRESS_SLUG :
Paths.REVIEW_STEP_SLUG;

this.setState( { jetpackConnecting: true } );
SiteActions
.configureJetpack( path )
.configureJetpack( Paths.SITE_TITLE_STEP_SLUG )
.always(function() {
this.setState( { jetpackConnecting: false } );
}.bind( this ) );
Expand All @@ -62,10 +58,7 @@ var JetpackJumpstart = React.createClass({

handleSkip: function() {
SetupProgressActions.skipStep();
if ( JPS.bloginfo.type !== 'business' ) {
return SetupProgressActions.setCurrentStep( Paths.REVIEW_STEP_SLUG );
}
return SetupProgressActions.setCurrentStep( Paths.BUSINESS_ADDRESS_SLUG );
return SetupProgressActions.setCurrentStep( Paths.SITE_TITLE_STEP_SLUG );
},

render: function() {
Expand Down
12 changes: 6 additions & 6 deletions client/welcome-panel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ module.exports = function() {
// completed: true,
// static: true
// },
{
name: 'Enable Jetpack',
slug: Paths.JETPACK_MODULES_STEP_SLUG,
neverSkip: true, // don't skip this even if it's been completed
welcomeView: require('./components/steps/jetpack-jumpstart'),
},
{
name: 'Site title',
slug: Paths.SITE_TITLE_STEP_SLUG,
Expand All @@ -39,12 +45,6 @@ module.exports = function() {
slug: Paths.CONTACT_PAGE_STEP_SLUG,
welcomeView: require('./components/steps/contact')
},
{
name: 'Enable Jetpack',
slug: Paths.JETPACK_MODULES_STEP_SLUG,
neverSkip: true, // don't skip this even if it's been completed
welcomeView: require('./components/steps/jetpack-jumpstart'),
},
{
name: 'Business Address',
slug: Paths.BUSINESS_ADDRESS_SLUG,
Expand Down
12 changes: 6 additions & 6 deletions dist/ie-shims.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
webpackJsonp([1],{

/***/ 115:
/***/ 107:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Expand Down Expand Up @@ -574,7 +574,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!

/***/ }),

/***/ 116:
/***/ 108:
/***/ (function(module, exports, __webpack_require__) {

var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Expand Down Expand Up @@ -2650,15 +2650,15 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!

/***/ }),

/***/ 153:
/***/ 123:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


__webpack_require__(116);
__webpack_require__(115);
__webpack_require__(108);
__webpack_require__(107);

/***/ })

},[153]);
},[123]);
Loading

0 comments on commit 86c59e8

Please sign in to comment.