Merge pull request from scratchfoundation/release/2023-06-05

[Master] release/2023-06-05
This commit is contained in:
Andy O'Neill 2023-06-08 10:22:09 -04:00 committed by GitHub
commit ec161205ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 211 additions and 57 deletions

96
package-lock.json generated
View file

@ -101,8 +101,8 @@
"regenerator-runtime": "0.13.9",
"sass": "1.49.7",
"sass-loader": "10.2.1",
"scratch-gui": "1.8.91",
"scratch-l10n": "3.15.20230523032203",
"scratch-gui": "1.8.107",
"scratch-l10n": "3.15.20230605032207",
"selenium-webdriver": "4.1.0",
"slick-carousel": "1.6.0",
"style-loader": "0.12.3",
@ -23463,21 +23463,21 @@
}
},
"node_modules/scratch-blocks": {
"version": "0.1.0-prerelease.20230521064828",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20230521064828.tgz",
"integrity": "sha512-9XOGQ51l0M0HLHy5flvxIXP3nPwaq/RexdDqm1sq3CIuHubWn243prerm7gzyzISMIfN5H8Jz+atk5NJ+fhDIw==",
"version": "0.1.0-prerelease.20230527085947",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20230527085947.tgz",
"integrity": "sha512-wvh7+9X5FeuPM0tfhvqu3TFpNCmx52IcMR1Ysxm0cR/s1dvnwHEAhRZM/6xlx1WQpVT7aD7hU04j7qYaRO0YWw==",
"dev": true,
"dependencies": {
"exports-loader": "0.7.0",
"google-closure-library": "20190301.0.0",
"imports-loader": "0.8.0",
"scratch-l10n": "3.15.20230521032145"
"scratch-l10n": "3.15.20230527032201"
}
},
"node_modules/scratch-blocks/node_modules/scratch-l10n": {
"version": "3.15.20230521032145",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230521032145.tgz",
"integrity": "sha512-OoE7eME85ZNHZvOPU7wV8lx284YZD1eYTkfc11A5CTRHq27tbXqYCq2tqmZ/vmNtsEmBrIKK3Ogf/rPbwp9pEQ==",
"version": "3.15.20230527032201",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230527032201.tgz",
"integrity": "sha512-nUqHPQrG9Eal1M+AY/2gJlje7O5W9yZ9yaLsWWScgYPYGFm8rxFnVk8pcEmZCzghz+folsfuN0zS0bPKDopr/Q==",
"dev": true,
"dependencies": {
"@babel/cli": "^7.1.2",
@ -23493,9 +23493,9 @@
}
},
"node_modules/scratch-gui": {
"version": "1.8.91",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.8.91.tgz",
"integrity": "sha512-hDd0DQy//LAanhMKlaiWwWoxmcduIKNEKmy2APcqIqmrbxQiTiNmpk5IiXGwGS/vd6Ib4bQsYfY3rMnr0I0+tw==",
"version": "1.8.107",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.8.107.tgz",
"integrity": "sha512-0cL52bALjfj2Wl4kSvw4zQRnrL3rilIAgzX9Py1z+29RG7KPm3w5eDwMJFofUKs8/Z+YoCVBzzJyIwT2WACoyQ==",
"dev": true,
"dependencies": {
"arraybuffer-loader": "^1.0.6",
@ -23547,14 +23547,14 @@
"redux": "3.7.2",
"redux-throttle": "0.1.1",
"scratch-audio": "0.1.0-prerelease.20221123180128",
"scratch-blocks": "0.1.0-prerelease.20230521064828",
"scratch-l10n": "3.15.20230523032203",
"scratch-paint": "1.1.64",
"scratch-blocks": "0.1.0-prerelease.20230527085947",
"scratch-l10n": "3.15.20230605032207",
"scratch-paint": "1.1.68",
"scratch-render": "0.1.0-prerelease.20230318150639",
"scratch-render-fonts": "1.0.0-prerelease.20221102164332",
"scratch-storage": "2.2.1",
"scratch-svg-renderer": "0.2.0-prerelease.20230224194137",
"scratch-vm": "1.5.68",
"scratch-vm": "1.5.76",
"startaudiocontext": "1.2.1",
"style-loader": "^0.23.0",
"text-encoding": "0.7.0",
@ -23881,9 +23881,9 @@
}
},
"node_modules/scratch-gui/node_modules/scratch-paint": {
"version": "1.1.64",
"resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.64.tgz",
"integrity": "sha512-vh7ZKXq4GJBNUS1WZP8X2sFjcC+r2uyQbY3i1G//tSKoLu+t7ADsYqk31X3o/9YJ+Drf72UmWVgAA+7PO/CLmQ==",
"version": "1.1.68",
"resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.68.tgz",
"integrity": "sha512-YEoVRuoM+942JbcP5+llN+/0RG8kTvcRvfEk1bOMP/q7ZcHN2vQeuBz9sb28BPL3rf5LcMbndJ8rCte31JM8SQ==",
"dev": true,
"dependencies": {
"@scratch/paper": "0.11.20200728195508",
@ -23962,9 +23962,9 @@
}
},
"node_modules/scratch-l10n": {
"version": "3.15.20230523032203",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230523032203.tgz",
"integrity": "sha512-UhnDzBzo5u4sxQ0Ax6Z5MP5lsKzPWq5B+VafSWOFpfH6fJIoJPBt4iAH9S/Dg9xHZzUfouwmf4QsKYz3I/3cNQ==",
"version": "3.15.20230605032207",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230605032207.tgz",
"integrity": "sha512-/rfJpI0csg2a3F6Brnd7QIZxGAlLB165nsm0TwYBNwHFCg0BjjcehzPkumXKOeyc7U2e7GldGcMDb+8C8cPICQ==",
"dev": true,
"dependencies": {
"@babel/cli": "^7.1.2",
@ -24164,9 +24164,9 @@
"dev": true
},
"node_modules/scratch-vm": {
"version": "1.5.68",
"resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-1.5.68.tgz",
"integrity": "sha512-KND5BhWXVtaLgnbUo+LODsl5EXOrAhJhCPLCkdoNRJcyQII9kXyjOiJv12pO9x5469zDEd6eiMjuUVCvi/IWcw==",
"version": "1.5.76",
"resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-1.5.76.tgz",
"integrity": "sha512-GawQ+5eddw9YtOgxlIjlIPmD/NVmiCRmHJy9EJIXwZdK5oedbFaZQKxKUigmmreG4XPd5twXVFtPykYZGhemWw==",
"dev": true,
"dependencies": {
"@vernier/godirect": "1.5.0",
@ -51945,21 +51945,21 @@
}
},
"scratch-blocks": {
"version": "0.1.0-prerelease.20230521064828",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20230521064828.tgz",
"integrity": "sha512-9XOGQ51l0M0HLHy5flvxIXP3nPwaq/RexdDqm1sq3CIuHubWn243prerm7gzyzISMIfN5H8Jz+atk5NJ+fhDIw==",
"version": "0.1.0-prerelease.20230527085947",
"resolved": "https://registry.npmjs.org/scratch-blocks/-/scratch-blocks-0.1.0-prerelease.20230527085947.tgz",
"integrity": "sha512-wvh7+9X5FeuPM0tfhvqu3TFpNCmx52IcMR1Ysxm0cR/s1dvnwHEAhRZM/6xlx1WQpVT7aD7hU04j7qYaRO0YWw==",
"dev": true,
"requires": {
"exports-loader": "0.7.0",
"google-closure-library": "20190301.0.0",
"imports-loader": "0.8.0",
"scratch-l10n": "3.15.20230521032145"
"scratch-l10n": "3.15.20230527032201"
},
"dependencies": {
"scratch-l10n": {
"version": "3.15.20230521032145",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230521032145.tgz",
"integrity": "sha512-OoE7eME85ZNHZvOPU7wV8lx284YZD1eYTkfc11A5CTRHq27tbXqYCq2tqmZ/vmNtsEmBrIKK3Ogf/rPbwp9pEQ==",
"version": "3.15.20230527032201",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230527032201.tgz",
"integrity": "sha512-nUqHPQrG9Eal1M+AY/2gJlje7O5W9yZ9yaLsWWScgYPYGFm8rxFnVk8pcEmZCzghz+folsfuN0zS0bPKDopr/Q==",
"dev": true,
"requires": {
"@babel/cli": "^7.1.2",
@ -51973,9 +51973,9 @@
}
},
"scratch-gui": {
"version": "1.8.91",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.8.91.tgz",
"integrity": "sha512-hDd0DQy//LAanhMKlaiWwWoxmcduIKNEKmy2APcqIqmrbxQiTiNmpk5IiXGwGS/vd6Ib4bQsYfY3rMnr0I0+tw==",
"version": "1.8.107",
"resolved": "https://registry.npmjs.org/scratch-gui/-/scratch-gui-1.8.107.tgz",
"integrity": "sha512-0cL52bALjfj2Wl4kSvw4zQRnrL3rilIAgzX9Py1z+29RG7KPm3w5eDwMJFofUKs8/Z+YoCVBzzJyIwT2WACoyQ==",
"dev": true,
"requires": {
"arraybuffer-loader": "^1.0.6",
@ -52027,14 +52027,14 @@
"redux": "3.7.2",
"redux-throttle": "0.1.1",
"scratch-audio": "0.1.0-prerelease.20221123180128",
"scratch-blocks": "0.1.0-prerelease.20230521064828",
"scratch-l10n": "3.15.20230523032203",
"scratch-paint": "1.1.64",
"scratch-blocks": "0.1.0-prerelease.20230527085947",
"scratch-l10n": "3.15.20230605032207",
"scratch-paint": "1.1.68",
"scratch-render": "0.1.0-prerelease.20230318150639",
"scratch-render-fonts": "1.0.0-prerelease.20221102164332",
"scratch-storage": "2.2.1",
"scratch-svg-renderer": "0.2.0-prerelease.20230224194137",
"scratch-vm": "1.5.68",
"scratch-vm": "1.5.76",
"startaudiocontext": "1.2.1",
"style-loader": "^0.23.0",
"text-encoding": "0.7.0",
@ -52299,9 +52299,9 @@
}
},
"scratch-paint": {
"version": "1.1.64",
"resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.64.tgz",
"integrity": "sha512-vh7ZKXq4GJBNUS1WZP8X2sFjcC+r2uyQbY3i1G//tSKoLu+t7ADsYqk31X3o/9YJ+Drf72UmWVgAA+7PO/CLmQ==",
"version": "1.1.68",
"resolved": "https://registry.npmjs.org/scratch-paint/-/scratch-paint-1.1.68.tgz",
"integrity": "sha512-YEoVRuoM+942JbcP5+llN+/0RG8kTvcRvfEk1bOMP/q7ZcHN2vQeuBz9sb28BPL3rf5LcMbndJ8rCte31JM8SQ==",
"dev": true,
"requires": {
"@scratch/paper": "0.11.20200728195508",
@ -52362,9 +52362,9 @@
}
},
"scratch-l10n": {
"version": "3.15.20230523032203",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230523032203.tgz",
"integrity": "sha512-UhnDzBzo5u4sxQ0Ax6Z5MP5lsKzPWq5B+VafSWOFpfH6fJIoJPBt4iAH9S/Dg9xHZzUfouwmf4QsKYz3I/3cNQ==",
"version": "3.15.20230605032207",
"resolved": "https://registry.npmjs.org/scratch-l10n/-/scratch-l10n-3.15.20230605032207.tgz",
"integrity": "sha512-/rfJpI0csg2a3F6Brnd7QIZxGAlLB165nsm0TwYBNwHFCg0BjjcehzPkumXKOeyc7U2e7GldGcMDb+8C8cPICQ==",
"dev": true,
"requires": {
"@babel/cli": "^7.1.2",
@ -52561,9 +52561,9 @@
"dev": true
},
"scratch-vm": {
"version": "1.5.68",
"resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-1.5.68.tgz",
"integrity": "sha512-KND5BhWXVtaLgnbUo+LODsl5EXOrAhJhCPLCkdoNRJcyQII9kXyjOiJv12pO9x5469zDEd6eiMjuUVCvi/IWcw==",
"version": "1.5.76",
"resolved": "https://registry.npmjs.org/scratch-vm/-/scratch-vm-1.5.76.tgz",
"integrity": "sha512-GawQ+5eddw9YtOgxlIjlIPmD/NVmiCRmHJy9EJIXwZdK5oedbFaZQKxKUigmmreG4XPd5twXVFtPykYZGhemWw==",
"dev": true,
"requires": {
"@vernier/godirect": "1.5.0",

View file

@ -136,8 +136,8 @@
"regenerator-runtime": "0.13.9",
"sass": "1.49.7",
"sass-loader": "10.2.1",
"scratch-gui": "1.8.91",
"scratch-l10n": "3.15.20230523032203",
"scratch-gui": "1.8.107",
"scratch-l10n": "3.15.20230605032207",
"selenium-webdriver": "4.1.0",
"slick-carousel": "1.6.0",
"style-loader": "0.12.3",

View file

@ -35,7 +35,7 @@ class PrivacyBanner extends React.Component {
handleCloseBanner () {
const opts = {
expires: new Date(new Date().setDate(new Date().getDate + 21)) // expires after 3 weeks
expires: new Date(new Date().setDate(new Date().getDate() + 21)) // expires after 3 weeks
};
this.setState({dismissedPrivacyBanner: true});
jar.set('scratchpolicyseen', true, opts);

View file

@ -0,0 +1,41 @@
const FormattedMessage = require('react-intl').FormattedMessage;
const React = require('react');
const FlexRow = require('../../../components/flex-row/flex-row.jsx');
const TitleBanner = require('../../../components/title-banner/title-banner.jsx');
const thumbnail = require('./high-contrast-thumbnail.png');
require('./features-banner.scss');
const FORUM_URL = 'https://scratch.mit.edu/discuss/topic/689659/';
const FeaturesBanner = () => (
<TitleBanner className="feature-banner">
<FlexRow className="feature-container column">
<FlexRow className="feature-title-container">
<h1 className="feature-header">
<FormattedMessage id="featurebanner.highContrast.comingSoon" />
</h1>
<a
className="feature-learn-more feature-hideable button"
href={FORUM_URL}
>
<FormattedMessage id="featurebanner.highContrast.learnMore" />
</a>
</FlexRow>
<FlexRow className="feature-banner-images">
<a href={FORUM_URL}>
<FlexRow className="feature-banner-image column">
<img src={thumbnail} />
<div className="feature-image-text">
<FormattedMessage id="featurebanner.highContrast.forumTitle" />
</div>
</FlexRow>
</a>
</FlexRow>
</FlexRow>
</TitleBanner>
);
module.exports = FeaturesBanner;

View file

@ -0,0 +1,90 @@
@import "../../../colors";
@import "../../../frameless";
.feature-banner {
display: flex;
position: relative;
background-color: $ui-aqua;
background-image: url("/images/hoc/bg-pattern.png");
background-size: cover;
padding: 0;
overflow: hidden;
justify-content: center;
.feature-container {
margin: auto;
width: $desktop;
justify-content: flex-start;
.feature-title-container {
margin: 1.5rem 0;
width: 100%;
justify-content: space-between;
}
}
.feature-banner-images {
display: flex;
width: $desktop;
justify-content: space-around;
margin-bottom: 3rem;
}
.feature-banner-image {
border: 2px solid $ui-aqua;
border-radius: 16px;
background-color: $ui-white;
width: $cols8;
height: 280px;
overflow: hidden;
box-sizing: border-box;
justify-content: flex-start;
img {
width: $cols8;
height: 205px;
object-fit: cover;
}
.feature-image-text {
margin: auto auto;
color: $ui-blue;
font-size: 1rem;
font-weight: bold;
}
}
.feature-header{
color: $ui-white;
font-size: 2rem;
}
.feature-learn-more {
border-radius: 10px;
background-color: $ui-white;
padding: .75rem 1rem;
color: $ui-blue;
font-size: .75rem;
font-weight: bold;
}
}
@media only screen and (min-width: $tabletPortrait) and (max-width: $desktop) {
.feature-banner {
.feature-container {
width: $cols8;
}
.feature-banner-images {
width: $cols8;
}
.feature-banner-image {
width: $cols8;
}
}
.feature-hideable {
display: none;
}
}

Binary file not shown.

After

(image error) Size: 64 KiB

View file

@ -56,5 +56,9 @@
"welcome.connect": "Connect with other Scratchers",
"activity.seeUpdates": "This is where you will see updates from Scratchers you follow",
"activity.checkOutScratchers": "Check out some Scratchers you might like to follow"
"activity.checkOutScratchers": "Check out some Scratchers you might like to follow",
"featurebanner.highContrast.comingSoon": "COMING SOON: Color Contrast in Scratch!",
"featurebanner.highContrast.forumTitle": "Block Color Settings and Site Updates",
"featurebanner.highContrast.learnMore": "Learn More"
}

View file

@ -35,6 +35,7 @@ const ShareProjectMessage = require('./activity-rows/share-project.jsx');
const DonateBanner = require('./donate/donate-banner.jsx');
const HOCTopBanner = require('./hoc/top-banner.jsx');
const HOCMiddleBanner = require('./hoc/middle-banner.jsx');
const FeaturesBanner = require('./features/features-banner.jsx');
require('./splash.scss');
@ -383,6 +384,13 @@ class SplashPresentation extends React.Component { // eslint-disable-line react/
</MediaQuery>
)
}
{
this.props.shouldShowFeaturesBanner && (
<MediaQuery minWidth={frameless.tabletPortrait}>
<FeaturesBanner />
</MediaQuery>
)
}
{
this.props.shouldShowIntro && (
<Intro
@ -540,9 +548,10 @@ SplashPresentation.propTypes = {
sharedByFollowing: PropTypes.arrayOf(PropTypes.object),
shouldShowDonateBanner: PropTypes.bool.isRequired,
shouldShowEmailConfirmation: PropTypes.bool.isRequired,
shouldShowFeaturesBanner: PropTypes.bool.isRequired,
shouldShowHOCMiddleBanner: PropTypes.bool.isRequired,
shouldShowHOCTopBanner: PropTypes.bool.isRequired,
shouldShowIntro: PropTypes.bool.isRequired,
shouldShowHOCMiddleBanner: PropTypes.bool.isRequired,
shouldShowWelcome: PropTypes.bool.isRequired,
user: PropTypes.object.isRequired // eslint-disable-line react/forbid-prop-types
};

View file

@ -19,6 +19,9 @@ const SCRATCH_WEEK_START_TIME = 1621224000000; // 2021-05-17 00:00:00 -- No end
const HOC_START_TIME = 1668574800000; // 2022-11-16 00:00:00 GMT in ms
const HOC_END_TIME = 1670821200000; // 2022-12-12 00:00:00 GMT in ms
const FEATURES_START_TIME = 1687305600000; // 2023-06-21 00:00:00 GMT in ms
const FEATURES_END_TIME = 1688083200000; // 2023-06-30 00:00:00 GMT in ms
class Splash extends React.Component {
constructor (props) {
super(props);
@ -162,7 +165,8 @@ class Splash extends React.Component {
return (
this.props.sessionStatus === sessionActions.Status.FETCHED && // done fetching session
Object.keys(this.props.user).length === 0 && // no user session found
this.shouldShowHOCTopBanner() !== true
!this.shouldShowHOCTopBanner() &&
!this.shouldShowFeaturesBanner()
);
}
shouldShowDonateBanner () {
@ -173,11 +177,16 @@ class Splash extends React.Component {
Date.now() >= SCRATCH_WEEK_START_TIME
);
}
shouldShowFeaturesBanner () {
const now = Date.now();
return now >= FEATURES_START_TIME && now <= FEATURES_END_TIME;
}
render () {
const showEmailConfirmation = this.shouldShowEmailConfirmation() || false;
const showDonateBanner = this.shouldShowDonateBanner() || false;
const showHOCTopBanner = this.shouldShowHOCTopBanner() || false;
const showEmailConfirmation = this.shouldShowEmailConfirmation() || false;
const showFeaturesBanner = this.shouldShowFeaturesBanner();
const showHOCMiddleBanner = this.shouldShowHOCMiddleBanner() || false;
const showHOCTopBanner = this.shouldShowHOCTopBanner() || false;
const showIntro = this.shouldShowIntro() || false;
const showWelcome = this.shouldShowWelcome();
const homepageRefreshStatus = this.getHomepageRefreshStatus();
@ -197,9 +206,10 @@ class Splash extends React.Component {
sharedByFollowing={this.props.shared}
shouldShowDonateBanner={showDonateBanner}
shouldShowEmailConfirmation={showEmailConfirmation}
shouldShowFeaturesBanner={showFeaturesBanner}
shouldShowHOCMiddleBanner={showHOCMiddleBanner}
shouldShowHOCTopBanner={showHOCTopBanner}
shouldShowIntro={showIntro}
shouldShowHOCMiddleBanner={showHOCMiddleBanner}
shouldShowWelcome={showWelcome}
user={this.props.user}
onCloseDonateBanner={this.handleCloseDonateBanner}