Merge remote-tracking branch 'origin/develop' into release/2022-02-02

This commit is contained in:
kchadha 2022-02-02 16:28:16 +00:00
commit 5437d44c3b
9 changed files with 125 additions and 184 deletions

View file

@ -8,92 +8,74 @@ aliases:
username: $DOCKERHUB_USERNAME username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD password: $DOCKERHUB_PASSWORD
working_directory: ~/repo working_directory: ~/repo
- &save_git_cache - &setup
save_cache: name: "setup"
paths: command: |
- .git npm --production=false ci
key: v1-git-{{ .Revision }} mkdir ./test/results
- &restore_git_cache - &lint
restore_cache: name: "run lint tests"
keys: command: |
- v1-git-{{ .Revision }} npm run test:lint:ci
- v1-git- - &build
- &save_npm_cache name: "run npm build"
save_cache: command: |
paths: WWW_VERSION=${CIRCLE_SHA1:0:5} npm run build
- node_modules - &unit
key: v1-npm-{{ checksum "package-lock.json" }} name: "Run unit tests"
- &restore_npm_cache command: |
restore_cache: JEST_JUNIT_OUTPUT_NAME=unit-jest-results.xml npm run test:unit:jest:unit -- --reporters=jest-junit
keys: JEST_JUNIT_OUTPUT_NAME=localization-jest-results.xml npm run test:unit:jest:localization -- --reporters=jest-junit
- v1-npm-{{ checksum "package-lock.json" }} npm run test:unit:tap -- --output-file ./test/results/unit-raw.tap
- &save_build_cache npm run test:unit:convertReportToXunit
save_cache: - &setup_python
paths: name: "setup python"
- ./build command: |
- ./intl curl https://bootstrap.pypa.io/pip/3.5/get-pip.py -o get-pip.py
key: v1-build-{{ .Revision }} python3 get-pip.py pip==21.0.1
- &restore_build_cache pip install s3cmd==2.1.0
restore_cache: - &deploy
keys: name: "deploy"
- v1-build-{{ .Revision }} command: |
- v1-build- npm run deploy
- &build_no_cache - &integration
name: "integration tests with Jest"
command: |
JEST_JUNIT_OUTPUT_NAME=integration-jest-results.xml npm run test:integration:remote -- --reporters=jest-junit
- &build_no_deploy
<<: *defaults <<: *defaults
resource_class: large resource_class: large
steps: steps:
- checkout - checkout
- run: - run:
name: "setup" <<: *setup
command: |
npm --production=false ci
mkdir ./test/results
- run: - run:
name: "run lint tests" <<: *lint
command: |
npm run test:lint:ci
- run: - run:
name: "run npm build" <<: *build
command: |
WWW_VERSION=${CIRCLE_SHA1:0:5} npm run build
- run: - run:
name: "Run unit tests" <<: *unit
command: |
JEST_JUNIT_OUTPUT_NAME=unit-jest-results.xml npm run test:unit:jest:unit -- --reporters=jest-junit
JEST_JUNIT_OUTPUT_NAME=localization-jest-results.xml npm run test:unit:jest:localization -- --reporters=jest-junit
npm run test:unit:tap -- --output-file ./test/results/unit-raw.tap
npm run test:unit:convertReportToXunit
- store_test_results: - store_test_results:
path: test/results path: test/results
- &build - &build_and_deploy
<<: *defaults <<: *defaults
resource_class: large resource_class: large
steps: steps:
- *restore_git_cache
- checkout - checkout
- run: - run:
name: "setup" <<: *setup
command: |
npm --production=false ci
mkdir ./test/results
- run: - run:
name: "run lint tests" <<: *lint
command: |
npm run test:lint:ci
- run: - run:
name: "run npm build" <<: *build
command: |
WWW_VERSION=${CIRCLE_SHA1:0:5} npm run build
- run: - run:
name: "Run unit tests" <<: *unit
command: | - run:
JEST_JUNIT_OUTPUT_NAME=unit-jest-results.xml npm run test:unit:jest:unit -- --reporters=jest-junit <<: *setup_python
JEST_JUNIT_OUTPUT_NAME=localization-jest-results.xml npm run test:unit:jest:localization -- --reporters=jest-junit - run:
npm run test:unit:tap -- --output-file ./test/results/unit-raw.tap <<: *deploy
npm run test:unit:convertReportToXunit - run:
- *save_npm_cache <<: *integration
- *save_git_cache
- *save_build_cache
- store_test_results: - store_test_results:
path: test/results path: test/results
- run: - run:
@ -101,35 +83,6 @@ aliases:
command: tar -cvzf build.tar build command: tar -cvzf build.tar build
- store_artifacts: - store_artifacts:
path: build.tar path: build.tar
- &deploy
<<: *defaults
steps:
- *restore_git_cache
- checkout
- *restore_npm_cache
- *restore_build_cache
- run:
name: "setup python"
command: |
curl https://bootstrap.pypa.io/pip/3.5/get-pip.py -o get-pip.py
python3 get-pip.py pip==21.0.1
pip install s3cmd==2.1.0
- run:
name: "deploy"
command: |
npm run deploy
- &integration_jest
<<: *defaults
steps:
- *restore_git_cache
- checkout
- *restore_npm_cache
- run:
name: "integration tests with Jest"
command: |
JEST_JUNIT_OUTPUT_NAME=integration-jest-results.xml npm run test:integration:remote -- --reporters=jest-junit
- store_test_results:
path: test/results
- &update-translations - &update-translations
<<: *defaults <<: *defaults
steps: steps:
@ -141,28 +94,21 @@ aliases:
name: "run i18n script" name: "run i18n script"
command: npm run i18n:push command: npm run i18n:push
# build-test-deploy requires two separately named jobs
jobs: jobs:
build-staging: build-and-deploy-staging:
<<: *build <<: *build_and_deploy
build-production: build-and-deploy-production:
<<: *build <<: *build_and_deploy
deploy-staging:
<<: *deploy
deploy-production:
<<: *deploy
integration-staging-jest:
<<: *integration_jest
integration-production-jest:
<<: *integration_jest
update-translations: update-translations:
<<: *update-translations <<: *update-translations
build-no-cache: build-no-deploy:
<<: *build_no_cache <<: *build_no_deploy
workflows: workflows:
build-test-deploy: build-test-deploy:
jobs: jobs:
- build-staging: - build-and-deploy-staging:
context: context:
- scratch-www-all - scratch-www-all
- scratch-www-staging - scratch-www-staging
@ -172,7 +118,7 @@ workflows:
- develop - develop
- /^hotfix\/.*/ - /^hotfix\/.*/
- /^release\/.*/ - /^release\/.*/
- build-production: - build-and-deploy-production:
context: context:
- scratch-www-all - scratch-www-all
- scratch-www-production - scratch-www-production
@ -180,50 +126,6 @@ workflows:
branches: branches:
only: only:
- master - master
- deploy-staging:
context:
- scratch-www-all
- scratch-www-staging
requires:
- build-staging
filters:
branches:
only:
- develop
- /^hotfix\/.*/
- /^release\/.*/
- deploy-production:
context:
- scratch-www-all
- scratch-www-production
requires:
- build-production
filters:
branches:
only:
- master
- integration-staging-jest:
context:
- scratch-www-all
- scratch-www-staging
requires:
- deploy-staging
filters:
branches:
only:
- develop
- /^hotfix\/.*/
- /^release\/.*/
- integration-production-jest:
context:
- scratch-www-all
- scratch-www-production
requires:
- deploy-production
filters:
branches:
only:
- master
Update-translations: Update-translations:
triggers: triggers:
- schedule: # every evening at 7pm EST (8pm EDT, Midnight UTC) - schedule: # every evening at 7pm EST (8pm EDT, Midnight UTC)
@ -242,7 +144,7 @@ workflows:
- develop - develop
build-test-no-deploy: build-test-no-deploy:
jobs: jobs:
- build-no-cache: - build-no-deploy:
filters: filters:
branches: branches:
ignore: ignore:

36
package-lock.json generated
View file

@ -4509,9 +4509,9 @@
"dev": true "dev": true
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001300", "version": "1.0.30001305",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001300.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001305.tgz",
"integrity": "sha512-cVjiJHWGcNlJi8TZVKNMnvMid3Z3TTdDHmLDzlOdIiZq138Exvo0G+G0wTdVYolxKb4AYwC+38pxodiInVtJSA==", "integrity": "sha512-p7d9YQMji8haf0f+5rbcv9WlQ+N5jMPfRAnUmZRlNxsNeBO3Yr7RYG6M2uTY1h9tCVdlkJg6YNNc4kiAiBLdWA==",
"dev": true "dev": true
}, },
"canvas-fit": { "canvas-fit": {
@ -20578,9 +20578,9 @@
} }
}, },
"scratch-gui": { "scratch-gui": {
"version": "0.1.0-prerelease.20220118124756", "version": "0.1.0-prerelease.20220202135032",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20220118124756.tgz", "resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20220202135032.tgz",
"integrity": "sha512-dyF9po7oRRIjslNFZoRa6I46YtKf5qeOEbDYk/bmqHdcr6MqnqVv6fV9je8PuBNCY9La/PbpPmbG2KsEr+Z37g==", "integrity": "sha512-OelxP2ULGnLz0f2Y10rdZ2cAipM2Iho8ZJYewesevOs3KhZKQguyj+b0D3T2fTxnU8CXKq36dpt7oGFGxJcPLg==",
"dev": true, "dev": true,
"requires": { "requires": {
"arraybuffer-loader": "^1.0.6", "arraybuffer-loader": "^1.0.6",
@ -20789,9 +20789,9 @@
"dev": true "dev": true
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.4.47", "version": "1.4.61",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.47.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.61.tgz",
"integrity": "sha512-ZHc8i3/cgeCRK/vC7W2htAG6JqUmOUgDNn/f9yY9J8UjfLjwzwOVEt4MWmgJAdvmxyrsR5KIFA/6+kUHGY0eUA==", "integrity": "sha512-kpzCOOFlx63C9qKRyIDEsKIUgzoe98ump7T4gU+/OLzj8gYkkWf2SIyBjhTSE0keAjMAp3i7C262YtkQOMYrGw==",
"dev": true "dev": true
}, },
"has-flag": { "has-flag": {
@ -20994,6 +20994,18 @@
"integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
"dev": true "dev": true
}, },
"scratch-l10n": {
"version": "3.14.20220118031528",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.14.20220118031528.tgz",
"integrity": "sha512-y5Mzi+r6hxZ3kfax3aXhfiJwJIfN8FHdcvLd0E46KqUjpbvbs1TTUZjWBQdV9SmWAwii8L7U0z+1iWN4+K7W+A==",
"dev": true,
"requires": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"babel-plugin-react-intl": "^3.0.1",
"transifex": "1.6.6"
}
},
"scratch-storage": { "scratch-storage": {
"version": "1.3.5", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/scratch-storage/-/scratch-storage-1.3.5.tgz", "resolved": "https://registry.npmjs.org/scratch-storage/-/scratch-storage-1.3.5.tgz",
@ -21060,9 +21072,9 @@
} }
}, },
"scratch-l10n": { "scratch-l10n": {
"version": "3.14.20220118031528", "version": "3.14.20220202031539",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.14.20220118031528.tgz", "resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.14.20220202031539.tgz",
"integrity": "sha512-y5Mzi+r6hxZ3kfax3aXhfiJwJIfN8FHdcvLd0E46KqUjpbvbs1TTUZjWBQdV9SmWAwii8L7U0z+1iWN4+K7W+A==", "integrity": "sha512-OBMVkfjuRpfOTF9+u9JrKyrJEIlvRbJzYd9KxiSvJLjF8BsdS4fALJDa8Yl4GX0w/DInSHt+iiO8xgtdf7WjgQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/cli": "^7.1.2", "@babel/cli": "^7.1.2",

View file

@ -127,8 +127,8 @@
"redux-thunk": "2.0.1", "redux-thunk": "2.0.1",
"regenerator-runtime": "0.13.9", "regenerator-runtime": "0.13.9",
"sass-loader": "6.0.6", "sass-loader": "6.0.6",
"scratch-gui": "0.1.0-prerelease.20220118124756", "scratch-gui": "0.1.0-prerelease.20220202135032",
"scratch-l10n": "3.14.20220118031528", "scratch-l10n": "3.14.20220202031539",
"selenium-webdriver": "4.1.0", "selenium-webdriver": "4.1.0",
"slick-carousel": "1.6.0", "slick-carousel": "1.6.0",
"style-loader": "0.12.3", "style-loader": "0.12.3",

View file

@ -11,7 +11,7 @@ require('./radio-group.scss');
const RadioGroup = props => ( const RadioGroup = props => (
<FRCRadioGroup <FRCRadioGroup
className={classNames('radio-group', props.className)} rowClassName={classNames('radio-group', props.className)}
{... props} {... props}
/> />
); );

View file

@ -792,7 +792,7 @@ class OrganizationStep extends React.Component {
}} }}
/> />
<div className="organization-type"> <div className="organization-type">
<b><intl.FormattedMessage id="teacherRegistration.orgType" /></b> <b className="row-label"><intl.FormattedMessage id="teacherRegistration.orgType" /></b>
<p className="help-text"> <p className="help-text">
<intl.FormattedMessage id="teacherRegistration.checkAll" /> <intl.FormattedMessage id="teacherRegistration.checkAll" />
</p> </p>
@ -833,7 +833,7 @@ class OrganizationStep extends React.Component {
/> />
</div> </div>
<div className="url-input"> <div className="url-input">
<b><intl.FormattedMessage id="general.website" /></b> <b className="row-label"><intl.FormattedMessage id="general.website" /></b>
<p className="help-text"> <p className="help-text">
<intl.FormattedMessage id="teacherRegistration.notRequired" /> <intl.FormattedMessage id="teacherRegistration.notRequired" />
</p> </p>

View file

@ -26,6 +26,18 @@
} }
} }
.row {
label {
font-weight: bold;
}
.checkbox {
label {
font-weight: 300;
}
}
}
.help-text { .help-text {
margin: .25rem 0; margin: .25rem 0;
text-align: left; text-align: left;
@ -66,6 +78,10 @@
&.demographics-step { &.demographics-step {
.radio { .radio {
margin: 1.5rem 1.5rem 0 0; margin: 1.5rem 1.5rem 0 0;
label {
font-weight: 300;
}
} }
input[type="radio"] { input[type="radio"] {

View file

@ -25,6 +25,11 @@ const Ethics = () => (
<strong> <strong>
<FormattedMessage id="ethics.principle1Title" /> <FormattedMessage id="ethics.principle1Title" />
</strong> </strong>
),
researchEmailLink: (
<a href="mailto:research@scratchfoundation.org">
research@scratchfoundation.org
</a>
) )
}} }}
/></p> /></p>

View file

@ -1,11 +1,11 @@
{ {
"ethics.title": "Scratch Foundation Research Code of Ethics", "ethics.title": "Scratch Foundation Research Code of Ethics",
"ethics.intro1": "At the Scratch Foundation, our mission is to provide young people with digital tools and equitable opportunities to imagine, create, share, and learn. The Scratch platform is a free, safe, playful learning environment that engages all children in thinking creatively, reasoning systematically, and working collaboratively — essential skills for everyone in today's society. We work with educators and families to support children in this playful learning environment.", "ethics.intro1": "At the Scratch Foundation, our mission is to provide young people with digital tools and opportunities to imagine, create, share, and learn. The Scratch platform is a free, safe, playful learning environment that engages all children in thinking creatively, reasoning systematically, and working collaboratively — essential skills for everyone in today's society. We work with educators and families to support children in this playful learning environment.",
"ethics.intro2": "This Code of Ethics guides Scratch Foundation employees and affiliates as they conduct research and evaluation in support of the efforts to improve the platform, user experience, teaching and learning outcomes, and grant-funded work. All research and evaluation work at the Foundation adheres to the following principles.", "ethics.intro2": "This Code of Ethics guides Scratch Foundation employees and affiliates as they conduct research and evaluation in support of the efforts to improve the platform, participant experience, teaching and learning outcomes, and grant-funded work. All research and evaluation work at the Foundation adheres to the following principles.",
"ethics.principle1Title": "Principle 1: Protect our users.", "ethics.principle1Title": "Principle 1: Protect our participants.",
"ethics.principle1": "{title} Scratch Foundation employees and contractors respect the privacy and confidentiality of users. Employees and contractors will not disclose any personally identifiable information about any user without the permission of the user or (if a minor) the users parent or guardian.", "ethics.principle1": "{title} Scratch Foundation employees and contractors respect the privacy and confidentiality of participants. Employees and contractors will not disclose any personally identifiable information about any participant without the permission of the participant and (if a minor) the participants parent or guardian. Additionally, we will avoid causing harm to participants and seek to maximize the benefits of participation. Participation in research activities is always voluntary; contact us at {researchEmailLink} to opt-out.",
"ethics.principle2Title": "Principle 2: Lead with honesty.", "ethics.principle2Title": "Principle 2: Lead with transparency.",
"ethics.principle2": "{title} When collecting data, Foundation staff and contractors will disclose the objective, rationale, ways in which we safeguard data, and relevant Foundation contact information for anyone who requests that information.", "ethics.principle2": "{title} When collecting data, Foundation staff and contractors will disclose the objective, participation requirements (including time and effort), any possible participation-related risks, ways in which we will safeguard and report the data, ways in which participants can opt out, and relevant Foundation contact information. ",
"ethics.principle3Title": "Principle 3. Adhere to the law.", "ethics.principle3Title": "Principle 3. Embrace data-stewardship.",
"ethics.principle3": "{title} Foundation staff and contractors will adhere to the spirit and letter of the law, particularly with regard to digital privacy policies such as (but not limited to) the Scratch Privacy Policy and the General Data Protection Regulation (GDPR)." "ethics.principle3": "{title} Foundation staff and contractors will ensure data security and compliance with digital privacy policies such as (but not limited to) the Scratch Privacy Policy and the General Data Protection Regulation (GDPR). "
} }

View file

@ -8,6 +8,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
const CopyWebpackPlugin = require('copy-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
// PostCss // PostCss
const autoprefixer = require('autoprefixer'); const autoprefixer = require('autoprefixer');
@ -141,7 +142,12 @@ module.exports = {
minChunks: pageRoutes.length // Extract only chunks common to all html pages minChunks: pageRoutes.length // Extract only chunks common to all html pages
} }
} }
} },
minimizer: [
new TerserPlugin({
parallel: 4
})
]
}, },
plugins: [ plugins: [
new MiniCssExtractPlugin(), new MiniCssExtractPlugin(),