From 465a87d453480cccf69363b9b04ac03f7344d088 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Mon, 23 Sep 2019 11:16:44 -0400 Subject: [PATCH 1/3] use Scratch3Registration instead of JoinModal in /join --- src/views/join/join.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/join/join.jsx b/src/views/join/join.jsx index a62e7d449..4b2b9e6b5 100644 --- a/src/views/join/join.jsx +++ b/src/views/join/join.jsx @@ -1,6 +1,6 @@ const React = require('react'); const render = require('../../lib/render.jsx'); -const JoinModal = require('../../components/modal/join/modal.jsx'); +const Scratch3Registration = require('../../components/registration/scratch3-registration.jsx'); const ErrorBoundary = require('../../components/errorboundary/errorboundary.jsx'); // Require this even though we don't use it because, without it, webpack runs out of memory... const Page = require('../../components/page/www/page.jsx'); // eslint-disable-line no-unused-vars @@ -20,7 +20,8 @@ const Register = () => ( - Date: Mon, 23 Sep 2019 11:25:10 -0400 Subject: [PATCH 2/3] pass createProjectOnComplete prop through join flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …so welcome step can display correct completion text --- src/components/join-flow/join-flow.jsx | 2 ++ src/components/join-flow/welcome-step.jsx | 7 +++++-- src/components/modal/join/modal.jsx | 5 ++++- src/components/registration/scratch3-registration.jsx | 5 +++-- src/l10n.json | 1 + 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/components/join-flow/join-flow.jsx b/src/components/join-flow/join-flow.jsx index 6849531e6..2d40452e2 100644 --- a/src/components/join-flow/join-flow.jsx +++ b/src/components/join-flow/join-flow.jsx @@ -155,6 +155,7 @@ class JoinFlow extends React.Component { onRegistrationError={this.handleRegistrationError} /> - } + ) : ( + + )} title={`${this.props.intl.formatMessage( {id: 'registration.welcomeStepTitleNonEducator'}, {username: this.props.username} @@ -79,6 +81,7 @@ class WelcomeStep extends React.Component { } WelcomeStep.propTypes = { + createProjectOnComplete: PropTypes.bool, email: PropTypes.string, intl: intlShape, onNextStep: PropTypes.func, diff --git a/src/components/modal/join/modal.jsx b/src/components/modal/join/modal.jsx index bd17ac6ab..7edc22a3c 100644 --- a/src/components/modal/join/modal.jsx +++ b/src/components/modal/join/modal.jsx @@ -6,7 +6,8 @@ const JoinFlow = require('../../join-flow/join-flow.jsx'); require('./modal.scss'); const JoinModal = ({ - onCompleteRegistration, // eslint-disable-line no-unused-vars + createProjectOnComplete, + onCompleteRegistration, onRequestClose, ...modalProps }) => ( @@ -20,12 +21,14 @@ const JoinModal = ({ {...modalProps} > ); JoinModal.propTypes = { + createProjectOnComplete: PropTypes.bool, onCompleteRegistration: PropTypes.func, onRequestClose: PropTypes.func, showCloseButton: PropTypes.bool diff --git a/src/components/registration/scratch3-registration.jsx b/src/components/registration/scratch3-registration.jsx index 220c01433..0dbf68289 100644 --- a/src/components/registration/scratch3-registration.jsx +++ b/src/components/registration/scratch3-registration.jsx @@ -8,12 +8,14 @@ const JoinModal = require('../modal/join/modal.jsx'); require('./registration.scss'); const Registration = ({ + createProjectOnComplete, handleCloseRegistration, handleCompleteRegistration, isOpen }) => (
Date: Tue, 24 Sep 2019 18:43:29 -0400 Subject: [PATCH 3/3] wired showCloseButton through new join flow --- src/components/registration/scratch3-registration.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/registration/scratch3-registration.jsx b/src/components/registration/scratch3-registration.jsx index 0dbf68289..f88031b8e 100644 --- a/src/components/registration/scratch3-registration.jsx +++ b/src/components/registration/scratch3-registration.jsx @@ -11,13 +11,15 @@ const Registration = ({ createProjectOnComplete, handleCloseRegistration, handleCompleteRegistration, - isOpen + isOpen, + showCloseButton }) => (
@@ -28,7 +30,8 @@ Registration.propTypes = { createProjectOnComplete: PropTypes.bool, handleCloseRegistration: PropTypes.func, handleCompleteRegistration: PropTypes.func, - isOpen: PropTypes.bool + isOpen: PropTypes.bool, + showCloseButton: PropTypes.bool }; const mapDispatchToProps = (dispatch, ownProps) => ({