From 9b3c5550784e1567646aa2a003b27f17586575b0 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Thu, 11 Jul 2019 11:55:05 -0400 Subject: [PATCH 01/16] provide key to comments --- src/views/preview/comment/comment.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/preview/comment/comment.jsx b/src/views/preview/comment/comment.jsx index cbdeb7642..ef23195ea 100644 --- a/src/views/preview/comment/comment.jsx +++ b/src/views/preview/comment/comment.jsx @@ -196,11 +196,12 @@ class Comment extends React.Component { */} - {commentText.map(fragment => { + {commentText.map((fragment, index) => { if (typeof fragment === 'string') { return ( ); From 1e9b9a537d57550f565a530f660edaf28f13c37b Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Tue, 23 Jul 2019 12:09:10 -0400 Subject: [PATCH 02/16] correct select padding --- src/components/join-flow/join-flow-steps.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/join-flow/join-flow-steps.scss b/src/components/join-flow/join-flow-steps.scss index a56ff467f..95d6e9089 100644 --- a/src/components/join-flow/join-flow-steps.scss +++ b/src/components/join-flow/join-flow-steps.scss @@ -22,7 +22,7 @@ transform: translate(21.5625rem, 0); } -select.join-flow-select { +.select .join-flow-select { width: 9.125rem; } From e5b80bb8c3a7fb80acb99648e1ba1eb0688fe723 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Fri, 26 Jul 2019 13:38:16 -0400 Subject: [PATCH 03/16] better line spacing for join flow descriptions --- src/components/join-flow/join-flow-step.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/join-flow/join-flow-step.scss b/src/components/join-flow/join-flow-step.scss index 499646956..3ddb67718 100644 --- a/src/components/join-flow/join-flow-step.scss +++ b/src/components/join-flow/join-flow-step.scss @@ -9,6 +9,8 @@ .join-flow-description { font-size: .875rem; font-weight: bold; + line-height: 1.37500rem; + margin-top: 0.78125rem; margin-bottom: 1.875rem; text-align: center; } From 1cd0713bb962f1287b424421929e0b53410416f7 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Fri, 26 Jul 2019 15:54:16 -0400 Subject: [PATCH 04/16] added missing strings to join flow --- src/components/join-flow/birthdate-step.jsx | 4 ++-- src/components/join-flow/username-step.jsx | 6 ++++-- src/l10n.json | 7 ++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/join-flow/birthdate-step.jsx b/src/components/join-flow/birthdate-step.jsx index 708be8c16..7b0c421c3 100644 --- a/src/components/join-flow/birthdate-step.jsx +++ b/src/components/join-flow/birthdate-step.jsx @@ -86,9 +86,9 @@ class BirthDateStep extends React.Component { } = props; return ( diff --git a/src/components/join-flow/username-step.jsx b/src/components/join-flow/username-step.jsx index 2d0a8bb49..2feb38b59 100644 --- a/src/components/join-flow/username-step.jsx +++ b/src/components/join-flow/username-step.jsx @@ -110,7 +110,9 @@ class UsernameStep extends React.Component { } = props; return (
- {this.props.intl.formatMessage({id: 'general.password'})} + {this.props.intl.formatMessage({id: 'registration.choosePasswordStepTitle'})}
tips, tutorials, and guides.", "registration.choosePasswordStepDescription": "Type in a new password for your account. You will use this password the next time you log into Scratch.", @@ -148,7 +151,7 @@ "registration.classroomInviteNewStudentStepDescription": "Your teacher has invited you to join a class:", "registration.confirmYourEmail": "Confirm Your Email", "registration.confirmYourEmailDescription": "If you haven't already, please click the link in the confirmation email sent to:", - "registration.createUsername": "Create a Username", + "registration.createUsername": "Create a username", "registration.goToClass": "Go to Class", "registration.invitedBy": "invited by", "registration.lastStepTitle": "Thank you for requesting a Scratch Teacher Account", @@ -161,10 +164,12 @@ "registration.optIn": "Send me updates on using Scratch in educational settings", "registration.personalStepTitle": "Personal Information", "registration.personalStepDescription": "Your individual responses will not be displayed publicly, and will be kept confidential and secure", + "registration.private": "Scratch will always keep this information private.", "registration.selectCountry": "select country", "registration.studentPersonalStepDescription": "This information will not appear on the Scratch website.", "registration.showPassword": "Show password", "registration.usernameStepDescription": "Fill in the following forms to request an account. The approval process may take up to one day.", + "registration.usernameStepDescriptionNonEducator": "Create projects, share ideas, make friends. It’s free!", "registration.usernameStepRealName": "Please do not use any portion of your real name in your username.", "registration.studentUsernameStepDescription": "You can make games, animations, and stories using Scratch. Setting up an account is easy and it's free. Fill in the form below to get started.", "registration.studentUsernameStepHelpText": "Already have a Scratch account?", From 02c2f44b34c888463dc01a187d155b0f2bc105de Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2019 16:39:09 +0000 Subject: [PATCH 05/16] chore(package): update scratch-gui to version 0.1.0-prerelease.20190729162318 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6cc2a5d30..64c265a1d 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "redux": "3.5.2", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20190725155313", + "scratch-gui": "0.1.0-prerelease.20190729162318", "scratch-l10n": "latest", "selenium-webdriver": "3.6.0", "slick-carousel": "1.6.0", From 02a118b4deb83c601034c6d0ba8eb8fe322462cf Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2019 16:39:13 +0000 Subject: [PATCH 06/16] chore(package): update lockfile package-lock.json --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index efb2e5446..3e00ee8e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15084,9 +15084,9 @@ } }, "scratch-gui": { - "version": "0.1.0-prerelease.20190725155313", - "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190725155313.tgz", - "integrity": "sha512-L2qJNu3HGi8KbuPxw/3DSa56eeqR2N67MA6SZ5r+at3UrwSH68dzqp7NDJqmAjm66+dX7IaiammZ0QE6fLbKUQ==", + "version": "0.1.0-prerelease.20190729162318", + "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190729162318.tgz", + "integrity": "sha512-MU8GbMYTbN/hheq02zxPtC2n9s/cSMpnhiJoJovoJa4D47aYRRcp2TPUdrRqyCeqotpYJSMzYy+x/MtK2rnMdw==", "dev": true }, "scratch-l10n": { From 651807438a255f51e0bf23080074346c34c3812a Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Fri, 26 Jul 2019 16:26:11 -0400 Subject: [PATCH 07/16] better validation positioning on birthdate step --- src/components/formik-forms/formik-select.jsx | 2 +- src/components/forms/validation-message.scss | 1 + src/components/join-flow/birthdate-step.jsx | 4 ++-- src/components/join-flow/join-flow-steps.scss | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/components/formik-forms/formik-select.jsx b/src/components/formik-forms/formik-select.jsx index 5ec1bcdf5..defff80ef 100644 --- a/src/components/formik-forms/formik-select.jsx +++ b/src/components/formik-forms/formik-select.jsx @@ -24,7 +24,7 @@ const FormikSelect = ({ )); return ( -
+
diff --git a/src/components/join-flow/join-flow-steps.scss b/src/components/join-flow/join-flow-steps.scss index 95d6e9089..64bfa562d 100644 --- a/src/components/join-flow/join-flow-steps.scss +++ b/src/components/join-flow/join-flow-steps.scss @@ -22,6 +22,23 @@ transform: translate(21.5625rem, 0); } +.validation-birthdate-input { + transform: translate(8.75rem, .25rem); + width: 7.25rem; +} + +@media #{$intermediate-and-smaller} { + .validation-full-width-input { + transform: unset; + margin-bottom: .75rem; + } + + .validation-birthdate-input { + transform: unset; + width: 8rem; + } +} + .select .join-flow-select { width: 9.125rem; } From a435626ae13e4129755c7b4f305c4769c77f439f Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Mon, 29 Jul 2019 22:29:04 -0400 Subject: [PATCH 08/16] added stubs for email step, welcome step --- src/components/join-flow/email-step.jsx | 63 +++++++++++++++++++++ src/components/join-flow/join-flow.jsx | 7 +++ src/components/join-flow/welcome-step.jsx | 69 +++++++++++++++++++++++ src/l10n.json | 4 ++ 4 files changed, 143 insertions(+) create mode 100644 src/components/join-flow/email-step.jsx create mode 100644 src/components/join-flow/welcome-step.jsx diff --git a/src/components/join-flow/email-step.jsx b/src/components/join-flow/email-step.jsx new file mode 100644 index 000000000..aade0a4c0 --- /dev/null +++ b/src/components/join-flow/email-step.jsx @@ -0,0 +1,63 @@ +const bindAll = require('lodash.bindall'); +const React = require('react'); +const PropTypes = require('prop-types'); +import {Formik} from 'formik'; +const {injectIntl, intlShape} = require('react-intl'); + +const JoinFlowStep = require('./join-flow-step.jsx'); + +require('./join-flow-steps.scss'); + +class EmailStep extends React.Component { + constructor (props) { + super(props); + bindAll(this, [ + 'handleValidSubmit', + 'validateForm' + ]); + } + validateForm () { + return {}; + } + handleValidSubmit (formData, formikBag) { + formikBag.setSubmitting(false); + this.props.onNextStep(formData); + } + render () { + return ( + + {props => { + const { + handleSubmit, + isSubmitting + } = props; + return ( + + ); + }} + + ); + } +} + +EmailStep.propTypes = { + intl: intlShape, + onNextStep: PropTypes.func +}; + +module.exports = injectIntl(EmailStep); diff --git a/src/components/join-flow/join-flow.jsx b/src/components/join-flow/join-flow.jsx index efa663abd..8fba007f1 100644 --- a/src/components/join-flow/join-flow.jsx +++ b/src/components/join-flow/join-flow.jsx @@ -9,6 +9,8 @@ const intlShape = require('../../lib/intl.jsx').intlShape; const Progression = require('../progression/progression.jsx'); const UsernameStep = require('./username-step.jsx'); const BirthDateStep = require('./birthdate-step.jsx'); +const EmailStep = require('./email-step.jsx'); +const WelcomeStep = require('./welcome-step.jsx'); /* eslint-disable react/prefer-stateless-function, react/no-unused-prop-types, no-useless-constructor @@ -38,6 +40,11 @@ class JoinFlow extends React.Component { + + ); diff --git a/src/components/join-flow/welcome-step.jsx b/src/components/join-flow/welcome-step.jsx new file mode 100644 index 000000000..4f2220e62 --- /dev/null +++ b/src/components/join-flow/welcome-step.jsx @@ -0,0 +1,69 @@ +const bindAll = require('lodash.bindall'); +const React = require('react'); +const PropTypes = require('prop-types'); +import {Formik} from 'formik'; +const {injectIntl, intlShape} = require('react-intl'); + +const JoinFlowStep = require('./join-flow-step.jsx'); + +require('./join-flow-steps.scss'); + +class WelcomeStep extends React.Component { + constructor (props) { + super(props); + bindAll(this, [ + 'handleValidSubmit', + 'validateForm' + ]); + } + validateForm () { + return {}; + } + handleValidSubmit (formData, formikBag) { + formikBag.setSubmitting(false); + this.props.onNextStep(formData); + } + render () { + return ( + + {props => { + const { + handleSubmit, + isSubmitting + } = props; + return ( + + ); + }} + + ); + } +} + +WelcomeStep.propTypes = { + intl: intlShape, + onNextStep: PropTypes.func, + username: PropTypes.string +}; + +module.exports = injectIntl(WelcomeStep); diff --git a/src/l10n.json b/src/l10n.json index b0853e981..7b5c693e5 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -152,6 +152,8 @@ "registration.confirmYourEmail": "Confirm Your Email", "registration.confirmYourEmailDescription": "If you haven't already, please click the link in the confirmation email sent to:", "registration.createUsername": "Create a username", + "registration.emailStepTitle": "What's your email?", + "registration.emailStepDescription": "We need this to finish creating your account. Scratch will always keep this information private.", "registration.goToClass": "Go to Class", "registration.invitedBy": "invited by", "registration.lastStepTitle": "Thank you for requesting a Scratch Teacher Account", @@ -190,8 +192,10 @@ "registration.waitForApproval": "Wait for Approval", "registration.waitForApprovalDescription": "You can log into your Scratch Account now, but the features specific to Teachers are not yet available. Your information is being reviewed. Please be patient, the approval process can take up to one day. You will receive an email indicating your account has been upgraded once your account has been approved.", "registration.welcomeStepDescription": "You have successfully set up a Scratch account! You are now a member of the class:", + "registration.welcomeStepDescriptionNonEducator": "You’re now logged in! You can start exploring and creating projects.", "registration.welcomeStepPrompt": "To get started, click on the button below.", "registration.welcomeStepTitle": "Hurray! Welcome to Scratch!", + "registration.welcomeStepTitleNonEducator": "Welcome to Scratch, {username}!", "thumbnail.by": "by", "report.error": "Something went wrong when trying to send your message. Please try again.", From a2bf6ff27bf10075b174be49087eb0791eda13bf Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Tue, 30 Jul 2019 14:13:42 -0400 Subject: [PATCH 09/16] update translation command to npm run translate --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6b69db03c..a6d38d01a 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,10 @@ These currently exist in static/js/lib ### To Run If you would like to create a temporary version of the site on your machine that you can access through your web browser run the command below. Building (see To Build above) is not necessary for this step and the temporary server can be turned off (see To Stop below). -The intl directory must be built separately with the `make translations` line below in order for the text to appear properly. +The intl directory must be built separately with the `npm run translate` line below in order for the text to appear properly. ```bash -make translations +npm run translate npm start ``` From db3c73c267f01f3f43dd3cae4a8975b92374e9e6 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Tue, 30 Jul 2019 14:21:19 -0400 Subject: [PATCH 10/16] removed errant birth_month and birth_year variables --- src/components/join-flow/email-step.jsx | 2 -- src/components/join-flow/welcome-step.jsx | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/components/join-flow/email-step.jsx b/src/components/join-flow/email-step.jsx index aade0a4c0..fcfe613a3 100644 --- a/src/components/join-flow/email-step.jsx +++ b/src/components/join-flow/email-step.jsx @@ -27,8 +27,6 @@ class EmailStep extends React.Component { return ( Date: Tue, 30 Jul 2019 19:46:58 +0000 Subject: [PATCH 11/16] chore(package): update scratch-gui to version 0.1.0-prerelease.20190730192808 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64c265a1d..1f8d211ed 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "redux": "3.5.2", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20190729162318", + "scratch-gui": "0.1.0-prerelease.20190730192808", "scratch-l10n": "latest", "selenium-webdriver": "3.6.0", "slick-carousel": "1.6.0", From 18839497fbec2c3b3624386481c9b30e85a1595c Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2019 19:47:02 +0000 Subject: [PATCH 12/16] chore(package): update lockfile package-lock.json --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3e00ee8e2..e4a8679c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15084,9 +15084,9 @@ } }, "scratch-gui": { - "version": "0.1.0-prerelease.20190729162318", - "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190729162318.tgz", - "integrity": "sha512-MU8GbMYTbN/hheq02zxPtC2n9s/cSMpnhiJoJovoJa4D47aYRRcp2TPUdrRqyCeqotpYJSMzYy+x/MtK2rnMdw==", + "version": "0.1.0-prerelease.20190730192808", + "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190730192808.tgz", + "integrity": "sha512-9bsbQBJ/LK+YW9uvwq65UY8y+BnIrw2yKJGC4m/RcWpHhd1Mg20alHkDoL9afbMDkdrm7ORhXqcMHEGB29Bxqw==", "dev": true }, "scratch-l10n": { From 5b870fdf02f0464b3588e403a03ee3c99cd938cb Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2019 16:06:05 +0000 Subject: [PATCH 13/16] chore(package): update scratch-gui to version 0.1.0-prerelease.20190731154138 Closes #3193 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f8d211ed..6d6b26ecb 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "redux": "3.5.2", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20190730192808", + "scratch-gui": "0.1.0-prerelease.20190731154138", "scratch-l10n": "latest", "selenium-webdriver": "3.6.0", "slick-carousel": "1.6.0", From 9ee4cc39fbbde62ec2e95013b1a4dc74690141ed Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2019 16:06:09 +0000 Subject: [PATCH 14/16] chore(package): update lockfile package-lock.json --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e4a8679c5..50c71d566 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15084,9 +15084,9 @@ } }, "scratch-gui": { - "version": "0.1.0-prerelease.20190730192808", - "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190730192808.tgz", - "integrity": "sha512-9bsbQBJ/LK+YW9uvwq65UY8y+BnIrw2yKJGC4m/RcWpHhd1Mg20alHkDoL9afbMDkdrm7ORhXqcMHEGB29Bxqw==", + "version": "0.1.0-prerelease.20190731154138", + "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190731154138.tgz", + "integrity": "sha512-nDW0ciQv1u6ClETDA5rHgtgP1VW1D0EQ8jN7soBJ8IdsIDTEN9BgxSlV84j/ydWikE0hm+VTaxCLV6YsegHVhg==", "dev": true }, "scratch-l10n": { From 5859b28c06a4622da3f7a9b24f1c596ca7c015db Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2019 19:40:52 +0000 Subject: [PATCH 15/16] chore(package): update scratch-gui to version 0.1.0-prerelease.20190731192641 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d6b26ecb..f4231a313 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "redux": "3.5.2", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20190731154138", + "scratch-gui": "0.1.0-prerelease.20190731192641", "scratch-l10n": "latest", "selenium-webdriver": "3.6.0", "slick-carousel": "1.6.0", From 94ba7b7e9838ed101a17863b8d3f3e69a402c969 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2019 19:40:56 +0000 Subject: [PATCH 16/16] chore(package): update lockfile package-lock.json --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 50c71d566..5d4c6b08e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15084,15 +15084,15 @@ } }, "scratch-gui": { - "version": "0.1.0-prerelease.20190731154138", - "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190731154138.tgz", - "integrity": "sha512-nDW0ciQv1u6ClETDA5rHgtgP1VW1D0EQ8jN7soBJ8IdsIDTEN9BgxSlV84j/ydWikE0hm+VTaxCLV6YsegHVhg==", + "version": "0.1.0-prerelease.20190731192641", + "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190731192641.tgz", + "integrity": "sha512-f5fQKHt1LjJ5jBvtuFu1ULOwggs0g54FARVr1dz4oi98yL64jP6tlowORKoejX5P1sO9Awt1/26d6Gp+411L0A==", "dev": true }, "scratch-l10n": { - "version": "3.5.20190724182907", - "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.5.20190724182907.tgz", - "integrity": "sha512-HEYsebVd53+eugt2N8OkWUYhnn/GEtAhH33dwUCIKAkzRJAwMmzcDUf1MyNzpAcGMH8Zr0K5QtyYH95bGfcpZA==", + "version": "3.5.20190731161310", + "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.5.20190731161310.tgz", + "integrity": "sha512-9McnU3CVt8BdLP1rYmlb6IhJNFYdhcI6AaBs9dEH+C+dBJ2ncPg71nLt3Te4OE2v8L2JyKvVsWSTrffeEHLlfQ==", "dev": true, "requires": { "@babel/cli": "^7.1.2",