From 22dc55c0300df87f047c7b9cd5c55aa7f0ad408c Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Wed, 20 Jul 2016 16:53:50 -0400 Subject: [PATCH 01/92] change verbiage, begin work on responsive nav/footer --- src/components/footer/www/footer.jsx | 12 ++++++------ src/components/footer/www/footer.scss | 18 ++++++++++++++++++ src/components/login/login.jsx | 2 +- src/l10n.json | 4 ++-- src/routes.json | 2 ++ src/views/splash/splash.jsx | 2 +- 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx index 9388c2a42..41733c40f 100644 --- a/src/components/footer/www/footer.jsx +++ b/src/components/footer/www/footer.jsx @@ -16,7 +16,7 @@ var Footer = React.createClass({
-
+
@@ -41,7 +41,7 @@ var Footer = React.createClass({
-
+
@@ -57,7 +57,7 @@ var Footer = React.createClass({
-
+
@@ -98,7 +98,7 @@ var Footer = React.createClass({
-
+
@@ -114,12 +114,12 @@ var Footer = React.createClass({
-
+
-
+
diff --git a/src/components/footer/www/footer.scss b/src/components/footer/www/footer.scss index d7bcfce93..17a76ca95 100644 --- a/src/components/footer/www/footer.scss +++ b/src/components/footer/www/footer.scss @@ -1,4 +1,5 @@ @import "../../../colors"; +@import "../../../frameless"; #footer { .lists { @@ -46,3 +47,20 @@ text-align: center; } } + + + +//4 and 6 columns +@media only screen and (max-width: $tablet - 1) { + #footer .lists dd { + &:not(.showMobile) { + display: none; + } + } + + #footer .lists dl { + dt { + display: none; + } + } +} diff --git a/src/components/login/login.jsx b/src/components/login/login.jsx index 73c1e6ad7..7b5aa1476 100644 --- a/src/components/login/login.jsx +++ b/src/components/login/login.jsx @@ -50,7 +50,7 @@ var Login = React.createClass({ ] : [ ]} diff --git a/src/l10n.json b/src/l10n.json index 3685f0c1d..c6cf1919b 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -27,7 +27,7 @@ "general.guidelines": "Community Guidelines", "general.help": "Help", "general.jobs": "Jobs", - "general.joinScratch": "Join Scratch", + "general.signUp": "Sign Up", "general.legal": "Legal", "general.loadMore": "Load More", "general.learnMore": "Learn More", @@ -62,7 +62,7 @@ "general.scratchFoundation": "Scratch Foundation", "general.scratchJr": "ScratchJr", "general.search": "Search", - "general.signIn": "Sign in", + "general.logIn": "Log in", "general.statistics": "Statistics", "general.studios": "Studios", "general.support": "Support", diff --git a/src/routes.json b/src/routes.json index 2f076a608..9866e40d2 100644 --- a/src/routes.json +++ b/src/routes.json @@ -3,6 +3,7 @@ "name": "splash", "pattern": "^/?$", "view": "splash/splash", + "viewportWidth": "device-width", "title": "Imagine, Program, Share" }, { @@ -65,6 +66,7 @@ "name": "faq", "pattern": "^/info/faq/?$", "view": "faq/faq", + "viewportWidth": "device-width", "title": "FAQ" }, { diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index 50f574a4b..574e4af35 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -393,7 +393,7 @@ var Splash = injectIntl(React.createClass({ ] : [ - + /**/ ]) : [] } From b88b8c83b11b87c19e4c77664317f0893e4feae6 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Thu, 21 Jul 2016 10:12:16 -0400 Subject: [PATCH 02/92] redo responsive nav --- src/components/carousel/carousel.jsx | 19 ++++++++++- src/components/navigation/www/navigation.jsx | 6 ++-- src/components/navigation/www/navigation.scss | 34 +++++++++++++++++++ test/localization/spot_check_nav.js | 4 +-- 4 files changed, 57 insertions(+), 6 deletions(-) diff --git a/src/components/carousel/carousel.jsx b/src/components/carousel/carousel.jsx index fbebed63d..90f39d475 100644 --- a/src/components/carousel/carousel.jsx +++ b/src/components/carousel/carousel.jsx @@ -27,12 +27,29 @@ var Carousel = React.createClass({ render: function () { var settings = this.props.settings || {}; defaults(settings, { + centerMode: false, dots: false, infinite: false, lazyLoad: true, slidesToShow: 5, slidesToScroll: 5, - variableWidth: true + variableWidth: true, + responsive: [ + {breakpoint: 480, settings: { + arrows: true, + slidesToScroll: 1, + slidesToShow: 1, + centerMode: true + }}, + {breakpoint: 640, settings: { + slidesToScroll: 2, + slidesToShow: 2 + }}, + {breakpoint: 942, settings: { + slidesToScroll: 4, + slidesToShow: 4 + }} + ] }); var arrows = this.props.items.length > settings.slidesToShow; var classes = classNames( diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index 02d36e681..dcac56fc0 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -294,7 +294,7 @@ var Navigation = React.createClass({ ] : [
  • - +
  • , , -
  • +
  • - + ul > li { + &.create, + &.explore, + &.discuss, + &.help, + &.search { + display: none; + } + } +} + +//6 columns +@media only screen and (min-width: $mobile) and (max-width: $tablet - 1) { + #navigation .inner > ul > li { + &.explore, + &.discuss, + &.search { + display: none; + } + } +} + +//8 columns +@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) { + #navigation .inner > ul > li { + &.explore, + &.search { + display: none; + } + } +} diff --git a/test/localization/spot_check_nav.js b/test/localization/spot_check_nav.js index 9babf4dcb..a9b611c71 100644 --- a/test/localization/spot_check_nav.js +++ b/test/localization/spot_check_nav.js @@ -20,8 +20,8 @@ var languagesToCheck = [ 'he', 'zh-cn', 'ja', 'pt-br', 'pl', 'nb' ]; var idsToCheck = [ - 'general.about', 'general.create', 'general.help', 'general.joinScratch', - 'general.signIn', 'general.discuss' + 'general.about', 'general.create', 'general.help', 'general.signUp', + 'general.logIn', 'general.discuss' ]; From a9def9c1ae9e5e3793baa74618339062d533eace Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Fri, 22 Jul 2016 14:53:39 -0400 Subject: [PATCH 03/92] tweak splash to not be terrible on mobile --- src/views/splash/splash.jsx | 13 ++++++++++++- src/views/splash/splash.scss | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index 574e4af35..368b03396 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -6,6 +6,7 @@ var React = require('react'); var api = require('../../lib/api'); var render = require('../../lib/render.jsx'); var sessionActions = require('../../redux/session.js'); +var layout = require('../../redux/layout.js'); var shuffle = require('../../lib/shuffle.js').shuffle; var Activity = require('../../components/activity/activity.jsx'); @@ -42,6 +43,12 @@ var Splash = injectIntl(React.createClass({ permissions: {} }; }, + componentWillMount: function () { + this.props.dispatch(layout.getLayout()); + for (var query in layout.mediaQueries) { + layout.mediaQueries[query].addListener(this.onResize); + } + }, componentDidUpdate: function (prevProps) { if (this.props.session.session.user != prevProps.session.session.user) { if (this.props.session.session.user) { @@ -87,6 +94,9 @@ var Splash = injectIntl(React.createClass({ } } }, + onResize: function () { + this.props.dispatch(layout.getLayout()); + }, getActivity: function () { api({ uri: '/proxy/users/' + this.props.session.session.user.username + '/activity?limit=5' @@ -439,7 +449,8 @@ var Splash = injectIntl(React.createClass({ var mapStateToProps = function (state) { return { session: state.session, - permissions: state.permissions + permissions: state.permissions, + layout: state.layout }; }; diff --git a/src/views/splash/splash.scss b/src/views/splash/splash.scss index 24c8e4521..9739992cf 100644 --- a/src/views/splash/splash.scss +++ b/src/views/splash/splash.scss @@ -1,3 +1,5 @@ +@import "../../frameless"; + .splash { .splash-header { display: flex; @@ -24,7 +26,7 @@ .news { width: 40%; - + img { flex-shrink: 0; } @@ -38,4 +40,33 @@ .box { margin-bottom: 20px; } -} +} + +//4 columns +@media only screen and (max-width: $mobile - 1) { + .splash { + .splash-header { + flex-wrap: wrap; + justify-content: center; + + .box { + width: $cols4; + } + } + } +} + +//6 columns +@media only screen and (min-width: $mobile) and (max-width: $tablet - 1) { + .splash { + .splash-header { + flex-wrap: wrap; + justify-content: center; + + .box { + width: $cols6; + white-space: normal; + } + } + } +} From 5b9cef8dd6cecd50ddcb8c910978dcbce86993cd Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Fri, 22 Jul 2016 14:55:56 -0400 Subject: [PATCH 04/92] navbar mobile --- src/components/navigation/www/navigation.jsx | 5 +- src/components/navigation/www/navigation.scss | 89 +++++++++++++++---- 2 files changed, 76 insertions(+), 18 deletions(-) diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index dcac56fc0..ce2888ab1 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -248,7 +248,8 @@ var Navigation = React.createClass({ - {this.props.session.session.user.username} + {this.props.layout == 'COLS8' || this.props.layout == 'COLS12' ? + this.props.session.session.user.username : ''} , -
  • +
  • ul > li { - &.create, - &.explore, - &.discuss, - &.help, - &.search { - display: none; + #navigation .inner { + width: $cols4; + + > ul > li { + &.create, + &.explore, + &.discuss, + &.help, + &.search, + &.mystuff { + display: none; + } + + &.login-item { + margin-left: 0; + } + + &.account-nav { + margin-left: 0; + + > a { + .avatar { + margin-right: 0; + } + + &:after { + display: none; + } + } + } } } } + //6 columns @media only screen and (min-width: $mobile) and (max-width: $tablet - 1) { - #navigation .inner > ul > li { - &.explore, - &.discuss, - &.search { - display: none; + #navigation .inner { + width: $cols6; + + > ul > li { + &.explore, + &.discuss, + &.search, + &.mystuff { + display: none; + } + + &.login-item { + margin-left: 0; + } + + &.account-nav { + margin-left: 0; + + > a { + .avatar { + margin-right: 0; + } + + &:after { + display: none; + } + } + } } } } //8 columns @media only screen and (min-width: $tablet) and (max-width: $desktop - 1) { - #navigation .inner > ul > li { - &.explore, - &.search { - display: none; + #navigation .inner { + width: $cols8; + + > ul > li { + &.explore, + &.search, + &.mystuff { + display: none; + } + + &.login-item, + &.account-nav { + margin-left: 0; + } } } } From 391344489d3a49130e62449f02db7b3db5815156 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Fri, 22 Jul 2016 14:56:14 -0400 Subject: [PATCH 05/92] footer mobile --- src/components/footer/www/footer.jsx | 335 ++++++++++++++------------ src/components/footer/www/footer.scss | 15 +- 2 files changed, 189 insertions(+), 161 deletions(-) diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx index 41733c40f..600e2dbd9 100644 --- a/src/components/footer/www/footer.jsx +++ b/src/components/footer/www/footer.jsx @@ -11,158 +11,195 @@ var Footer = React.createClass({ render: function () { return ( -
    -
    -
    - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    + {this.props.layout == 'COLS4' || this.props.layout == 'COLS6' ? [ +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    +
    + ] : [ +
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    -
    -
    - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    -
    -
    - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - -
    -
    - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - -
    -
    - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    - - - -
    -
    -
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    +
    +
    + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    + + + +
    +
    +
    + ]}
    diff --git a/src/components/footer/www/footer.scss b/src/components/footer/www/footer.scss index 17a76ca95..d529dae84 100644 --- a/src/components/footer/www/footer.scss +++ b/src/components/footer/www/footer.scss @@ -7,11 +7,10 @@ text-align: center; flex-direction: row; flex-wrap: nowrap; - justify-content: space-between; + justify-content: space-around; dl { display: inline-block; - width: 130pt; vertical-align: top; text-align: left; font-size: .8rem; @@ -52,15 +51,7 @@ //4 and 6 columns @media only screen and (max-width: $tablet - 1) { - #footer .lists dd { - &:not(.showMobile) { - display: none; - } - } - - #footer .lists dl { - dt { - display: none; - } + #footer .lists { + justify-content: space-around; } } From 808922b50dbec0e200ba40a149acf779c6055352 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Fri, 22 Jul 2016 14:57:05 -0400 Subject: [PATCH 06/92] pass layout to navbar and footer --- src/components/page/www/page.jsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/page/www/page.jsx b/src/components/page/www/page.jsx index 070f7e1dc..2f482c61a 100644 --- a/src/components/page/www/page.jsx +++ b/src/components/page/www/page.jsx @@ -1,4 +1,5 @@ var React = require('react'); +var connect = require('react-redux').connect; var classNames = require('classnames'); var Navigation = require('../../navigation/www/navigation.jsx'); @@ -13,17 +14,24 @@ var Page = React.createClass({ return (
    {this.props.children}
    ); } }); -module.exports = Page; +var mapStateToProps = function (state) { + return { + layout: state.layout + }; +}; + +var ConnectedPage = connect(mapStateToProps)(Page); +module.exports = ConnectedPage; From 188841c73c828f788480a26d8da650fb05ddfcd9 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Fri, 22 Jul 2016 14:57:47 -0400 Subject: [PATCH 07/92] layout reducer (needs work) --- src/redux/layout.js | 64 ++++++++++++++++++++++++++++++++++++++++++++ src/redux/reducer.js | 2 ++ 2 files changed, 66 insertions(+) create mode 100644 src/redux/layout.js diff --git a/src/redux/layout.js b/src/redux/layout.js new file mode 100644 index 000000000..f39e7667a --- /dev/null +++ b/src/redux/layout.js @@ -0,0 +1,64 @@ +var keyMirror = require('keymirror'); +var pickBy = require('lodash.pickBy'); + +var Types = { + SET_STATE: 'splash/activity/SET_LAYOUT', + SET_ERROR: 'splash/activity/SET_ERROR' +}; + +function reducer (state, action) { + if (typeof state === 'undefined') { + state = reducer.getInitialState(); + } + switch (action.type) { + case Types.SET_STATE: + return action.layout; + case Types.SET_ERROR: + return state; + default: + return state; + } +} + +reducer.Layouts = keyMirror({ + COLS4: null, + COLS6: null, + COLS8: null, + COLS12: null +}); + +reducer.mediaQueries = { + COLS4: window.matchMedia('screen and (max-width: 479px)'), + COLS6: window.matchMedia('screen and (min-width: 480px) and (max-width: 639px)'), + COLS8: window.matchMedia('screen and (min-width: 640px) and (max-width: 941px)'), + COLS12: window.matchMedia('screen and (min-width: 942px)') +}; + +reducer.getInitialState = function () { + return reducer.Layouts.COLS12; +}; + +reducer.setLayout = function (layout) { + return { + type: Types.SET_STATE, + layout: layout + }; +}; + +reducer.setLayoutError = function (error) { + return { + type: Types.SET_ERROR, + error: error + }; +}; + +reducer.getLayout = function () { + return function (dispatch) { + var matched = pickBy(reducer.mediaQueries, function (value, key) { //eslint-disable-line + return value.matches; + }); + dispatch(reducer.setLayout(Object.keys(matched)[0])); + }; +}; + +module.exports = reducer; diff --git a/src/redux/reducer.js b/src/redux/reducer.js index b7dd7b31d..e54baf0dc 100644 --- a/src/redux/reducer.js +++ b/src/redux/reducer.js @@ -5,10 +5,12 @@ var detailsReducer = require('./conference-details.js').detailsReducer; var permissionsReducer = require('./permissions.js').permissionsReducer; var sessionReducer = require('./session.js').sessionReducer; var tokenReducer = require('./token.js').tokenReducer; +var layout = require('./layout.js'); var appReducer = combineReducers({ session: sessionReducer, token: tokenReducer, + layout: layout, permissions: permissionsReducer, conferenceSchedule: scheduleReducer, conferenceDetails: detailsReducer From daf803d4a33bfdd82df063dbc2bc56bf142eadfa Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Mon, 25 Jul 2016 10:53:57 -0400 Subject: [PATCH 08/92] experiment with the react-responsive library --- package.json | 2 ++ src/components/footer/www/footer.jsx | 8 +++++--- src/components/navigation/www/navigation.jsx | 6 ++++-- src/components/page/www/page.jsx | 14 +++----------- src/redux/reducer.js | 3 +-- src/views/splash/splash.jsx | 13 +------------ src/views/splash/splash.scss | 11 ++++++++++- 7 files changed, 26 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 433dc50f1..a583a712d 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "lodash.defaultsdeep": "3.10.0", "lodash.merge": "3.3.2", "lodash.omit": "3.1.0", + "lodash.pickby": "^4.4.0", "lodash.range": "3.0.1", "minilog": "2.0.8", "node-sass": "3.3.3", @@ -73,6 +74,7 @@ "react-modal": "1.3.0", "react-onclickoutside": "4.1.1", "react-redux": "4.4.5", + "react-responsive": "^1.1.4", "react-slick": "0.12.2", "react-telephone-input": "3.4.5", "redux": "3.5.2", diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx index 600e2dbd9..cd2689207 100644 --- a/src/components/footer/www/footer.jsx +++ b/src/components/footer/www/footer.jsx @@ -3,6 +3,7 @@ var FormattedMessage = require('react-intl').FormattedMessage; var FooterBox = require('../container/footer.jsx'); var LanguageChooser = require('../../languagechooser/languagechooser.jsx'); +var MediaQuery = require('react-responsive'); require('./footer.scss'); @@ -11,7 +12,7 @@ var Footer = React.createClass({ render: function () { return ( - {this.props.layout == 'COLS4' || this.props.layout == 'COLS6' ? [ +
    @@ -48,7 +49,8 @@ var Footer = React.createClass({
    - ] : [ +
    +
    @@ -199,7 +201,7 @@ var Footer = React.createClass({
  • - ]} +
    diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index ce2888ab1..32fbe3587 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -17,6 +17,7 @@ var Login = require('../../login/login.jsx'); var Modal = require('../../modal/modal.jsx'); var NavigationBox = require('../container/navigation.jsx'); var Registration = require('../../registration/registration.jsx'); +var MediaQuery = require('react-responsive'); require('./navigation.scss'); @@ -248,8 +249,9 @@ var Navigation = React.createClass({ - {this.props.layout == 'COLS8' || this.props.layout == 'COLS12' ? - this.props.session.session.user.username : ''} + + {this.props.session.session.user.username} +
    {this.props.children}
    ); } }); -var mapStateToProps = function (state) { - return { - layout: state.layout - }; -}; - -var ConnectedPage = connect(mapStateToProps)(Page); -module.exports = ConnectedPage; +module.exports = Page; diff --git a/src/redux/reducer.js b/src/redux/reducer.js index e54baf0dc..7824793b0 100644 --- a/src/redux/reducer.js +++ b/src/redux/reducer.js @@ -5,12 +5,11 @@ var detailsReducer = require('./conference-details.js').detailsReducer; var permissionsReducer = require('./permissions.js').permissionsReducer; var sessionReducer = require('./session.js').sessionReducer; var tokenReducer = require('./token.js').tokenReducer; -var layout = require('./layout.js'); +// var layout = require('./layout.js'); var appReducer = combineReducers({ session: sessionReducer, token: tokenReducer, - layout: layout, permissions: permissionsReducer, conferenceSchedule: scheduleReducer, conferenceDetails: detailsReducer diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index 368b03396..574e4af35 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -6,7 +6,6 @@ var React = require('react'); var api = require('../../lib/api'); var render = require('../../lib/render.jsx'); var sessionActions = require('../../redux/session.js'); -var layout = require('../../redux/layout.js'); var shuffle = require('../../lib/shuffle.js').shuffle; var Activity = require('../../components/activity/activity.jsx'); @@ -43,12 +42,6 @@ var Splash = injectIntl(React.createClass({ permissions: {} }; }, - componentWillMount: function () { - this.props.dispatch(layout.getLayout()); - for (var query in layout.mediaQueries) { - layout.mediaQueries[query].addListener(this.onResize); - } - }, componentDidUpdate: function (prevProps) { if (this.props.session.session.user != prevProps.session.session.user) { if (this.props.session.session.user) { @@ -94,9 +87,6 @@ var Splash = injectIntl(React.createClass({ } } }, - onResize: function () { - this.props.dispatch(layout.getLayout()); - }, getActivity: function () { api({ uri: '/proxy/users/' + this.props.session.session.user.username + '/activity?limit=5' @@ -449,8 +439,7 @@ var Splash = injectIntl(React.createClass({ var mapStateToProps = function (state) { return { session: state.session, - permissions: state.permissions, - layout: state.layout + permissions: state.permissions }; }; diff --git a/src/views/splash/splash.scss b/src/views/splash/splash.scss index 9739992cf..841b2c73a 100644 --- a/src/views/splash/splash.scss +++ b/src/views/splash/splash.scss @@ -65,8 +65,17 @@ .box { width: $cols6; - white-space: normal; } } } } + +//6 columns +@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) { + .splash { + .splash-header { + margin: 0 auto; + width: $cols8; + } + } +} From a8b26b1a1c63ddf29f812c978b6469a4030f4305 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 26 Jul 2016 11:06:21 -0400 Subject: [PATCH 09/92] experiment with removing content display from scss --- src/components/footer/www/footer.jsx | 6 ++-- src/components/navigation/www/navigation.jsx | 29 ++++++++++--------- src/components/navigation/www/navigation.scss | 23 +-------------- src/lib/frameless.js | 9 ++++++ 4 files changed, 30 insertions(+), 37 deletions(-) create mode 100644 src/lib/frameless.js diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx index cd2689207..a34a0f06e 100644 --- a/src/components/footer/www/footer.jsx +++ b/src/components/footer/www/footer.jsx @@ -3,7 +3,9 @@ var FormattedMessage = require('react-intl').FormattedMessage; var FooterBox = require('../container/footer.jsx'); var LanguageChooser = require('../../languagechooser/languagechooser.jsx'); + var MediaQuery = require('react-responsive'); +var frameless = require('../../../lib/frameless'); require('./footer.scss'); @@ -12,7 +14,7 @@ var Footer = React.createClass({ render: function () { return ( - +
    @@ -50,7 +52,7 @@ var Footer = React.createClass({
    - +
    diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index 32fbe3587..620c4720a 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -17,7 +17,9 @@ var Login = require('../../login/login.jsx'); var Modal = require('../../modal/modal.jsx'); var NavigationBox = require('../container/navigation.jsx'); var Registration = require('../../registration/registration.jsx'); + var MediaQuery = require('react-responsive'); +var frameless = require('../../../lib/frameless'); require('./navigation.scss'); @@ -190,33 +192,33 @@ var Navigation = React.createClass({
    • -
    • + -
    • -
    • + + -
    • -
    • + + -
    • +
    • -
    • + -
    • + -
    • +
    • + {this.props.session.status === sessionActions.Status.FETCHED ? ( this.props.session.session.user ? [
    • @@ -237,19 +239,20 @@ var Navigation = React.createClass({
    • , -
    • + -
    • , + ,
    • - + {this.props.session.session.user.username} diff --git a/src/components/navigation/www/navigation.scss b/src/components/navigation/www/navigation.scss index 796d0c432..9acccec27 100644 --- a/src/components/navigation/www/navigation.scss +++ b/src/components/navigation/www/navigation.scss @@ -226,21 +226,13 @@ } } } + //4 columns @media only screen and (max-width: $mobile - 1) { #navigation .inner { width: $cols4; > ul > li { - &.create, - &.explore, - &.discuss, - &.help, - &.search, - &.mystuff { - display: none; - } - &.login-item { margin-left: 0; } @@ -269,13 +261,6 @@ width: $cols6; > ul > li { - &.explore, - &.discuss, - &.search, - &.mystuff { - display: none; - } - &.login-item { margin-left: 0; } @@ -303,12 +288,6 @@ width: $cols8; > ul > li { - &.explore, - &.search, - &.mystuff { - display: none; - } - &.login-item, &.account-nav { margin-left: 0; diff --git a/src/lib/frameless.js b/src/lib/frameless.js new file mode 100644 index 000000000..9c63eb507 --- /dev/null +++ b/src/lib/frameless.js @@ -0,0 +1,9 @@ +/* This file contains breakpoints from _frameless.scss, to be used in MediaQuery elements. + * All units are in px, as per _frameless.scss and the MediaQuery default arguments. + */ + +module.exports = { + desktop: 942, + tablet: 640, + mobile: 480 +}; From 2a5f330884e487bdab7c75f6c28d4a0a293d8aad Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 26 Jul 2016 11:29:45 -0400 Subject: [PATCH 10/92] hide intro if not desktop width --- src/views/splash/splash.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index 574e4af35..3cb0f4b10 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -21,6 +21,9 @@ var Page = require('../../components/page/www/page.jsx'); var TeacherBanner = require('../../components/teacher-banner/teacher-banner.jsx'); var Welcome = require('../../components/welcome/welcome.jsx'); +var MediaQuery = require('react-responsive'); +var frameless = require('../../lib/frameless'); + require('./splash.scss'); var Splash = injectIntl(React.createClass({ @@ -393,7 +396,9 @@ var Splash = injectIntl(React.createClass({
    ] : [ - /**/ + + + ]) : [] } From ae9c15f6ce5f7a9d2161c83f035e49f1c9d07c34 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 26 Jul 2016 15:51:05 -0400 Subject: [PATCH 11/92] update with routes.json from develop branch --- src/routes.json | 260 +++++++++++++++++++++++++++--------------------- 1 file changed, 146 insertions(+), 114 deletions(-) diff --git a/src/routes.json b/src/routes.json index 9866e40d2..a1b789f34 100644 --- a/src/routes.json +++ b/src/routes.json @@ -2,126 +2,43 @@ { "name": "splash", "pattern": "^/?$", + "routeAlias": "/?$", "view": "splash/splash", - "viewportWidth": "device-width", - "title": "Imagine, Program, Share" + "title": "Imagine, Program, Share", + "viewportWidth": "device-width" }, { "name": "about", "pattern": "^/about/?$", + "routeAlias": "/about/?$", "view": "about/about", "title": "About" }, { - "name": "developers", - "pattern": "^/developers/?$", - "view": "developers/developers", - "title": "Developers" + "name": "guidelines", + "pattern": "^/community_guidelines/?$", + "routeAlias": "/community_guidelines/?$", + "view": "guidelines/guidelines", + "title": "Scratch Community Guidelines" }, { - "name": "hoc", - "pattern": "^/hoc/?$", - "view": "hoc/hoc", - "title": "Hour of Code" + "name": "student-complete-registration", + "pattern": "^/classes/complete_registration", + "routeAlias": "/classes/(complete_registration|.+/register/.+)", + "view": "studentcompleteregistration/studentcompleteregistration", + "title": "Complete your Registration" }, { - "name": "explore", - "pattern": "^/explore/:projects/:all/?$", - "routeAlias": "^/explore(?!/ajax)", - "view": "explore/explore", - "title": "Explore" - }, - { - "name": "explore-redirect", - "pattern": "^/explore/?$", - "routeAlias": "^/explore(?!/ajax)", - "redirect": "/explore/projects/all" - }, - { - "name": "explore-projects-redirect", - "pattern": "^/explore/projects/?$", - "routeAlias": "^/explore(?!/ajax)", - "redirect": "/explore/projects/all" - }, - { - "name": "explore-studios-redirect", - "pattern": "^/explore/studios/?$", - "routeAlias": "^/explore(?!/ajax)", - "redirect": "/explore/studios/all" - }, - { - "name": "search", - "pattern": "^/search/:projects?$/?$", - "routeAlias": "^/search", - "view": "search/search", - "title": "Search" - }, - { - "name": "credits", - "pattern": "^/info/credits/?$", - "view": "credits/credits", - "title": "Credits" - }, - { - "name": "faq", - "pattern": "^/info/faq/?$", - "view": "faq/faq", - "viewportWidth": "device-width", - "title": "FAQ" - }, - { - "name": "educator-landing", - "pattern": "^/educators/?$", - "view": "teachers/landing/landing", - "title": "Educators" - }, - { - "name": "teacher-faq", - "pattern": "^/educators/faq/?$", - "view": "teachers/faq/faq", - "title": "Teacher Accounts FAQ" - }, - { - "name": "cards", - "pattern": "^/info/cards/?$", - "view": "cards/cards", - "title": "Cards" - }, - { - "name": "communityblocks-interviews", - "pattern": "^/info/communityblocks-interviews/?$", - "view": "communityblocks-interviews/communityblocks-interviews", - "title": "Community Blocks Beta Tester Interviews" - }, - { - "name": "jobs", - "pattern": "^/jobs/?$", - "view": "jobs/jobs", - "title": "Jobs" - }, - { - "name": "teacherregistration", - "pattern": "^/educators/register$", - "view": "teacherregistration/teacherregistration", - "title": "Teacher Registration", - "viewportWidth": "device-width" - }, - { - "name": "teacherwaitingroom", - "pattern": "^/educators/waiting", - "view": "teacherwaitingroom/teacherwaitingroom", - "title": "Thank you for requesting a Scratch Teacher Account" - }, - { - "name": "wedo2", - "pattern": "^/wedo/?$", - "view": "wedo2/wedo2", - "title": "LEGO WeDo 2.0" + "name": "student-registration", + "pattern": "^/classes/:id/register/:token", + "routeAlias": "/classes/(complete_registration|.+/register/.+)", + "view": "studentregistration/studentregistration", + "title": "Class Registration" }, { "name": "conference-index", "pattern": "^/conference/?$", - "routeAlias": "^/conference(?!/201[4-5])", + "routeAlias": "/conference(?!/201[4-5])", "view": "conference/index/index", "title": "Scratch Conference", "viewportWidth": "device-width" @@ -129,7 +46,7 @@ { "name": "conference-plan", "pattern": "^/conference/plan/?$", - "routeAlias": "^/conference(?!/201[4-5])", + "routeAlias": "/conference(?!/201[4-5])", "view": "conference/plan/plan", "title": "Plan Your Visit", "viewportWidth": "device-width" @@ -137,7 +54,7 @@ { "name": "conference-expectations", "pattern": "^/conference/expect/?$", - "routeAlias": "^/conference(?!/201[4-5])", + "routeAlias": "/conference(?!/201[4-5])", "view": "conference/expect/expect", "title": "What to Expect", "viewportWidth": "device-width" @@ -145,7 +62,7 @@ { "name": "conference-schedule", "pattern": "^/conference/schedule/?$", - "routeAlias": "^/conference(?!/201[4-5])", + "routeAlias": "/conference(?!/201[4-5])", "view": "conference/schedule/schedule", "title": "Conference Schedule", "viewportWidth": "device-width" @@ -153,38 +70,153 @@ { "name": "conference-details", "pattern": "^/conference/:id/details/?$", - "routeAlias": "^/conference(?!/201[4-5])", + "routeAlias": "/conference(?!/201[4-5])", "view": "conference/details/details", "title": "Event Details", "viewportWidth": "device-width" }, { - "name": "donate", - "pattern": "^/info/donate/?", - "redirect": "https://secure.donationpay.org/scratchfoundation/" + "name": "developers", + "pattern": "^/developers/?$", + "routeAlias": "/developers/?$", + "view": "developers/developers", + "title": "Developers" }, { "name": "dmca", "pattern": "^/DMCA/?$", + "routeAlias": "/DMCA/?$", "view": "dmca/dmca", "title": "DMCA" }, { - "name": "guidelines", - "pattern": "^/community_guidelines/?$", - "view": "guidelines/guidelines", - "title": "Scratch Community Guidelines" + "name": "educator-landing", + "pattern": "^/educators/?$", + "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", + "view": "teachers/landing/landing", + "title": "Educators" + }, + { + "name": "teacher-faq", + "pattern": "^/educators/faq/?$", + "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", + "view": "teachers/faq/faq", + "title": "Teacher Accounts FAQ" + }, + { + "name": "teacherregistration", + "pattern": "^/educators/register$", + "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", + "view": "teacherregistration/teacherregistration", + "title": "Teacher Registration", + "viewportWidth": "device-width" + }, + { + "name": "teacherwaitingroom", + "pattern": "^/educators/waiting", + "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", + "view": "teacherwaitingroom/teacherwaitingroom", + "title": "Thank you for requesting a Scratch Teacher Account" + }, + { + "name": "explore", + "pattern": "^/explore/:projects/:all/?$", + "routeAlias": "/explore(?!/ajax)", + "view": "explore/explore", + "title": "Explore" + }, + { + "name": "hoc", + "pattern": "^/hoc/?$", + "routeAlias": "/hoc/?$", + "view": "hoc/hoc", + "title": "Hour of Code" + }, + { + "name": "cards", + "pattern": "^/info/cards/?$", + "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq)/?$", + "view": "cards/cards", + "title": "Cards" + }, + { + "name": "communityblocks-interviews", + "pattern": "^/info/communityblocks-interviews/?$", + "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq|donate)/?$", + "view": "communityblocks-interviews/communityblocks-interviews", + "title": "Community Blocks Beta Tester Interviews" + }, + { + "name": "credits", + "pattern": "^/info/credits/?$", + "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq)/?$", + "view": "credits/credits", + "title": "Credits" + }, + { + "name": "faq", + "pattern": "^/info/faq/?$", + "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq)/?$", + "view": "faq/faq", + "title": "FAQ" + }, + { + "name": "jobs", + "pattern": "^/jobs/?$", + "routeAlias": "/jobs/?$", + "view": "jobs/jobs", + "title": "Jobs" }, { "name": "privacypolicy", "pattern": "^/privacy_policy/?$", + "routeAlias": "/privacy_policy/?$", "view": "privacypolicy/privacypolicy", "title": "Privacy Policy" }, + { + "name": "search", + "pattern": "^/search/:projects?$/?$", + "routeAlias": "/search", + "view": "search/search", + "title": "Search" + }, { "name": "terms", "pattern": "^/terms_of_use/?$", + "routeAlias": "/terms_of_use/?$", "view": "terms/terms", "title": "Scratch Terms of Use" + }, + { + "name": "wedo2", + "pattern": "^/wedo/?$", + "routeAlias": "/wedo/?$", + "view": "wedo2/wedo2", + "title": "LEGO WeDo 2.0" + }, + { + "name": "donate", + "pattern": "^/info/donate/?", + "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq|donate)/?$", + "redirect": "https://secure.donationpay.org/scratchfoundation/" + }, + { + "name": "explore-redirect", + "pattern": "^/explore/?$", + "routeAlias": "/explore(?!/ajax)", + "redirect": "/explore/projects/all" + }, + { + "name": "explore-projects-redirect", + "pattern": "^/explore/projects/?$", + "routeAlias": "/explore(?!/ajax)", + "redirect": "/explore/projects/all" + }, + { + "name": "explore-studios-redirect", + "pattern": "^/explore/studios/?$", + "routeAlias": "/explore(?!/ajax)", + "redirect": "/explore/studios/all" } ] From 25402113bf1f8e794065c7e58bb46228d6fdee13 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Wed, 27 Jul 2016 09:26:33 -0400 Subject: [PATCH 12/92] tweak a few things before WIP PR --- package.json | 3 +- src/redux/layout.js | 64 ------------------------------------------ src/redux/reducer.js | 1 - src/redux/session.json | 1 + src/routes.json | 14 --------- 5 files changed, 2 insertions(+), 81 deletions(-) delete mode 100644 src/redux/layout.js create mode 100644 src/redux/session.json diff --git a/package.json b/package.json index a583a712d..dbf074b74 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "lodash.defaultsdeep": "3.10.0", "lodash.merge": "3.3.2", "lodash.omit": "3.1.0", - "lodash.pickby": "^4.4.0", "lodash.range": "3.0.1", "minilog": "2.0.8", "node-sass": "3.3.3", @@ -74,7 +73,7 @@ "react-modal": "1.3.0", "react-onclickoutside": "4.1.1", "react-redux": "4.4.5", - "react-responsive": "^1.1.4", + "react-responsive": "1.1.4", "react-slick": "0.12.2", "react-telephone-input": "3.4.5", "redux": "3.5.2", diff --git a/src/redux/layout.js b/src/redux/layout.js deleted file mode 100644 index f39e7667a..000000000 --- a/src/redux/layout.js +++ /dev/null @@ -1,64 +0,0 @@ -var keyMirror = require('keymirror'); -var pickBy = require('lodash.pickBy'); - -var Types = { - SET_STATE: 'splash/activity/SET_LAYOUT', - SET_ERROR: 'splash/activity/SET_ERROR' -}; - -function reducer (state, action) { - if (typeof state === 'undefined') { - state = reducer.getInitialState(); - } - switch (action.type) { - case Types.SET_STATE: - return action.layout; - case Types.SET_ERROR: - return state; - default: - return state; - } -} - -reducer.Layouts = keyMirror({ - COLS4: null, - COLS6: null, - COLS8: null, - COLS12: null -}); - -reducer.mediaQueries = { - COLS4: window.matchMedia('screen and (max-width: 479px)'), - COLS6: window.matchMedia('screen and (min-width: 480px) and (max-width: 639px)'), - COLS8: window.matchMedia('screen and (min-width: 640px) and (max-width: 941px)'), - COLS12: window.matchMedia('screen and (min-width: 942px)') -}; - -reducer.getInitialState = function () { - return reducer.Layouts.COLS12; -}; - -reducer.setLayout = function (layout) { - return { - type: Types.SET_STATE, - layout: layout - }; -}; - -reducer.setLayoutError = function (error) { - return { - type: Types.SET_ERROR, - error: error - }; -}; - -reducer.getLayout = function () { - return function (dispatch) { - var matched = pickBy(reducer.mediaQueries, function (value, key) { //eslint-disable-line - return value.matches; - }); - dispatch(reducer.setLayout(Object.keys(matched)[0])); - }; -}; - -module.exports = reducer; diff --git a/src/redux/reducer.js b/src/redux/reducer.js index 7824793b0..b7dd7b31d 100644 --- a/src/redux/reducer.js +++ b/src/redux/reducer.js @@ -5,7 +5,6 @@ var detailsReducer = require('./conference-details.js').detailsReducer; var permissionsReducer = require('./permissions.js').permissionsReducer; var sessionReducer = require('./session.js').sessionReducer; var tokenReducer = require('./token.js').tokenReducer; -// var layout = require('./layout.js'); var appReducer = combineReducers({ session: sessionReducer, diff --git a/src/redux/session.json b/src/redux/session.json new file mode 100644 index 000000000..2e530d3c0 --- /dev/null +++ b/src/redux/session.json @@ -0,0 +1 @@ +{ "user": { "id": 36977, "username": "technoboy10", "thumbnailUrl": "//cdn2.scratch.mit.edu/get_image/user/36977_32x32.png?v=1459545234.83", "dateJoined": "2007-08-25T16:43:03" }, "permissions": { "admin": false, "social": true, "educator": false, "student": false }, "flags": { "has_outstanding_email_confirmation": false, "show_welcome": true, "confirm_email_banner": true, "unsupported_browser_banner": true } } diff --git a/src/routes.json b/src/routes.json index a1b789f34..aef66a4f9 100644 --- a/src/routes.json +++ b/src/routes.json @@ -21,20 +21,6 @@ "view": "guidelines/guidelines", "title": "Scratch Community Guidelines" }, - { - "name": "student-complete-registration", - "pattern": "^/classes/complete_registration", - "routeAlias": "/classes/(complete_registration|.+/register/.+)", - "view": "studentcompleteregistration/studentcompleteregistration", - "title": "Complete your Registration" - }, - { - "name": "student-registration", - "pattern": "^/classes/:id/register/:token", - "routeAlias": "/classes/(complete_registration|.+/register/.+)", - "view": "studentregistration/studentregistration", - "title": "Class Registration" - }, { "name": "conference-index", "pattern": "^/conference/?$", From 90631b3054ee376005fefd6b03a3a76ac4ad8cd2 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Wed, 27 Jul 2016 09:27:22 -0400 Subject: [PATCH 13/92] remove dev file --- src/redux/session.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/redux/session.json diff --git a/src/redux/session.json b/src/redux/session.json deleted file mode 100644 index 2e530d3c0..000000000 --- a/src/redux/session.json +++ /dev/null @@ -1 +0,0 @@ -{ "user": { "id": 36977, "username": "technoboy10", "thumbnailUrl": "//cdn2.scratch.mit.edu/get_image/user/36977_32x32.png?v=1459545234.83", "dateJoined": "2007-08-25T16:43:03" }, "permissions": { "admin": false, "social": true, "educator": false, "student": false }, "flags": { "has_outstanding_email_confirmation": false, "show_welcome": true, "confirm_email_banner": true, "unsupported_browser_banner": true } } From 0d2416c850cef5d287b6a989008d022bdc085504 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Wed, 27 Jul 2016 09:33:15 -0400 Subject: [PATCH 14/92] fix merge conflicts --- src/routes.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/routes.json b/src/routes.json index aef66a4f9..a1b789f34 100644 --- a/src/routes.json +++ b/src/routes.json @@ -21,6 +21,20 @@ "view": "guidelines/guidelines", "title": "Scratch Community Guidelines" }, + { + "name": "student-complete-registration", + "pattern": "^/classes/complete_registration", + "routeAlias": "/classes/(complete_registration|.+/register/.+)", + "view": "studentcompleteregistration/studentcompleteregistration", + "title": "Complete your Registration" + }, + { + "name": "student-registration", + "pattern": "^/classes/:id/register/:token", + "routeAlias": "/classes/(complete_registration|.+/register/.+)", + "view": "studentregistration/studentregistration", + "title": "Class Registration" + }, { "name": "conference-index", "pattern": "^/conference/?$", From 5e7bf8573307144e33832589c1ad6350e8a5db9a Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Wed, 27 Jul 2016 09:48:07 -0400 Subject: [PATCH 15/92] remove redundant media query from footer.scss --- src/components/footer/www/footer.scss | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/components/footer/www/footer.scss b/src/components/footer/www/footer.scss index d529dae84..43d195030 100644 --- a/src/components/footer/www/footer.scss +++ b/src/components/footer/www/footer.scss @@ -46,12 +46,3 @@ text-align: center; } } - - - -//4 and 6 columns -@media only screen and (max-width: $tablet - 1) { - #footer .lists { - justify-content: space-around; - } -} From 26d314a5c1cd188dd8ca7eb6f6b26598ab2d69b6 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Wed, 27 Jul 2016 09:54:07 -0400 Subject: [PATCH 16/92] undo weird merge thing that happened a while back --- src/routes.json | 281 +++++++++++++++++++++--------------------------- 1 file changed, 124 insertions(+), 157 deletions(-) diff --git a/src/routes.json b/src/routes.json index a1b789f34..c157840e6 100644 --- a/src/routes.json +++ b/src/routes.json @@ -2,7 +2,6 @@ { "name": "splash", "pattern": "^/?$", - "routeAlias": "/?$", "view": "splash/splash", "title": "Imagine, Program, Share", "viewportWidth": "device-width" @@ -10,103 +9,98 @@ { "name": "about", "pattern": "^/about/?$", - "routeAlias": "/about/?$", "view": "about/about", "title": "About" }, - { - "name": "guidelines", - "pattern": "^/community_guidelines/?$", - "routeAlias": "/community_guidelines/?$", - "view": "guidelines/guidelines", - "title": "Scratch Community Guidelines" - }, - { - "name": "student-complete-registration", - "pattern": "^/classes/complete_registration", - "routeAlias": "/classes/(complete_registration|.+/register/.+)", - "view": "studentcompleteregistration/studentcompleteregistration", - "title": "Complete your Registration" - }, - { - "name": "student-registration", - "pattern": "^/classes/:id/register/:token", - "routeAlias": "/classes/(complete_registration|.+/register/.+)", - "view": "studentregistration/studentregistration", - "title": "Class Registration" - }, - { - "name": "conference-index", - "pattern": "^/conference/?$", - "routeAlias": "/conference(?!/201[4-5])", - "view": "conference/index/index", - "title": "Scratch Conference", - "viewportWidth": "device-width" - }, - { - "name": "conference-plan", - "pattern": "^/conference/plan/?$", - "routeAlias": "/conference(?!/201[4-5])", - "view": "conference/plan/plan", - "title": "Plan Your Visit", - "viewportWidth": "device-width" - }, - { - "name": "conference-expectations", - "pattern": "^/conference/expect/?$", - "routeAlias": "/conference(?!/201[4-5])", - "view": "conference/expect/expect", - "title": "What to Expect", - "viewportWidth": "device-width" - }, - { - "name": "conference-schedule", - "pattern": "^/conference/schedule/?$", - "routeAlias": "/conference(?!/201[4-5])", - "view": "conference/schedule/schedule", - "title": "Conference Schedule", - "viewportWidth": "device-width" - }, - { - "name": "conference-details", - "pattern": "^/conference/:id/details/?$", - "routeAlias": "/conference(?!/201[4-5])", - "view": "conference/details/details", - "title": "Event Details", - "viewportWidth": "device-width" - }, { "name": "developers", "pattern": "^/developers/?$", - "routeAlias": "/developers/?$", "view": "developers/developers", "title": "Developers" }, { - "name": "dmca", - "pattern": "^/DMCA/?$", - "routeAlias": "/DMCA/?$", - "view": "dmca/dmca", - "title": "DMCA" + "name": "hoc", + "pattern": "^/hoc/?$", + "view": "hoc/hoc", + "title": "Hour of Code" + }, + { + "name": "explore", + "pattern": "^/explore/:projects/:all/?$", + "routeAlias": "^/explore(?!/ajax)", + "view": "explore/explore", + "title": "Explore" + }, + { + "name": "explore-redirect", + "pattern": "^/explore/?$", + "routeAlias": "^/explore(?!/ajax)", + "redirect": "/explore/projects/all" + }, + { + "name": "explore-projects-redirect", + "pattern": "^/explore/projects/?$", + "routeAlias": "^/explore(?!/ajax)", + "redirect": "/explore/projects/all" + }, + { + "name": "explore-studios-redirect", + "pattern": "^/explore/studios/?$", + "routeAlias": "^/explore(?!/ajax)", + "redirect": "/explore/studios/all" + }, + { + "name": "search", + "pattern": "^/search/:projects?$/?$", + "routeAlias": "^/search", + "view": "search/search", + "title": "Search" + }, + { + "name": "credits", + "pattern": "^/info/credits/?$", + "view": "credits/credits", + "title": "Credits" + }, + { + "name": "faq", + "pattern": "^/info/faq/?$", + "view": "faq/faq", + "title": "FAQ" }, { "name": "educator-landing", "pattern": "^/educators/?$", - "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", "view": "teachers/landing/landing", "title": "Educators" }, { "name": "teacher-faq", "pattern": "^/educators/faq/?$", - "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", "view": "teachers/faq/faq", "title": "Teacher Accounts FAQ" }, + { + "name": "cards", + "pattern": "^/info/cards/?$", + "view": "cards/cards", + "title": "Cards" + }, + { + "name": "communityblocks-interviews", + "pattern": "^/info/communityblocks-interviews/?$", + "view": "communityblocks-interviews/communityblocks-interviews", + "title": "Community Blocks Beta Tester Interviews" + }, + { + "name": "jobs", + "pattern": "^/jobs/?$", + "view": "jobs/jobs", + "title": "Jobs" + }, { "name": "teacherregistration", "pattern": "^/educators/register$", - "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", "view": "teacherregistration/teacherregistration", "title": "Teacher Registration", "viewportWidth": "device-width" @@ -114,109 +108,82 @@ { "name": "teacherwaitingroom", "pattern": "^/educators/waiting", - "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", "view": "teacherwaitingroom/teacherwaitingroom", "title": "Thank you for requesting a Scratch Teacher Account" }, - { - "name": "explore", - "pattern": "^/explore/:projects/:all/?$", - "routeAlias": "/explore(?!/ajax)", - "view": "explore/explore", - "title": "Explore" - }, - { - "name": "hoc", - "pattern": "^/hoc/?$", - "routeAlias": "/hoc/?$", - "view": "hoc/hoc", - "title": "Hour of Code" - }, - { - "name": "cards", - "pattern": "^/info/cards/?$", - "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq)/?$", - "view": "cards/cards", - "title": "Cards" - }, - { - "name": "communityblocks-interviews", - "pattern": "^/info/communityblocks-interviews/?$", - "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq|donate)/?$", - "view": "communityblocks-interviews/communityblocks-interviews", - "title": "Community Blocks Beta Tester Interviews" - }, - { - "name": "credits", - "pattern": "^/info/credits/?$", - "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq)/?$", - "view": "credits/credits", - "title": "Credits" - }, - { - "name": "faq", - "pattern": "^/info/faq/?$", - "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq)/?$", - "view": "faq/faq", - "title": "FAQ" - }, - { - "name": "jobs", - "pattern": "^/jobs/?$", - "routeAlias": "/jobs/?$", - "view": "jobs/jobs", - "title": "Jobs" - }, - { - "name": "privacypolicy", - "pattern": "^/privacy_policy/?$", - "routeAlias": "/privacy_policy/?$", - "view": "privacypolicy/privacypolicy", - "title": "Privacy Policy" - }, - { - "name": "search", - "pattern": "^/search/:projects?$/?$", - "routeAlias": "/search", - "view": "search/search", - "title": "Search" - }, - { - "name": "terms", - "pattern": "^/terms_of_use/?$", - "routeAlias": "/terms_of_use/?$", - "view": "terms/terms", - "title": "Scratch Terms of Use" - }, { "name": "wedo2", "pattern": "^/wedo/?$", - "routeAlias": "/wedo/?$", "view": "wedo2/wedo2", "title": "LEGO WeDo 2.0" }, + { + "name": "conference-index", + "pattern": "^/conference/?$", + "routeAlias": "^/conference(?!/201[4-5])", + "view": "conference/index/index", + "title": "Scratch Conference", + "viewportWidth": "device-width" + }, + { + "name": "conference-plan", + "pattern": "^/conference/plan/?$", + "routeAlias": "^/conference(?!/201[4-5])", + "view": "conference/plan/plan", + "title": "Plan Your Visit", + "viewportWidth": "device-width" + }, + { + "name": "conference-expectations", + "pattern": "^/conference/expect/?$", + "routeAlias": "^/conference(?!/201[4-5])", + "view": "conference/expect/expect", + "title": "What to Expect", + "viewportWidth": "device-width" + }, + { + "name": "conference-schedule", + "pattern": "^/conference/schedule/?$", + "routeAlias": "^/conference(?!/201[4-5])", + "view": "conference/schedule/schedule", + "title": "Conference Schedule", + "viewportWidth": "device-width" + }, + { + "name": "conference-details", + "pattern": "^/conference/:id/details/?$", + "routeAlias": "^/conference(?!/201[4-5])", + "view": "conference/details/details", + "title": "Event Details", + "viewportWidth": "device-width" + }, { "name": "donate", "pattern": "^/info/donate/?", - "routeAlias": "/info/(cards|communityblocks-interviews|credits|faq|donate)/?$", "redirect": "https://secure.donationpay.org/scratchfoundation/" }, { - "name": "explore-redirect", - "pattern": "^/explore/?$", - "routeAlias": "/explore(?!/ajax)", - "redirect": "/explore/projects/all" + "name": "dmca", + "pattern": "^/DMCA/?$", + "view": "dmca/dmca", + "title": "DMCA" }, { - "name": "explore-projects-redirect", - "pattern": "^/explore/projects/?$", - "routeAlias": "/explore(?!/ajax)", - "redirect": "/explore/projects/all" + "name": "guidelines", + "pattern": "^/community_guidelines/?$", + "view": "guidelines/guidelines", + "title": "Scratch Community Guidelines" }, { - "name": "explore-studios-redirect", - "pattern": "^/explore/studios/?$", - "routeAlias": "/explore(?!/ajax)", - "redirect": "/explore/studios/all" + "name": "privacypolicy", + "pattern": "^/privacy_policy/?$", + "view": "privacypolicy/privacypolicy", + "title": "Privacy Policy" + }, + { + "name": "terms", + "pattern": "^/terms_of_use/?$", + "view": "terms/terms", + "title": "Scratch Terms of Use" } ] From 2da07923cadbb552e59ab6a85724d3dd53ea50be Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Wed, 27 Jul 2016 15:49:48 -0400 Subject: [PATCH 17/92] revert verbiage change as per IRL discussion with Carl --- src/components/login/login.jsx | 2 +- src/components/navigation/www/navigation.jsx | 4 ++-- src/l10n.json | 4 ++-- test/localization/spot_check_nav.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/login/login.jsx b/src/components/login/login.jsx index 7b5aa1476..73c1e6ad7 100644 --- a/src/components/login/login.jsx +++ b/src/components/login/login.jsx @@ -50,7 +50,7 @@ var Login = React.createClass({ ] : [ ]} diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index 620c4720a..1b8a3b265 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -300,7 +300,7 @@ var Navigation = React.createClass({ ] : [
  • - +
  • , - + Date: Thu, 28 Jul 2016 13:59:23 -0400 Subject: [PATCH 18/92] Set up SCRATCH_ENV for staging --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 99aaa1b5b..59f2aa1da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,6 +36,11 @@ env: - GA_TRACKER_VAR=GA_TRACKER_$TRAVIS_BRANCH - GA_TRACKER=${!GA_TRACKER_VAR} - GA_TRACKER=${GA_TRACKER:-$GA_TRACKER_STAGING} + - SCRATCH_ENV_master=production + - SCRATCH_ENV_STAGING=staging + - SCRATCH_ENV_VAR=SCRATCH_ENV_$TRAVIS_BRANCH + - SCRATCH_ENV=${!SCRATCH_ENV_VAR} + - SCRATCH_ENV=${SCRATCH_ENV:-$SCRATCH_ENV_STAGING} - S3_BUCKET_NAME_master=scratch-www-production - S3_BUCKET_NAME_STAGING=scratch-www-staging - S3_BUCKET_NAME_VAR=S3_BUCKET_NAME_$TRAVIS_BRANCH From 2c9df3237e3f58f20fc5ab3eaa639c7245efc1b8 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 28 Jul 2016 14:10:36 -0400 Subject: [PATCH 19/92] Fix gender input error alignment in IE11 Also re-apply the arrow styling on the organization checkbox group, since it appears to be aligned correctly. --- src/components/registration/steps.scss | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/components/registration/steps.scss b/src/components/registration/steps.scss index 21d0ff0a5..f8e0782e2 100644 --- a/src/components/registration/steps.scss +++ b/src/components/registration/steps.scss @@ -212,5 +212,57 @@ } } } + + &.demographics-step { + .form-group { + &.has-error { + .gender-input { + transform: translateY(-3rem); + } + } + } + } + + &.organization-step { + .checkbox-group { + .validation-message { + $arrow-border-width: 1rem; + display: block; + position: absolute; + top: 0; + left: 0; + transform: translate(16rem, -16rem); + margin-left: $arrow-border-width; + border: 1px solid $active-gray; + border-radius: 5px; + background-color: $ui-orange; + padding: 1rem; + max-width: 18.75rem; + min-height: 1rem; + max-height: 3rem; + overflow: visible; + color: $type-white; + + &:before { + display: block; + position: absolute; + top: 1rem; + left: -$arrow-border-width / 2; + + transform: rotate(45deg); + + border-bottom: 1px solid $active-gray; + border-left: 1px solid $active-gray; + border-radius: 5px; + + background-color: $ui-orange; + width: $arrow-border-width; + height: $arrow-border-width; + + content: ""; + } + } + } + } } } From d97bc193df6f07f5bd6553558e8dab1f7141e632 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 28 Jul 2016 15:11:14 -0400 Subject: [PATCH 20/92] Remove unnecessary redefinitions These are already defined in the base, and are not overridden anywhere. Only redefine the things that were overridden. --- src/components/registration/steps.scss | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/components/registration/steps.scss b/src/components/registration/steps.scss index f8e0782e2..c8987ece4 100644 --- a/src/components/registration/steps.scss +++ b/src/components/registration/steps.scss @@ -227,39 +227,14 @@ .checkbox-group { .validation-message { $arrow-border-width: 1rem; - display: block; position: absolute; - top: 0; - left: 0; transform: translate(16rem, -16rem); margin-left: $arrow-border-width; - border: 1px solid $active-gray; - border-radius: 5px; - background-color: $ui-orange; - padding: 1rem; - max-width: 18.75rem; min-height: 1rem; max-height: 3rem; - overflow: visible; - color: $type-white; &:before { display: block; - position: absolute; - top: 1rem; - left: -$arrow-border-width / 2; - - transform: rotate(45deg); - - border-bottom: 1px solid $active-gray; - border-left: 1px solid $active-gray; - border-radius: 5px; - - background-color: $ui-orange; - width: $arrow-border-width; - height: $arrow-border-width; - - content: ""; } } } From 4909d509d25ff4ff3719c377a581f4d3ecedeff4 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 28 Jul 2016 15:46:56 -0400 Subject: [PATCH 21/92] remove ie fallback to mobile styling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it looks like @rschamp’s wodnerful `top` alignment fix for Chrome and Edge also helps here, from a test I did in IE11. --- src/components/registration/steps.scss | 52 -------------------------- 1 file changed, 52 deletions(-) diff --git a/src/components/registration/steps.scss b/src/components/registration/steps.scss index c8987ece4..0355fbf7d 100644 --- a/src/components/registration/steps.scss +++ b/src/components/registration/steps.scss @@ -189,55 +189,3 @@ } } } - -/* IE10 and IE11 fallback */ -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { - .registration-step { - &.username-step, - &.demographics-step, - &.name-step, - &.phone-step, - &.organization-step, - &.address-step, - &.email-step { - .validation-message { - position: relative; - transform: none; - margin: inherit; - width: 100%; - height: inherit; - - &:before { - display: none; - } - } - } - - &.demographics-step { - .form-group { - &.has-error { - .gender-input { - transform: translateY(-3rem); - } - } - } - } - - &.organization-step { - .checkbox-group { - .validation-message { - $arrow-border-width: 1rem; - position: absolute; - transform: translate(16rem, -16rem); - margin-left: $arrow-border-width; - min-height: 1rem; - max-height: 3rem; - - &:before { - display: block; - } - } - } - } - } -} From 6b63f5b7ad7d2623ce6551bdb0b0639e0bb3ca31 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Fri, 29 Jul 2016 17:37:24 -0400 Subject: [PATCH 22/92] set image width to 100% --- src/views/jobs/jobs.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/jobs/jobs.scss b/src/views/jobs/jobs.scss index 2de2bbc73..8c07b5e57 100644 --- a/src/views/jobs/jobs.scss +++ b/src/views/jobs/jobs.scss @@ -4,6 +4,7 @@ .top { img { margin-bottom: 10px; + width: 100%; } } From 63c67a1d2d09d1a65ca03ce02dd79ac8cdd5514b Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 2 Aug 2016 09:17:13 -0400 Subject: [PATCH 23/92] use frameless.js for carousel breakpoints --- src/components/carousel/carousel.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/carousel/carousel.jsx b/src/components/carousel/carousel.jsx index 90f39d475..f7b4ae583 100644 --- a/src/components/carousel/carousel.jsx +++ b/src/components/carousel/carousel.jsx @@ -5,6 +5,8 @@ var Slider = require('react-slick'); var Thumbnail = require('../thumbnail/thumbnail.jsx'); +var frameless = require('../../../lib/frameless.js') + require('slick-carousel/slick/slick.scss'); require('slick-carousel/slick/slick-theme.scss'); require('./carousel.scss'); @@ -35,17 +37,17 @@ var Carousel = React.createClass({ slidesToScroll: 5, variableWidth: true, responsive: [ - {breakpoint: 480, settings: { + {breakpoint: frameless.mobile, settings: { arrows: true, slidesToScroll: 1, slidesToShow: 1, centerMode: true }}, - {breakpoint: 640, settings: { + {breakpoint: frameless.tablet, settings: { slidesToScroll: 2, slidesToShow: 2 }}, - {breakpoint: 942, settings: { + {breakpoint: frameless.desktop, settings: { slidesToScroll: 4, slidesToShow: 4 }} From f0c2280fde5188c1ef797d5dc74eb16f695db4cc Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Tue, 2 Aug 2016 15:23:09 -0400 Subject: [PATCH 24/92] Updates to registration UX for teachers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Phone too long validation occurs before submit now. 2. Organization “other” type is now being required 3. Organization type required now shows up at the same time as other organization validation errors 4. Username check now occurs earlier, on blur rather than on submit --- src/components/forms/phone-input.jsx | 22 ++++++---- src/components/forms/validations.jsx | 8 ++++ src/components/registration/steps.jsx | 62 ++++++++++++++++++++------- 3 files changed, 67 insertions(+), 25 deletions(-) diff --git a/src/components/forms/phone-input.jsx b/src/components/forms/phone-input.jsx index a4e26eb50..03a01470d 100644 --- a/src/components/forms/phone-input.jsx +++ b/src/components/forms/phone-input.jsx @@ -1,13 +1,15 @@ -var classNames = require('classnames'); -var React = require('react'); -var FormsyMixin = require('formsy-react').Mixin; -var ReactPhoneInput = require('react-telephone-input/lib/withStyles'); var allCountries = require('react-telephone-input/lib/country_data').allCountries; -var defaultValidationHOC = require('./validations.jsx').defaultValidationHOC; -var validationHOCFactory = require('./validations.jsx').validationHOCFactory; -var Row = require('formsy-react-components').Row; +var classNames = require('classnames'); var ComponentMixin = require('formsy-react-components').ComponentMixin; +var FormsyMixin = require('formsy-react').Mixin; +var React = require('react'); +var ReactPhoneInput = require('react-telephone-input/lib/withStyles'); +var Row = require('formsy-react-components').Row; + +var defaultValidationHOC = require('./validations.jsx').defaultValidationHOC; var inputHOC = require('./input-hoc.jsx'); +var intl = require('../../lib/intl.jsx'); +var validationHOCFactory = require('./validations.jsx').validationHOCFactory; var allIso2 = allCountries.map(function (country) {return country.iso2;}); @@ -23,7 +25,8 @@ var PhoneInput = React.createClass({ getDefaultProps: function () { return { validations: { - isPhone: true + isPhone: true, + phoneLength: true }, flagsImagePath: '/images/flags.png', defaultCountry: 'us' @@ -62,7 +65,8 @@ var PhoneInput = React.createClass({ }); var phoneValidationHOC = validationHOCFactory({ - isPhone: 'Please enter a valid phone number' + isPhone: , + phoneLength: }); module.exports = inputHOC(defaultValidationHOC(phoneValidationHOC(PhoneInput))); diff --git a/src/components/forms/validations.jsx b/src/components/forms/validations.jsx index 6410322b9..3d6dbbcc4 100644 --- a/src/components/forms/validations.jsx +++ b/src/components/forms/validations.jsx @@ -21,6 +21,14 @@ module.exports.validations = { return false; } return phoneNumberUtil.isValidNumber(parsed); + }, + phoneLength: function (values, value) { + if (typeof value === 'undefined') return true; + if (value && value.national_number === '+') return true; + if (value && value.national_number.length === value.country_code.format.length) { + return true; + } + return false; } }; diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index 5cb9ee1c1..f4f15fef3 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -82,38 +82,53 @@ module.exports = { onChangeShowPassword: function (field, value) { this.setState({showPassword: value}); }, - onValidSubmit: function (formData, reset, invalidate) { - this.setState({waiting: true}); + validateUsername: function (username) { api({ host: '', - uri: '/accounts/check_username/' + formData.user.username + '/' + uri: '/accounts/check_username/' + username + '/' }, function (err, res) { var formatMessage = this.props.intl.formatMessage; - this.setState({waiting: false}); - if (err) return invalidate({all: err}); + if (err) { + this.refs.form.refs.formsy.updateInputsWithError({all: err}); + return false; + } res = res[0]; switch (res.msg) { case 'valid username': this.setState({ validUsername: 'pass' }); - return this.props.onNextStep(formData); + return true; case 'username exists': - return invalidate({ + this.refs.form.refs.formsy.updateInputsWithError({ 'user.username': formatMessage({id: 'registration.validationUsernameExists'}) }); + return false; case 'bad username': - return invalidate({ + this.refs.form.refs.formsy.updateInputsWithError({ 'user.username': formatMessage({id: 'registration.validationUsernameVulgar'}) }); + return false; case 'invalid username': default: - return invalidate({ + this.refs.form.refs.formsy.updateInputsWithError({ 'user.username': formatMessage({id: 'registration.validationUsernameInvalid'}) }); + return false; } }.bind(this)); }, + onUsernameBlur: function (event) { + this.validateUsername(event.currentTarget.value); + }, + onValidSubmit: function (formData) { + this.setState({waiting: true}); + this.validateUsername(formData.user.username); + this.setState({waiting: false}); + if (this.state.validUsername === 'pass') { + this.props.onNextStep(formData); + } + }, render: function () { var formatMessage = this.props.intl.formatMessage; return ( @@ -139,7 +154,7 @@ module.exports = { )}

    -
    +
    {formatMessage({id: 'registration.createUsername'})} @@ -152,6 +167,7 @@ module.exports = {

    - +
    -
    @@ -532,7 +562,7 @@ module.exports = { placeholder={'http://'} />
    } /> + text={} /> From ed924e3b2cab81e6bc7152119d99251fe543d7e3 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 2 Aug 2016 15:30:01 -0400 Subject: [PATCH 25/92] add space back in --- src/components/page/www/page.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/page/www/page.jsx b/src/components/page/www/page.jsx index 6c0282a67..070f7e1dc 100644 --- a/src/components/page/www/page.jsx +++ b/src/components/page/www/page.jsx @@ -13,13 +13,13 @@ var Page = React.createClass({ return (
    {this.props.children}
    ); From c19c32ded3187328b4bf6fcc8d38b346fe078b70 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 2 Aug 2016 16:50:23 -0400 Subject: [PATCH 26/92] fix merge conflicts from upstream/develop --- src/components/navigation/www/navigation.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index 1b8a3b265..62167ff5f 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -11,6 +11,7 @@ var api = require('../../../lib/api'); var Avatar = require('../../avatar/avatar.jsx'); var Button = require('../../forms/button.jsx'); var Dropdown = require('../../dropdown/dropdown.jsx'); +var Form = require('../../forms/form.jsx'); var Input = require('../../forms/input.jsx'); var log = require('../../../lib/log.js'); var Login = require('../../login/login.jsx'); @@ -173,6 +174,9 @@ var Navigation = React.createClass({ this.props.dispatch(sessionActions.refreshSession()); this.closeRegistration(); }, + onSearchSubmit: function (formData) { + window.location.href = '/search/projects?q=' + formData.q; + }, render: function () { var classes = classNames({ 'logged-in': this.props.session.session.user @@ -219,14 +223,13 @@ var Navigation = React.createClass({ -
    +
    diff --git a/src/l10n.json b/src/l10n.json index 098cccf48..072cfa334 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -16,6 +16,7 @@ "general.discuss": "Discuss", "general.dmca": "DMCA", "general.emailAddress": "Email Address", + "general.error": "Oops! Something went wrong", "general.explore": "Explore", "general.faq": "FAQ", "general.female": "Female", From 4e568f7c06facc9f4868ca6ed516343910493859 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 3 Aug 2016 14:34:07 -0400 Subject: [PATCH 29/92] use minLength instead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it’s the same thing :). Thanks @rschamp! --- src/components/forms/validations.jsx | 3 --- src/components/registration/steps.jsx | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/forms/validations.jsx b/src/components/forms/validations.jsx index 4d973891b..3d6dbbcc4 100644 --- a/src/components/forms/validations.jsx +++ b/src/components/forms/validations.jsx @@ -12,9 +12,6 @@ module.exports.validations = { notEqualsField: function (values, value, field) { return value !== values[field]; }, - checkboxRequired: function (values, value) { - return value.length > 0; - }, isPhone: function (values, value) { if (typeof value === 'undefined') return true; if (value && value.national_number === '+') return true; diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index a31aae9ad..eda39a096 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -534,10 +534,10 @@ module.exports = { options={this.getOrganizationOptions()} onChange={this.onChooseOrganization} validations={{ - checkboxRequired: true + minLength: 1 }} validationErrors={{ - checkboxRequired: formatMessage({ + minLength: formatMessage({ id: 'teacherRegistration.validationRequired' }) }} From 86662e13d677aa11d070e07a26e242ccb5d25b0d Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 3 Aug 2016 15:20:58 -0400 Subject: [PATCH 30/92] Consolidate and remove `onValidSubmit` --- src/components/registration/steps.jsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index eda39a096..476c4d9d9 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -499,9 +499,6 @@ module.exports = { onChooseOrganization: function (name, values) { this.setState({otherDisabled: values.indexOf(this.organizationL10nStems.indexOf('orgChoiceOther')) === -1}); }, - onValidSubmit: function (formData) { - return this.props.onNextStep(formData); - }, render: function () { var formatMessage = this.props.intl.formatMessage; return ( @@ -515,7 +512,7 @@ module.exports = { tipContent={formatMessage({id: 'registration.nameStepTooltip'})} />

    -
    + Date: Wed, 3 Aug 2016 16:24:51 -0400 Subject: [PATCH 31/92] declare callback if undefined --- src/components/registration/steps.jsx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index 476c4d9d9..5d6d05a65 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -83,6 +83,7 @@ module.exports = { this.setState({showPassword: value}); }, validateUsername: function (username, callback) { + callback = callback || function () {}; api({ host: '', uri: '/accounts/check_username/' + username + '/' @@ -91,41 +92,32 @@ module.exports = { if (err || res.statusCode !== 200) { err = err || formatMessage({id: 'general.error'}); this.refs.form.refs.formsy.updateInputsWithError({all: err}); - if (typeof callback !== 'undefined') { - callback(false); - } - return; + return callback(false); } body = body[0]; - var isValid = false; switch (body.msg) { case 'valid username': this.setState({ validUsername: 'pass' }); - isValid = true; - break; + return callback(true); case 'username exists': this.refs.form.refs.formsy.updateInputsWithError({ 'user.username': formatMessage({id: 'registration.validationUsernameExists'}) }); - break; + return callback(false); case 'bad username': this.refs.form.refs.formsy.updateInputsWithError({ 'user.username': formatMessage({id: 'registration.validationUsernameVulgar'}) }); - break; + return callback(false); case 'invalid username': default: this.refs.form.refs.formsy.updateInputsWithError({ 'user.username': formatMessage({id: 'registration.validationUsernameInvalid'}) }); - break; - } - - if (typeof callback !== 'undefined') { - callback(isValid); + return callback(false); } }.bind(this)); }, From 1013f260b9200f01c7920b42dac4c976067cd8f7 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 4 Aug 2016 08:02:45 -0400 Subject: [PATCH 32/92] Use `guess-mime-type` to get the right file type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit should help with some header issues we’re seeing. Also remove `x-frame-options` meta tag, since it’s not acknolwedged by some browsers (like Chrome). --- Makefile | 4 ++-- src/template.html | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fa44ed42e..ced3f396a 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,8 @@ webpack: $(WEBPACK) --bail sync-s3: - $(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' ./build/ s3://$(S3_BUCKET_NAME)/ - $(S3CMD) sync -P --delete-removed --exclude '*' --include '*.svg' --mime-type 'image/svg+xml' ./build/ s3://$(S3_BUCKET_NAME)/ + $(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' --guess-mime-type ./build/ s3://$(S3_BUCKET_NAME)/ + $(S3CMD) sync -P --delete-removed --exclude '*' --include '*.svg' --mime-type 'image/svg+xml' ./build/ s3://$(S3_BUCKET_NAME)/ sync-fastly: $(NODE) ./bin/configure-fastly.js diff --git a/src/template.html b/src/template.html index b97326cc4..9f905045a 100644 --- a/src/template.html +++ b/src/template.html @@ -6,7 +6,6 @@ - Scratch - {{title}} From 538aed21ebfc525503fce0584bb837647923faa8 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 4 Aug 2016 08:04:45 -0400 Subject: [PATCH 33/92] remove extra space --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ced3f396a..10fd0db1a 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ webpack: sync-s3: $(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' --guess-mime-type ./build/ s3://$(S3_BUCKET_NAME)/ - $(S3CMD) sync -P --delete-removed --exclude '*' --include '*.svg' --mime-type 'image/svg+xml' ./build/ s3://$(S3_BUCKET_NAME)/ + $(S3CMD) sync -P --delete-removed --exclude '*' --include '*.svg' --mime-type 'image/svg+xml' ./build/ s3://$(S3_BUCKET_NAME)/ sync-fastly: $(NODE) ./bin/configure-fastly.js From 3a6ed90e7254fc8d5ab095fbec2fbdcab71b0057 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 4 Aug 2016 08:24:02 -0400 Subject: [PATCH 34/92] =?UTF-8?q?Don=E2=80=99t=20use=20mime=20magic=20to?= =?UTF-8?q?=20guess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hopefully just using file extensions works --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 10fd0db1a..42ca8207a 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ webpack: $(WEBPACK) --bail sync-s3: - $(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' --guess-mime-type ./build/ s3://$(S3_BUCKET_NAME)/ + $(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' --guess-mime-type --no-mime-magic ./build/ s3://$(S3_BUCKET_NAME)/ $(S3CMD) sync -P --delete-removed --exclude '*' --include '*.svg' --mime-type 'image/svg+xml' ./build/ s3://$(S3_BUCKET_NAME)/ sync-fastly: From dc209f466a2e031ea658f168ae2edff6c969b7d8 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 4 Aug 2016 08:35:30 -0400 Subject: [PATCH 35/92] Fall back to doing it the svg way --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 42ca8207a..a89afec30 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,9 @@ webpack: $(WEBPACK) --bail sync-s3: - $(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' --guess-mime-type --no-mime-magic ./build/ s3://$(S3_BUCKET_NAME)/ + $(S3CMD) sync -P --delete-removed --exclude '.DS_Store' --exclude '*.svg' --exclude '*.js' ./build/ s3://$(S3_BUCKET_NAME)/ $(S3CMD) sync -P --delete-removed --exclude '*' --include '*.svg' --mime-type 'image/svg+xml' ./build/ s3://$(S3_BUCKET_NAME)/ + $(S3CMD) sync -P --delete-removed --exclude '*' --include '*.js' --mime-type 'application/javascript' ./build/ s3://$(S3_BUCKET_NAME)/ sync-fastly: $(NODE) ./bin/configure-fastly.js From dd85de22e63ff1e27d7c2289102f76721d156496 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Fri, 5 Aug 2016 15:24:33 -0400 Subject: [PATCH 36/92] Enhance Checkbox Display --- src/components/forms/checkbox.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/forms/checkbox.scss b/src/components/forms/checkbox.scss index df8a17237..93237600c 100644 --- a/src/components/forms/checkbox.scss +++ b/src/components/forms/checkbox.scss @@ -12,7 +12,7 @@ display: block; float: left; margin-right: 1rem; - border: 1px solid $active-gray; + border: 1px solid rgba(0,0,0,.2); border-radius: 3px; width: 1.25rem; height: 1.25rem; From 3ff81296a763f10650bb3aece79e300aee7dbf90 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Fri, 5 Aug 2016 15:43:15 -0400 Subject: [PATCH 37/92] test --- src/components/forms/checkbox.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/forms/checkbox.scss b/src/components/forms/checkbox.scss index 93237600c..cf7a7e453 100644 --- a/src/components/forms/checkbox.scss +++ b/src/components/forms/checkbox.scss @@ -12,7 +12,8 @@ display: block; float: left; margin-right: 1rem; - border: 1px solid rgba(0,0,0,.2); + border: 1px solid; + border-color: rgba(0,0,0,.2); border-radius: 3px; width: 1.25rem; height: 1.25rem; From ef55f20ff39ea86efd236153009e3ea0ba9d5fe5 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Fri, 5 Aug 2016 15:50:51 -0400 Subject: [PATCH 38/92] now i finally understand scss variables --- src/components/forms/checkbox.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/forms/checkbox.scss b/src/components/forms/checkbox.scss index cf7a7e453..20d96087d 100644 --- a/src/components/forms/checkbox.scss +++ b/src/components/forms/checkbox.scss @@ -13,7 +13,7 @@ float: left; margin-right: 1rem; border: 1px solid; - border-color: rgba(0,0,0,.2); + border-color: $active-dark-gray; border-radius: 3px; width: 1.25rem; height: 1.25rem; @@ -23,7 +23,7 @@ &:focus { transition: all .5s ease; outline: none; - box-shadow: 0 0 0 .25rem $active-gray; + box-shadow: 0 0 0 .25rem $active-dark-gray; } &:checked { From a7ea6d7fd91c43a9f373fe3da9ff4cfedc82cb71 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Fri, 5 Aug 2016 15:51:48 -0400 Subject: [PATCH 39/92] whoops, don't need that anymore --- src/components/forms/checkbox.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/forms/checkbox.scss b/src/components/forms/checkbox.scss index 20d96087d..393ee86de 100644 --- a/src/components/forms/checkbox.scss +++ b/src/components/forms/checkbox.scss @@ -12,8 +12,7 @@ display: block; float: left; margin-right: 1rem; - border: 1px solid; - border-color: $active-dark-gray; + border: 1px solid $active-dark-gray; border-radius: 3px; width: 1.25rem; height: 1.25rem; From 967e5b6d3f5e8e93189d3212562875598d883310 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 8 Aug 2016 08:34:20 -0400 Subject: [PATCH 40/92] =?UTF-8?q?remove=20link=20to=20=E2=80=9CMy=20Classe?= =?UTF-8?q?s=E2=80=9D=20from=20faq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit so that it doesn’t 403 for people without educator accounts. Fixes #658 --- src/views/teachers/faq/l10n.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/teachers/faq/l10n.json b/src/views/teachers/faq/l10n.json index ec6358d5e..ad910f3e6 100644 --- a/src/views/teachers/faq/l10n.json +++ b/src/views/teachers/faq/l10n.json @@ -23,7 +23,7 @@ "teacherfaq.studentEndTitle": "What happens when I \"end\" my class?", "teacherfaq.studentEndBody": "When you end a class, your class profile page will be hidden and your students will no longer be able to log in (but their projects and the class studios will still be visible on the site). You may re-open the class at any time. ", "teacherfaq.studentForgetTitle": "What happens if a student forgets their password?", - "teacherfaq.studentForgetBody": "You can manually reset a student password from within your Scratch Teacher Account. First, navigate to My Classes. From there, find the correct Class and click on the Students link. You can then reset the password at the student level using the Settings menu. ", + "teacherfaq.studentForgetBody": "You can manually reset a student password from within your Scratch Teacher Account. First, navigate to My Classes (either from the purple banner on the homepage or in the dropdown menu next to your user icon). From there, find the correct Class and click on the Students link. You can then reset the password at the student level using the Settings menu. ", "teacherfaq.studentUnsharedTitle": "Can I see unshared student projects?", "teacherfaq.studentUnsharedBody": "Teacher accounts can only access shared student projects.", "teacherfaq.studentDeleteTitle": "Can I delete student accounts?", From b1f7d9666ec43ca11f376f6725c27f278549d817 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 8 Aug 2016 16:28:48 -0400 Subject: [PATCH 41/92] Update faq language Fixes #546 --- src/views/faq/l10n.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/faq/l10n.json b/src/views/faq/l10n.json index ab60cb8a3..bdb848a5b 100644 --- a/src/views/faq/l10n.json +++ b/src/views/faq/l10n.json @@ -13,9 +13,9 @@ "faq.makeGameTitle":"How do I make a game or animation with Scratch?", "faq.makeGameBody":"Check out the help page to see lots of ways to get started with Scratch. Or just dive in to the project editor.", "faq.requirementsTitle":"What are the system requirements for Scratch?", - "faq.requirementsBody":"To run Scratch 2, you need a relatively recent web browser (Chrome 35 or later, Firefox 31 or later, or Internet Explorer 9 or later) with Adobe Flash Player version 10.2 or later installed. Scratch 2 is designed to support screen sizes 1024 x 768 or larger. If your computer doesn’t meet these requirements, you can try downloading and installing Scratch 1.4, which you can still use to share projects to the Scratch 2 website.", + "faq.requirementsBody":"To run Scratch 2, you need to be using (1) a Mac, Linux or Windows computer; (2) a version of Adobe Flash Player released on or after June 15, 2016; (3) a relatively recent web browser: one of the latest two versions of Chrome, Firefox, Safari (Mac or Windows only), Edge (Windows only), or Internet Explorer 10+ (Windows only). If your computer doesn’t meet these requirements, you can try downloading and installing Scratch 1.4, which you can still use to share projects to the Scratch 2 website.", "faq.offlineTitle":"Do you have a downloadable version so I can create and view projects offline?", - "faq.offlineBody":"The Scratch 2 offline editor (beta version) is now available. You can also still use Scratch 1.4. Note: You can have both Scratch 1.4 and 2 on your computer.", + "faq.offlineBody":"The Scratch 2 offline editor allows you to create Scratch projects without an internet connection. You can download Scratch 2 from the website. You can also still use Scratch 1.4. Note: You can have both Scratch 1.4 and 2 on your computer.", "faq.uploadOldTitle":"Can I still upload projects created with older versions of Scratch to the website?", "faq.uploadOldBody":"Yes - you can share or upload projects made with earlier versions of Scratch, and they will be visible and playable. (However, you can’t download projects made with or edited in later versions of Scratch and open them in earlier versions. For example, you can’t open a Scratch 2 project in Scratch 1.4, because Scratch 1.4 doesn’t know how to read the .sb2 project file format.)", "faq.recordVideoTitle":"Can I record a video of my Scratch project?", From 722b7ec20c9eb715a6da72ab5d0535447d597d6f Mon Sep 17 00:00:00 2001 From: The_Grits Date: Mon, 8 Aug 2016 19:37:58 -0400 Subject: [PATCH 42/92] Add email address link Fixes #822 --- src/views/terms/terms.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/terms/terms.jsx b/src/views/terms/terms.jsx index fc52bd229..fc4937b69 100644 --- a/src/views/terms/terms.jsx +++ b/src/views/terms/terms.jsx @@ -85,7 +85,7 @@ var Terms = React.createClass({ (for example, in the event of a loss, theft, or unauthorized disclosure of your password), promptly change your password. If you cannot access your account to change your password, notify us at{' '} - . + help@scratch.mit.edu.

    From c009497b6b2ce6bf890b8a31126a580d7994f8b1 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 9 Aug 2016 09:55:20 -0400 Subject: [PATCH 43/92] use scss in navbar instead of react-responsive --- src/components/navigation/www/navigation.jsx | 32 ++++++++----------- src/components/navigation/www/navigation.scss | 25 +++++++++++++++ 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index 62167ff5f..d2ffc819b 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -19,9 +19,6 @@ var Modal = require('../../modal/modal.jsx'); var NavigationBox = require('../container/navigation.jsx'); var Registration = require('../../registration/registration.jsx'); -var MediaQuery = require('react-responsive'); -var frameless = require('../../../lib/frameless'); - require('./navigation.scss'); Modal.setAppElement(document.getElementById('view')); @@ -196,33 +193,33 @@ var Navigation = React.createClass({
    • - +
    • - - +
    • +
    • - - +
    • +
    • - +
    • - +
    • - +
    • - +
    • {this.props.session.status === sessionActions.Status.FETCHED ? ( this.props.session.session.user ? [
    • @@ -242,22 +239,21 @@ var Navigation = React.createClass({
    • , - +
    • - , +
    • ,
    • - + {this.props.session.session.user.username} - + Date: Tue, 9 Aug 2016 10:16:08 -0400 Subject: [PATCH 44/92] Embed Video --- src/views/teachers/faq/faq.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/teachers/faq/faq.jsx b/src/views/teachers/faq/faq.jsx index 8c0a34327..069e2574d 100644 --- a/src/views/teachers/faq/faq.jsx +++ b/src/views/teachers/faq/faq.jsx @@ -20,6 +20,8 @@ var TeacherFaq = injectIntl(React.createClass({
      +
      From 8b1862926497c329d0ebb6858b72653eddf72b57 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Tue, 9 Aug 2016 10:22:48 -0400 Subject: [PATCH 45/92] amend text --- src/views/teachers/faq/l10n.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/teachers/faq/l10n.json b/src/views/teachers/faq/l10n.json index ad910f3e6..59059f67a 100644 --- a/src/views/teachers/faq/l10n.json +++ b/src/views/teachers/faq/l10n.json @@ -1,7 +1,7 @@ { "teacherfaq.title": "Scratch Teacher Account FAQ", "teacherfaq.teacherWhatTitle": "What are teacher accounts?", - "teacherfaq.teacherWhatBody": "A Scratch Teacher Account provides teachers and other educators with additional features to manage student participation on Scratch, including the ability to create student accounts, organize student projects into studios, and monitor student comments. Learn more about Teacher Accounts in this video.", + "teacherfaq.teacherWhatBody": "A Scratch Teacher Account provides teachers and other educators with additional features to manage student participation on Scratch, including the ability to create student accounts, organize student projects into studios, and monitor student comments. Learn more about Teacher Accounts in the video below:", "teacherfaq.teacherQuestionsTitle": "What if I have any questions or comments on Teacher Accounts?", "teacherfaq.teacherQuestionsBody": "If you have any questions or feedback on Teacher Accounts please send us a message through Contact Us.", "teacherfaq.teacherConvertTitle": "Can I convert my Scratch account into a Teacher Account?", From 30945bc0785fb5a86f30ac2f9f7b079b101231a9 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 10 Aug 2016 07:53:49 -0400 Subject: [PATCH 46/92] Remove `phoneLength` validation --- src/components/forms/phone-input.jsx | 6 ++---- src/components/forms/validations.jsx | 8 -------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/components/forms/phone-input.jsx b/src/components/forms/phone-input.jsx index 03a01470d..260c5a2ef 100644 --- a/src/components/forms/phone-input.jsx +++ b/src/components/forms/phone-input.jsx @@ -25,8 +25,7 @@ var PhoneInput = React.createClass({ getDefaultProps: function () { return { validations: { - isPhone: true, - phoneLength: true + isPhone: true }, flagsImagePath: '/images/flags.png', defaultCountry: 'us' @@ -65,8 +64,7 @@ var PhoneInput = React.createClass({ }); var phoneValidationHOC = validationHOCFactory({ - isPhone: , - phoneLength: + isPhone: }); module.exports = inputHOC(defaultValidationHOC(phoneValidationHOC(PhoneInput))); diff --git a/src/components/forms/validations.jsx b/src/components/forms/validations.jsx index 3d6dbbcc4..6410322b9 100644 --- a/src/components/forms/validations.jsx +++ b/src/components/forms/validations.jsx @@ -21,14 +21,6 @@ module.exports.validations = { return false; } return phoneNumberUtil.isValidNumber(parsed); - }, - phoneLength: function (values, value) { - if (typeof value === 'undefined') return true; - if (value && value.national_number === '+') return true; - if (value && value.national_number.length === value.country_code.format.length) { - return true; - } - return false; } }; From 6e3a18a5741e236eee0b51ea10566fe69e1402d1 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 10 Aug 2016 09:45:21 -0400 Subject: [PATCH 47/92] only look for empty phone on submit thanks @rschamp! --- src/components/registration/steps.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index 5d6d05a65..4ec552334 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -416,7 +416,7 @@ module.exports = { }; }, onValidSubmit: function (formData, reset, invalidate) { - if (formData.phone.national_number.length !== formData.phone.country_code.format.length) { + if (!formData.phone || formData.phone.national_number === '+') { return invalidate({ 'phone': this.props.intl.formatMessage({id: 'teacherRegistration.validationPhoneNumber'}) }); From ecd1963bbe8627b8ebcc9d26c7ca5e39eb45d692 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Wed, 10 Aug 2016 12:14:08 -0400 Subject: [PATCH 48/92] Update faq.jsx --- src/views/teachers/faq/faq.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/teachers/faq/faq.jsx b/src/views/teachers/faq/faq.jsx index 069e2574d..804b45a45 100644 --- a/src/views/teachers/faq/faq.jsx +++ b/src/views/teachers/faq/faq.jsx @@ -21,7 +21,7 @@ var TeacherFaq = injectIntl(React.createClass({
      + frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen>
      From 4d9fe86f408f11946a95234f62e8400793b43854 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 10 Aug 2016 15:33:17 -0400 Subject: [PATCH 49/92] check street number range for address rather than exact address, so that we can more flexibly allow outdate post office data --- src/lib/api.js | 15 ++++++++------- src/lib/smarty-streets.js | 6 +++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/lib/api.js b/src/lib/api.js index 2efd806b7..e7d9fc012 100644 --- a/src/lib/api.js +++ b/src/lib/api.js @@ -1,4 +1,5 @@ var defaults = require('lodash.defaults'); +var defaultsDeep = require('lodash.defaultsdeep'); var xhr = require('xhr'); var jar = require('./jar'); @@ -15,17 +16,15 @@ var urlParams = require('./url-params'); */ module.exports = function (opts, callback) { - defaults(opts, { + defaultsDeep(opts, { host: process.env.API_HOST, - headers: {}, + headers: { + 'X-Requested-With': 'XMLHttpRequest' + }, responseType: 'json', useCsrf: false }); - defaults(opts.headers, { - 'X-Requested-With': 'XMLHttpRequest' - }); - opts.uri = opts.host + opts.uri; if (opts.params) { @@ -43,7 +42,9 @@ module.exports = function (opts, callback) { // For IE < 10, we must use XDR for cross-domain requests. XDR does not support // custom headers. defaults(opts, {useXDR: true}); - delete opts.headers; + if (opts.useXDR) { + delete opts.headers; + } if (opts.authentication) { var authenticationParams = ['x-token=' + opts.authentication]; var parts = opts.uri.split('?'); diff --git a/src/lib/smarty-streets.js b/src/lib/smarty-streets.js index 42400626a..87b245e23 100644 --- a/src/lib/smarty-streets.js +++ b/src/lib/smarty-streets.js @@ -8,7 +8,11 @@ module.exports = function smartyStreetApi (params, callback) { api({ host: 'https://api.smartystreets.com', uri: '/street-address', - params: params + headers: { + 'X-Standardize-Only': true + }, + params: params, + useXDR: false }, function (err, body, res) { if (err) return callback(err); if (res.statusCode !== 200) { From ea91b3d885d2509fa0e199fe6f348e004d97b7d4 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Thu, 11 Aug 2016 15:55:58 -0400 Subject: [PATCH 50/92] Remove declaration of `defaultsDeep` Got lost in the merge, apologies. --- src/lib/api.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/api.js b/src/lib/api.js index 84359c8ba..0446c43e8 100644 --- a/src/lib/api.js +++ b/src/lib/api.js @@ -1,5 +1,4 @@ var defaults = require('lodash.defaults'); -var defaultsDeep = require('lodash.defaultsdeep'); var xhr = require('xhr'); var jar = require('./jar'); From 537104c56b1c3df1235738996dbbed7f0970a84a Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 12 Aug 2016 08:10:20 -0400 Subject: [PATCH 51/92] Add username validation to student complete registration Fixes #760 --- src/components/forms/validations.jsx | 1 + src/components/registration/steps.jsx | 11 ++++++++--- .../studentcompleteregistration.jsx | 6 +++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/forms/validations.jsx b/src/components/forms/validations.jsx index 6410322b9..bd5099e05 100644 --- a/src/components/forms/validations.jsx +++ b/src/components/forms/validations.jsx @@ -23,6 +23,7 @@ module.exports.validations = { return phoneNumberUtil.isValidNumber(parsed); } }; +module.exports.validations.notEqualsUsername = module.exports.validations.notEquals; module.exports.validationHOCFactory = function (defaultValidationErrors) { return function (Component) { diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index 4ec552334..dbf643afc 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -226,6 +226,7 @@ module.exports = { ChoosePasswordStep: intl.injectIntl(React.createClass({ getDefaultProps: function () { return { + studentUsername: null, showPassword: false, waiting: false }; @@ -257,7 +258,7 @@ module.exports = { validations={{ minLength: 6, notEquals: 'password', - notEqualsField: 'user.username' + notEqualsUsername: this.props.studentUsername }} validationErrors={{ minLength: formatMessage({ @@ -266,7 +267,7 @@ module.exports = { notEquals: formatMessage({ id: 'registration.validationPasswordNotEquals' }), - notEqualsField: formatMessage({ + notEqualsUsername: formatMessage({ id: 'registration.validationPasswordNotUsername' }) }} @@ -879,7 +880,11 @@ module.exports = { }; }, onNextStep: function () { - this.props.onNextStep(); + this.props.onNextStep({ + user: { + username: this.props.studentUsername + } + }); }, render: function () { var formatMessage = this.props.intl.formatMessage; diff --git a/src/views/studentcompleteregistration/studentcompleteregistration.jsx b/src/views/studentcompleteregistration/studentcompleteregistration.jsx index 50df16443..6b682c7ff 100644 --- a/src/views/studentcompleteregistration/studentcompleteregistration.jsx +++ b/src/views/studentcompleteregistration/studentcompleteregistration.jsx @@ -132,7 +132,11 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({ {this.props.must_reset_password ? + waiting={this.state.waiting} + studentUsername={ + this.state.formData.user && + this.state.formData.user.username + } /> : [] } From cbf76ec63653b525ffd7f68154a9922b0cbb474d Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 12 Aug 2016 08:10:32 -0400 Subject: [PATCH 52/92] Clean up a few lint warnings --- src/components/footer/conference/footer.scss | 2 +- src/components/login/login.scss | 4 ++-- src/main.scss | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/footer/conference/footer.scss b/src/components/footer/conference/footer.scss index 4d40c51cc..24d20e0ad 100644 --- a/src/components/footer/conference/footer.scss +++ b/src/components/footer/conference/footer.scss @@ -35,7 +35,7 @@ .intel { img { - max-height: 50px + max-height: 50px; } } } diff --git a/src/components/login/login.scss b/src/components/login/login.scss index a8cf55da0..a00cceae2 100644 --- a/src/components/login/login.scss +++ b/src/components/login/login.scss @@ -7,11 +7,11 @@ padding-top: 5px; font-weight: bold; } - + .right { float: right; } - + .spinner { margin: 0 .8rem; width: 1rem; diff --git a/src/main.scss b/src/main.scss index 54dc7b16d..6ef3c37ae 100644 --- a/src/main.scss +++ b/src/main.scss @@ -164,7 +164,7 @@ dl { dt { font-weight: 700; } - + dd { margin: 0; } From f8de61f0673f69b46304a801755a9e304fe33cb3 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 12 Aug 2016 10:11:14 -0400 Subject: [PATCH 53/92] Update from feedback use props for username rather than constructed form data, and `studentUsername -> username`. Thanks @rschamp! --- src/components/registration/steps.jsx | 10 +++------- .../studentcompleteregistration.jsx | 5 +---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index dbf643afc..2b97a4dca 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -226,7 +226,7 @@ module.exports = { ChoosePasswordStep: intl.injectIntl(React.createClass({ getDefaultProps: function () { return { - studentUsername: null, + username: null, showPassword: false, waiting: false }; @@ -258,7 +258,7 @@ module.exports = { validations={{ minLength: 6, notEquals: 'password', - notEqualsUsername: this.props.studentUsername + notEqualsUsername: this.props.username }} validationErrors={{ minLength: formatMessage({ @@ -880,11 +880,7 @@ module.exports = { }; }, onNextStep: function () { - this.props.onNextStep({ - user: { - username: this.props.studentUsername - } - }); + this.props.onNextStep(); }, render: function () { var formatMessage = this.props.intl.formatMessage; diff --git a/src/views/studentcompleteregistration/studentcompleteregistration.jsx b/src/views/studentcompleteregistration/studentcompleteregistration.jsx index 6b682c7ff..e8d429d54 100644 --- a/src/views/studentcompleteregistration/studentcompleteregistration.jsx +++ b/src/views/studentcompleteregistration/studentcompleteregistration.jsx @@ -133,10 +133,7 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({ + username={this.props.studentUsername} /> : [] } From a46f6da1502235ad9e01159269842e732cc926bc Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 15 Aug 2016 11:19:22 -0400 Subject: [PATCH 54/92] Add fur, sq and te to language list --- languages.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/languages.json b/languages.json index bcabe056f..9d4968857 100644 --- a/languages.json +++ b/languages.json @@ -42,6 +42,7 @@ "sc": "Sardu", "sk": "Slovenčina", "sl": "Slovenščina", + "sq": "shqiptar", "fi": "suomi", "sv": "Svenska", "nai": "Tepehuan", @@ -52,6 +53,7 @@ "bg": "Български", "el": "Ελληνικά", "fa": "فارسی", + "fur": "furlan", "he": "עִבְרִית", "hi": "हिन्दी", "hy": "Հայերեն", @@ -67,6 +69,7 @@ "my": "မြန်မာဘာသာ", "ru": "Русский", "sr": "Српски", + "te": "తెలుగు", "th": "ไทย", "uk": "Українська", "zh-cn": "简体中文", From 0f93d32666640752b31588fe8e6465b108f9578f Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 15 Aug 2016 11:41:57 -0400 Subject: [PATCH 55/92] Move up Friulian --- languages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.json b/languages.json index 9d4968857..3967e889e 100644 --- a/languages.json +++ b/languages.json @@ -16,6 +16,7 @@ "es": "Español", "eu": "Euskara", "fr": "Français", + "fur": "furlan", "ga": "Gaeilge", "gd": "Gàidhlig", "gl": "Galego", @@ -53,7 +54,6 @@ "bg": "Български", "el": "Ελληνικά", "fa": "فارسی", - "fur": "furlan", "he": "עִבְרִית", "hi": "हिन्दी", "hy": "Հայերեն", From f3de2d1d28019482af59102bffa26052f0ffa170 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 15 Aug 2016 14:53:31 -0400 Subject: [PATCH 56/92] re-order languages and also get language for dropdown from `IntlProvider` rather than the window, so that we have one point of truth --- languages.json | 48 +++++++++---------- src/components/footer/www/footer.jsx | 8 ++-- .../languagechooser/languagechooser.jsx | 2 +- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/languages.json b/languages.json index 3967e889e..411834551 100644 --- a/languages.json +++ b/languages.json @@ -1,9 +1,11 @@ { - "en": "English", + "ab": "Аҧсшәа", + "ar": "العربية", "an": "Aragonés", "ast": "Asturianu", "id": "Bahasa Indonesia", "ms": "Bahasa Melayu", + "bg": "Български", "ca": "Català", "cs": "Česky", "cy": "Cymraeg", @@ -12,65 +14,63 @@ "de": "Deutsch", "yum": "Edible Scratch", "et": "Eesti", + "el": "Ελληνικά", + "en": "English", "eo": "Esperanto", "es": "Español", "eu": "Euskara", + "fa": "فارسی", "fr": "Français", "fur": "furlan", "ga": "Gaeilge", "gd": "Gàidhlig", "gl": "Galego", + "ko": "한국어", + "hy": "Հայերեն", + "he": "עִבְרִית", + "hi": "हिन्दी", "hr": "Hrvatski", "is": "Íslenska", "it": "Italiano", + "kn": "ಭಾಷೆ-ಹೆಸರು", "rw": "Kinyarwanda", + "km": "សំលៀកបំពាក", "ht": "Kreyòl", "ku": "Kurdî", "la": "Latina", "lv": "Latviešu", "lt": "Lietuvių", + "mk": "Македонски", "hu": "Magyar", + "ml": "മലയാളം", "mt": "Malti", + "mr": "मराठी", "cat": "Meow", + "mn": "Монгол хэл", + "my": "မြန်မာဘာသာ", "nl": "Nederlands", + "ja": "日本語", + "ja-hr": "にほんご", "nb": "Norsk Bokmål", "nn": "Norsk Nynorsk", "uz": "Oʻzbekcha", + "th": "ไทย", "pl": "Polski", "pt": "Português", "pt-br": "Português Brasileiro", "ro": "Română", + "ru": "Русский", "sc": "Sardu", + "sq": "shqiptar", "sk": "Slovenčina", "sl": "Slovenščina", - "sq": "shqiptar", + "sr": "Српски", "fi": "suomi", "sv": "Svenska", + "te": "తెలుగు", "nai": "Tepehuan", "vi": "Tiếng Việt", "tr": "Türkçe", - "ab": "Аҧсшәа", - "ar": "العربية", - "bg": "Български", - "el": "Ελληνικά", - "fa": "فارسی", - "he": "עִבְרִית", - "hi": "हिन्दी", - "hy": "Հայերեն", - "ja": "日本語", - "ja-hr": "にほんご", - "km": "សំលៀកបំពាក", - "kn": "ಭಾಷೆ-ಹೆಸರು", - "ko": "한국어", - "mk": "Македонски", - "ml": "മലയാളം", - "mn": "Монгол хэл", - "mr": "मराठी", - "my": "မြန်မာဘာသာ", - "ru": "Русский", - "sr": "Српски", - "te": "తెలుగు", - "th": "ไทย", "uk": "Українська", "zh-cn": "简体中文", "zh-tw": "正體中文" diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx index a34a0f06e..e243a5a35 100644 --- a/src/components/footer/www/footer.jsx +++ b/src/components/footer/www/footer.jsx @@ -1,5 +1,7 @@ var React = require('react'); -var FormattedMessage = require('react-intl').FormattedMessage; +var ReactIntl = require('react-intl'); +var FormattedMessage = ReactIntl.FormattedMessage; +var injectIntl = ReactIntl.injectIntl; var FooterBox = require('../container/footer.jsx'); var LanguageChooser = require('../../languagechooser/languagechooser.jsx'); @@ -204,7 +206,7 @@ var Footer = React.createClass({
    - +

    @@ -216,4 +218,4 @@ var Footer = React.createClass({ } }); -module.exports = Footer; +module.exports = injectIntl(Footer); diff --git a/src/components/languagechooser/languagechooser.jsx b/src/components/languagechooser/languagechooser.jsx index bb6dc5910..c538fb923 100644 --- a/src/components/languagechooser/languagechooser.jsx +++ b/src/components/languagechooser/languagechooser.jsx @@ -16,7 +16,7 @@ var LanguageChooser = React.createClass({ getDefaultProps: function () { return { languages: languages, - locale: window._locale + locale: 'en' }; }, onSetLanguage: function (name, value) { From 41a0ef73ba9a6bc9901bfb3a2134845c965b8883 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Tue, 16 Aug 2016 08:55:32 -0400 Subject: [PATCH 57/92] Add missing strings for translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Explore page header 2. “by” in the project thumbnail --- src/components/thumbnail/thumbnail.jsx | 8 ++++++-- src/l10n.json | 4 +++- src/views/explore/explore.jsx | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/thumbnail/thumbnail.jsx b/src/components/thumbnail/thumbnail.jsx index b2bb234c5..f85dc18c4 100644 --- a/src/components/thumbnail/thumbnail.jsx +++ b/src/components/thumbnail/thumbnail.jsx @@ -1,5 +1,6 @@ -var React = require('react'); var classNames = require('classnames'); +var FormattedMessage = require('react-intl').FormattedMessage; +var React = require('react'); require('./thumbnail.scss'); @@ -32,7 +33,10 @@ var Thumbnail = React.createClass({ if (this.props.creator) { extra.push(

    ); } diff --git a/src/l10n.json b/src/l10n.json index 42bd8edb7..5d3ba20e2 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -154,5 +154,7 @@ "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 24 hours. 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.welcomeStepPrompt": "To get started, click on the button below.", - "registration.welcomeStepTitle": "Hurray! Welcome to Scratch!" + "registration.welcomeStepTitle": "Hurray! Welcome to Scratch!", + + "thumbnail.by": "by" } diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 761d6292e..2149be580 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -111,10 +111,12 @@ var Explore = injectIntl(React.createClass({ ); }, render: function () { + var formatMessage = this.props.intl.formatMessage; + return (
    - + {this.getBubble('all')} {this.getBubble('animations')} From 43add1ad35e757e563ace868c78f4210fffd087e Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Tue, 16 Aug 2016 08:56:01 -0400 Subject: [PATCH 58/92] Clean up some intl formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove `defaultMessage` from inline, which we don’t use right now --- src/views/splash/splash.jsx | 62 +++++++++++-------------------------- 1 file changed, 18 insertions(+), 44 deletions(-) diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index 85a2b2b52..e6f3ce869 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -189,16 +189,12 @@ var Splash = injectIntl(React.createClass({ var rows = [ , @@ -216,8 +212,8 @@ var Splash = injectIntl(React.createClass({ this.state.featuredGlobal.curator_top_projects[0].curator_name} moreTitle={formatMessage({id: 'general.learnMore', defaultMessage: 'Learn More'})} moreHref="/studios/386359/"> - + + ); } @@ -229,14 +225,12 @@ var Splash = injectIntl(React.createClass({ - + + ); } @@ -246,14 +240,9 @@ var Splash = injectIntl(React.createClass({ this.state.featuredGlobal.community_newest_projects.length > 0) { rows.push( - - + + ); } @@ -262,12 +251,9 @@ var Splash = injectIntl(React.createClass({ this.state.featuredCustom.custom_projects_by_following.length > 0) { rows.push( - - + ); @@ -276,12 +262,9 @@ var Splash = injectIntl(React.createClass({ this.state.featuredCustom.custom_projects_loved_by_following.length > 0) { rows.push( - - + ); @@ -291,31 +274,22 @@ var Splash = injectIntl(React.createClass({ this.state.featuredCustom.custom_projects_in_studios_following.length > 0) { rows.push( - - + ); } rows.push( - , - Date: Tue, 16 Aug 2016 11:11:46 -0400 Subject: [PATCH 59/92] Add image links --- src/views/teachers/landing/landing.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/views/teachers/landing/landing.jsx b/src/views/teachers/landing/landing.jsx index ce32a564c..0a27d3987 100644 --- a/src/views/teachers/landing/landing.jsx +++ b/src/views/teachers/landing/landing.jsx @@ -82,19 +82,25 @@ var Landing = injectIntl(React.createClass({

    - resources icon + + resources icon +

    - tips window icon + + tips window icon +

    - creative computing icon + + creative computing icon +

    From 4a0442695ace2bb8bc859960a7bc28902a875dc9 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Tue, 16 Aug 2016 11:33:07 -0400 Subject: [PATCH 60/92] =?UTF-8?q?generalize=20=E2=80=9CEducator=20Resource?= =?UTF-8?q?s=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was getting overwritten since it was defined in multiple places. fixes #840. --- src/l10n.json | 1 + src/views/splash/l10n.json | 1 - src/views/splash/splash.jsx | 2 +- src/views/teachers/landing/l10n.json | 1 - src/views/teachers/landing/landing.jsx | 2 +- 5 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/l10n.json b/src/l10n.json index 5d3ba20e2..6b9041260 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -57,6 +57,7 @@ "general.privacyPolicy": "Privacy Policy", "general.projects": "Projects", "general.profile": "Profile", + "general.resourcesTitle": "Educator Resources", "general.scratchConference": "Scratch Conference", "general.scratchday": "Scratch Day", "general.scratchEd": "ScratchEd", diff --git a/src/views/splash/l10n.json b/src/views/splash/l10n.json index 297f35426..f63a65bb8 100644 --- a/src/views/splash/l10n.json +++ b/src/views/splash/l10n.json @@ -26,7 +26,6 @@ "teacherbanner.greeting": "Hi", "teacherbanner.subgreeting": "Teacher Account", "teacherbanner.classesButton": "My Classes", - "teacherbanner.resourcesButton": "Educator Resources", "teacherbanner.faqButton": "Teacher Account FAQ", "welcome.welcomeToScratch": "Welcome to Scratch!", diff --git a/src/views/splash/splash.jsx b/src/views/splash/splash.jsx index e6f3ce869..919994d12 100644 --- a/src/views/splash/splash.jsx +++ b/src/views/splash/splash.jsx @@ -324,7 +324,7 @@ var Splash = injectIntl(React.createClass({ 'teacherbanner.greeting': formatMessage({id: 'teacherbanner.greeting'}), 'teacherbanner.subgreeting': formatMessage({id: 'teacherbanner.subgreeting'}), 'teacherbanner.classesButton': formatMessage({id: 'teacherbanner.classesButton'}), - 'teacherbanner.resourcesButton': formatMessage({id: 'teacherbanner.resourcesButton'}), + 'teacherbanner.resourcesButton': formatMessage({id: 'general.resourcesTitle'}), 'teacherbanner.faqButton': formatMessage({id: 'teacherbanner.faqButton'}) }; if (this.state.projectCount === this.getInitialState().projectCount) { diff --git a/src/views/teachers/landing/l10n.json b/src/views/teachers/landing/l10n.json index 8bd9dd442..1697f6756 100644 --- a/src/views/teachers/landing/l10n.json +++ b/src/views/teachers/landing/l10n.json @@ -8,7 +8,6 @@ "teacherlanding.generalUsageSettings": "Settings: schools, museums, libraries, community centers", "teacherlanding.generalUsageGradeLevels": "Grade Levels: elementary, middle, and high school (and some colleges too!)", "teacherlanding.generalUsageSubjectAreas": "Subject Areas: language arts, science, social studies, math, computer science, foreign languages, and the arts", - "teacherlanding.resourcesTitle": "Educator Resources", "teacherlanding.scratchEdTitle": "A Community for Educators", "teacherlanding.scratchEdDescription": "ScratchEd is an online community where Scratch educators share stories, exchange resources, ask questions, and find people. ScratchEd is developed and supported by the Harvard Graduate School of Education.", "teacherlanding.meetupTitle": "In-Person Gatherings", diff --git a/src/views/teachers/landing/landing.jsx b/src/views/teachers/landing/landing.jsx index ce32a564c..f800cfedf 100644 --- a/src/views/teachers/landing/landing.jsx +++ b/src/views/teachers/landing/landing.jsx @@ -64,7 +64,7 @@ var Landing = injectIntl(React.createClass({
    -

    +

    From f18be588a025cc6bb2f7229ae760fb12de05437c Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Tue, 16 Aug 2016 11:48:11 -0400 Subject: [PATCH 61/92] Allow an optional / in teacher registration URL Resolves #3895 --- src/routes.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes.json b/src/routes.json index a1b789f34..0520c20cd 100644 --- a/src/routes.json +++ b/src/routes.json @@ -105,7 +105,7 @@ }, { "name": "teacherregistration", - "pattern": "^/educators/register$", + "pattern": "^/educators/register/?$", "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", "view": "teacherregistration/teacherregistration", "title": "Teacher Registration", From 5d5e1d9fdf4b0cf0a9eec53a4a876209b5c7fc13 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Tue, 16 Aug 2016 21:21:29 -0400 Subject: [PATCH 62/92] update to relative --- src/views/teachers/landing/landing.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/teachers/landing/landing.jsx b/src/views/teachers/landing/landing.jsx index 0a27d3987..9c6bf7903 100644 --- a/src/views/teachers/landing/landing.jsx +++ b/src/views/teachers/landing/landing.jsx @@ -82,7 +82,7 @@ var Landing = injectIntl(React.createClass({

    - + resources icon

    @@ -90,7 +90,7 @@ var Landing = injectIntl(React.createClass({

    - + tips window icon

    @@ -98,7 +98,7 @@ var Landing = injectIntl(React.createClass({

    - + creative computing icon

    From 880413a61d7c63d9b1e88f2518cf88c589edc5a3 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Tue, 16 Aug 2016 21:30:52 -0400 Subject: [PATCH 63/92] fix (hopefully) --- src/views/teachers/landing/landing.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/teachers/landing/landing.jsx b/src/views/teachers/landing/landing.jsx index 9c6bf7903..44bd9f39a 100644 --- a/src/views/teachers/landing/landing.jsx +++ b/src/views/teachers/landing/landing.jsx @@ -82,7 +82,7 @@ var Landing = injectIntl(React.createClass({

    - + resources icon

    @@ -90,7 +90,7 @@ var Landing = injectIntl(React.createClass({

    - + tips window icon

    @@ -98,7 +98,7 @@ var Landing = injectIntl(React.createClass({

    - + creative computing icon

    From 4ca603b050a817c3aaadca2f5a31007ac951f8da Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Wed, 17 Aug 2016 10:11:00 -0400 Subject: [PATCH 64/92] One more update for '/' --- src/views/teachers/landing/landing.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/teachers/landing/landing.jsx b/src/views/teachers/landing/landing.jsx index 44bd9f39a..af15c5fce 100644 --- a/src/views/teachers/landing/landing.jsx +++ b/src/views/teachers/landing/landing.jsx @@ -82,7 +82,7 @@ var Landing = injectIntl(React.createClass({

    - + resources icon

    @@ -90,7 +90,7 @@ var Landing = injectIntl(React.createClass({

    - + tips window icon

    From 34a0cfc4e7604699b17b486ac02cb26d225ce4ef Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 17 Aug 2016 12:55:58 -0400 Subject: [PATCH 65/92] Add link to teacher accounts registration in faq also re-order questions based on feedback --- src/views/teachers/faq/faq.jsx | 14 ++++++++------ src/views/teachers/faq/l10n.json | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/views/teachers/faq/faq.jsx b/src/views/teachers/faq/faq.jsx index d0f9e169f..a685166df 100644 --- a/src/views/teachers/faq/faq.jsx +++ b/src/views/teachers/faq/faq.jsx @@ -22,18 +22,20 @@ var TeacherFaq = injectIntl(React.createClass({

    -
    -
    -
    -
    -
    -
    +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/src/views/teachers/faq/l10n.json b/src/views/teachers/faq/l10n.json index 223c80706..bade92855 100644 --- a/src/views/teachers/faq/l10n.json +++ b/src/views/teachers/faq/l10n.json @@ -2,18 +2,20 @@ "teacherfaq.title": "Scratch Teacher Account FAQ", "teacherfaq.teacherWhatTitle": "What are teacher accounts?", "teacherfaq.teacherWhatBody": "A Scratch Teacher Account provides teachers and other educators with additional features to manage student participation on Scratch, including the ability to create student accounts, organize student projects into studios, and monitor student comments. Learn more about Teacher Accounts in the video below:", - "teacherfaq.teacherQuestionsTitle": "What if I have any questions or comments on Teacher Accounts?", - "teacherfaq.teacherQuestionsBody": "If you have any questions or feedback on Teacher Accounts, you can message us at teacher-accounts@scratch.mit.edu.", - "teacherfaq.teacherGoogleTitle": "Are teacher accounts integrated with Google Classroom or any other classroom managment service?", - "teacherfaq.teacherGoogleBody": "Scratch Teacher accounts are not integrated with any classroom management services.", - "teacherfaq.teacherEdTitle": "Are ScratchEd & Scratch Teacher accounts the same thing?", - "teacherfaq.teacherEdBody": "ScratchEd accounts are not linked to Scratch Teacher accounts.", + "teacherfaq.teacherSignUpTitle": "How do I request a teacher account?", + "teacherfaq.teacherSignUpBody": "To request a Teacher Account, go to the teacher account request form.", "teacherfaq.teacherWaitTitle": "Why do I have to wait 24 hours for my account?", "teacherfaq.teacherWaitBody": "The Scratch Team uses this time to manually review account creation submissions to verify the account creator is an educator.", "teacherfaq.teacherPersonalTitle": "Why do you need to know my personal information during registration?", "teacherfaq.teacherPersonalBody": "We use this information to verify the account creator is an educator. We will not share this information with anyone else, and it will not be shared publicly on the site.", + "teacherfaq.teacherGoogleTitle": "Are teacher accounts integrated with Google Classroom or any other classroom managment service?", + "teacherfaq.teacherGoogleBody": "Scratch Teacher accounts are not integrated with any classroom management services.", + "teacherfaq.teacherEdTitle": "Are Scratch Teacher accounts linked to ScratchEd accounts?", + "teacherfaq.teacherEdBody": "No, Scratch Teacher accounts are not linked to ScratchEd accounts.", "teacherfaq.teacherMultipleTitle": "Can a class have multiple teachers?", "teacherfaq.teacherMultipleBody": "A class can only have one teacher account associated with it.", + "teacherfaq.teacherQuestionsTitle": "What if I have any questions or comments on Teacher Accounts?", + "teacherfaq.teacherQuestionsBody": "If you have any questions or feedback on Teacher Accounts, you can message us at teacher-accounts@scratch.mit.edu.", "teacherfaq.studentAccountsTitle": "Student Accounts", "teacherfaq.studentVerifyTitle": "Do I have to verify each of my students' emails?", From 43bcbaf2ac408130dfa64379402288df5df79a69 Mon Sep 17 00:00:00 2001 From: St19_Galla Date: Wed, 17 Aug 2016 18:30:39 -0400 Subject: [PATCH 66/92] what was i thinking lol --- src/views/teachers/landing/landing.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/teachers/landing/landing.jsx b/src/views/teachers/landing/landing.jsx index af15c5fce..44bd9f39a 100644 --- a/src/views/teachers/landing/landing.jsx +++ b/src/views/teachers/landing/landing.jsx @@ -82,7 +82,7 @@ var Landing = injectIntl(React.createClass({

    - + resources icon

    @@ -90,7 +90,7 @@ var Landing = injectIntl(React.createClass({

    - + tips window icon

    From bc0263531b6dc31e38fb2dc26f883212f2ec4345 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 19 Aug 2016 14:11:24 -0400 Subject: [PATCH 67/92] align gender/org input msg with others Because the `input` field is already to the right, they were being transformed too far over. This overrides the transform to be correct, and also scopes some css in more detail --- src/components/card/card.scss | 94 ++++++++-------- src/components/registration/steps.scss | 146 ++++++++++++++----------- 2 files changed, 133 insertions(+), 107 deletions(-) diff --git a/src/components/card/card.scss b/src/components/card/card.scss index b2b70c22c..61ba55798 100644 --- a/src/components/card/card.scss +++ b/src/components/card/card.scss @@ -21,43 +21,6 @@ } } - .validation-message { - $arrow-border-width: 1rem; - display: block; - position: absolute; - top: 0; - left: 0; - transform: translate(16rem, 0); - margin-left: $arrow-border-width; - border: 1px solid $active-gray; - border-radius: 5px; - background-color: $ui-orange; - padding: 1rem; - max-width: 18.75rem; - min-height: 1rem; - overflow: visible; - color: $type-white; - - &:before { - display: block; - position: absolute; - top: 1rem; - left: -$arrow-border-width / 2; - - transform: rotate(45deg); - - border-bottom: 1px solid $active-gray; - border-left: 1px solid $active-gray; - border-radius: 5px; - - background-color: $ui-orange; - width: $arrow-border-width; - height: $arrow-border-width; - - content: ""; - } - } - .form { padding: 3rem 4rem; @@ -77,6 +40,43 @@ .col-sm-9 { position: relative; } + + .validation-message { + $arrow-border-width: 1rem; + display: block; + position: absolute; + top: 0; + left: 0; + transform: translate(16rem, 0); + margin-left: $arrow-border-width; + border: 1px solid $active-gray; + border-radius: 5px; + background-color: $ui-orange; + padding: 1rem; + max-width: 18.75rem; + min-height: 1rem; + overflow: visible; + color: $type-white; + + &:before { + display: block; + position: absolute; + top: 1rem; + left: -$arrow-border-width / 2; + + transform: rotate(45deg); + + border-bottom: 1px solid $active-gray; + border-left: 1px solid $active-gray; + border-radius: 5px; + + background-color: $ui-orange; + width: $arrow-border-width; + height: $arrow-border-width; + + content: ""; + } + } } } } @@ -105,15 +105,19 @@ @media only screen and (max-width: $desktop - 1) { .card { - .validation-message { - position: relative; - transform: none; - margin: inherit; - width: 100%; - height: inherit; + .form { + .row { + .validation-message { + position: relative; + transform: none; + margin: inherit; + width: 100%; + height: inherit; - &:before { - display: none; + &:before { + display: none; + } + } } } } diff --git a/src/components/registration/steps.scss b/src/components/registration/steps.scss index 0355fbf7d..841f99ae4 100644 --- a/src/components/registration/steps.scss +++ b/src/components/registration/steps.scss @@ -2,10 +2,6 @@ @import "../../frameless"; .registration-step { - .demographics-checkbox-is-robot { - display: none; - } - .invite-avatar { display: block; margin: 0 auto 1rem auto; @@ -13,20 +9,30 @@ border-radius: 8px; } - .gender-input, - .other-input { - float: right; - width: 90%; - - .row { - margin-left: .5rem; + .card { + .demographics-checkbox-is-robot { + display: none; } - } - .help-text { - margin: .25rem 0; - text-align: left; - color: $ui-dark-gray; + .gender-input, + .other-input { + float: right; + width: 90%; + + .row { + margin-left: .5rem; + + .validation-message { + transform: translate(14rem, 0); + } + } + } + + .help-text { + margin: .25rem 0; + text-align: left; + color: $ui-dark-gray; + } } &.class-invite-step { @@ -51,58 +57,66 @@ } &.username-step { - .username-label { - margin-bottom: .75rem; + .card { + .username-label { + margin-bottom: .75rem; + } } } &.demographics-step { - .gender-input { - margin-top: -5.5rem; - } + .card { + .gender-input { + margin-top: -5.5rem; + } - .radio { - margin-right: 2.5rem; - line-height: 3rem; + .radio { + margin-right: 2.5rem; + line-height: 3rem; - input { - margin-right: 1rem; + input { + margin-right: 1rem; + } } } } &.phone-step { - .form-group { - margin-bottom: 2rem; - } + .card { + .form-group { + margin-bottom: 2rem; + } - input { - &[type=checkbox] { - margin-bottom: 1.25rem; + input { + &[type=checkbox] { + margin-bottom: 1.25rem; + } } } } &.organization-step { - .checkbox-group { - .validation-message { - transform: translate(16rem, 8rem); + .card { + .checkbox-group { + .validation-message { + transform: translate(16rem, 8rem); + } } - } - input { - &[value="8"] { - margin: 1rem 0; + input { + &[value="8"] { + margin: 1rem 0; + } } - } - .other-input { - margin-top: -5.75rem; + .other-input { + margin-top: -5.75rem; + } } } &.usescratch-step { - .form { + .card { .form-group { margin-bottom: 0; @@ -112,13 +126,13 @@ } } } - } - p { - &.char-count { - margin-top: 0; - margin-bottom: 1rem; - text-align: right; + p { + &.char-count { + margin-top: 0; + margin-bottom: 1rem; + text-align: right; + } } } } @@ -149,9 +163,11 @@ @media only screen and (max-width: $mobile - 1) { .registration-step { &.demographics-step { - .radio { - width: 100%; - text-align: left; + .card { + .radio { + width: 100%; + text-align: left; + } } } @@ -167,24 +183,30 @@ @media only screen and (max-width: $desktop - 1) { .registration-step { - .form { - text-align: left; + .card { + .form { + text-align: left; + } } &.phone-step { - .checkbox, - .validation-message { - text-align: left; - } + .card { + .checkbox, + .validation-message { + text-align: left; + } - .checkbox { - margin-bottom: 1rem; + .checkbox { + margin-bottom: 1rem; + } } } &.organization-step { - .checkbox-group { - text-align: left; + .card { + .checkbox-group { + text-align: left; + } } } } From baf0676f990276d8620007f2c8df2073a8b8996d Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 19 Aug 2016 15:06:12 -0400 Subject: [PATCH 68/92] move `.validation-message` out` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn’t need to be specifically styled, as we have no use for it inside `.card` but outside `.row` yet. Thanks @rschamp! --- src/components/card/card.scss | 94 +++++++++++++++++------------------ 1 file changed, 45 insertions(+), 49 deletions(-) diff --git a/src/components/card/card.scss b/src/components/card/card.scss index 61ba55798..b2b70c22c 100644 --- a/src/components/card/card.scss +++ b/src/components/card/card.scss @@ -21,6 +21,43 @@ } } + .validation-message { + $arrow-border-width: 1rem; + display: block; + position: absolute; + top: 0; + left: 0; + transform: translate(16rem, 0); + margin-left: $arrow-border-width; + border: 1px solid $active-gray; + border-radius: 5px; + background-color: $ui-orange; + padding: 1rem; + max-width: 18.75rem; + min-height: 1rem; + overflow: visible; + color: $type-white; + + &:before { + display: block; + position: absolute; + top: 1rem; + left: -$arrow-border-width / 2; + + transform: rotate(45deg); + + border-bottom: 1px solid $active-gray; + border-left: 1px solid $active-gray; + border-radius: 5px; + + background-color: $ui-orange; + width: $arrow-border-width; + height: $arrow-border-width; + + content: ""; + } + } + .form { padding: 3rem 4rem; @@ -40,43 +77,6 @@ .col-sm-9 { position: relative; } - - .validation-message { - $arrow-border-width: 1rem; - display: block; - position: absolute; - top: 0; - left: 0; - transform: translate(16rem, 0); - margin-left: $arrow-border-width; - border: 1px solid $active-gray; - border-radius: 5px; - background-color: $ui-orange; - padding: 1rem; - max-width: 18.75rem; - min-height: 1rem; - overflow: visible; - color: $type-white; - - &:before { - display: block; - position: absolute; - top: 1rem; - left: -$arrow-border-width / 2; - - transform: rotate(45deg); - - border-bottom: 1px solid $active-gray; - border-left: 1px solid $active-gray; - border-radius: 5px; - - background-color: $ui-orange; - width: $arrow-border-width; - height: $arrow-border-width; - - content: ""; - } - } } } } @@ -105,19 +105,15 @@ @media only screen and (max-width: $desktop - 1) { .card { - .form { - .row { - .validation-message { - position: relative; - transform: none; - margin: inherit; - width: 100%; - height: inherit; + .validation-message { + position: relative; + transform: none; + margin: inherit; + width: 100%; + height: inherit; - &:before { - display: none; - } - } + &:before { + display: none; } } } From 70eb82f7cb2df91b8dbbe16fe6a9d999d704b697 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 19 Aug 2016 15:16:35 -0400 Subject: [PATCH 69/92] remove `.card`-specific stylings --- src/components/registration/steps.scss | 154 +++++++++++-------------- 1 file changed, 67 insertions(+), 87 deletions(-) diff --git a/src/components/registration/steps.scss b/src/components/registration/steps.scss index 841f99ae4..d9ef9e135 100644 --- a/src/components/registration/steps.scss +++ b/src/components/registration/steps.scss @@ -2,6 +2,10 @@ @import "../../frameless"; .registration-step { + .demographics-checkbox-is-robot { + display: none; + } + .invite-avatar { display: block; margin: 0 auto 1rem auto; @@ -9,30 +13,24 @@ border-radius: 8px; } - .card { - .demographics-checkbox-is-robot { - display: none; - } + .gender-input, + .other-input { + float: right; + width: 90%; - .gender-input, - .other-input { - float: right; - width: 90%; + .row { + margin-left: .5rem; - .row { - margin-left: .5rem; - - .validation-message { - transform: translate(14rem, 0); - } + .validation-message { + transform: translate(14rem, 0); } } + } - .help-text { - margin: .25rem 0; - text-align: left; - color: $ui-dark-gray; - } + .help-text { + margin: .25rem 0; + text-align: left; + color: $ui-dark-gray; } &.class-invite-step { @@ -57,82 +55,72 @@ } &.username-step { - .card { - .username-label { - margin-bottom: .75rem; - } + .username-label { + margin-bottom: .75rem; } } &.demographics-step { - .card { - .gender-input { - margin-top: -5.5rem; - } + .gender-input { + margin-top: -5.5rem; + } - .radio { - margin-right: 2.5rem; - line-height: 3rem; + .radio { + margin-right: 2.5rem; + line-height: 3rem; - input { - margin-right: 1rem; - } + input { + margin-right: 1rem; } } } &.phone-step { - .card { - .form-group { - margin-bottom: 2rem; - } + .form-group { + margin-bottom: 2rem; + } - input { - &[type=checkbox] { - margin-bottom: 1.25rem; - } + input { + &[type=checkbox] { + margin-bottom: 1.25rem; } } } &.organization-step { - .card { - .checkbox-group { - .validation-message { - transform: translate(16rem, 8rem); - } + .checkbox-group { + .validation-message { + transform: translate(16rem, 8rem); } + } - input { - &[value="8"] { - margin: 1rem 0; - } + input { + &[value="8"] { + margin: 1rem 0; } + } - .other-input { - margin-top: -5.75rem; - } + .other-input { + margin-top: -5.75rem; } } &.usescratch-step { - .card { - .form-group { - margin-bottom: 0; + .form-group { + margin-bottom: 0; - &.has-error { - .textarea { - border: 1px solid $ui-orange; - } + &.has-error { + .textarea { + border: 1px solid $ui-orange; } } + } - p { - &.char-count { - margin-top: 0; - margin-bottom: 1rem; - text-align: right; - } + p { + &.char-count { + margin-top: 0; + margin-bottom: 1rem; + text-align: right; } } } @@ -163,11 +151,9 @@ @media only screen and (max-width: $mobile - 1) { .registration-step { &.demographics-step { - .card { - .radio { - width: 100%; - text-align: left; - } + .radio { + width: 100%; + text-align: left; } } @@ -183,30 +169,24 @@ @media only screen and (max-width: $desktop - 1) { .registration-step { - .card { - .form { - text-align: left; - } + .form { + text-align: left; } &.phone-step { - .card { - .checkbox, - .validation-message { - text-align: left; - } + .checkbox, + .validation-message { + text-align: left; + } - .checkbox { - margin-bottom: 1rem; - } + .checkbox { + margin-bottom: 1rem; } } &.organization-step { - .card { - .checkbox-group { - text-align: left; - } + .checkbox-group { + text-align: left; } } } From af2165a6972e50cbf4afd1780b2f2e59f9d95a22 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 22 Aug 2016 15:55:43 -0400 Subject: [PATCH 70/92] Add Abkhaz to custom locale list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it’s not in `intl-messageformat`. Give it Azerbaijani as a parent language for now, as they have similar enough structures for plualization/alphabet purposes. --- custom-locales.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/custom-locales.json b/custom-locales.json index ad3e37405..83c4a0b11 100644 --- a/custom-locales.json +++ b/custom-locales.json @@ -1,4 +1,8 @@ { + "ab": { + "locale": "ab", + "parentLocale": "az" + }, "an": { "locale": "an", "parentLocale": "ca" From 9657262daa2e0288a13147ee2d9234d135710f91 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 22 Aug 2016 16:01:17 -0400 Subject: [PATCH 71/92] Capitalize other languages per https://github.com/LLK/scratchr2/pull/3954#issuecomment-241529290 --- languages.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/languages.json b/languages.json index 411834551..774ddf326 100644 --- a/languages.json +++ b/languages.json @@ -21,7 +21,7 @@ "eu": "Euskara", "fa": "فارسی", "fr": "Français", - "fur": "furlan", + "fur": "Furlan", "ga": "Gaeilge", "gd": "Gàidhlig", "gl": "Galego", @@ -61,7 +61,7 @@ "ro": "Română", "ru": "Русский", "sc": "Sardu", - "sq": "shqiptar", + "sq": "Shqiptar", "sk": "Slovenčina", "sl": "Slovenščina", "sr": "Српски", From 3ab92e0c36ccbebe63fb2216a0cf81b017b1c6d2 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Mon, 22 Aug 2016 16:33:06 -0400 Subject: [PATCH 72/92] capitalize one more language existing, but needs it --- languages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.json b/languages.json index 774ddf326..85679754d 100644 --- a/languages.json +++ b/languages.json @@ -65,7 +65,7 @@ "sk": "Slovenčina", "sl": "Slovenščina", "sr": "Српски", - "fi": "suomi", + "fi": "Suomi", "sv": "Svenska", "te": "తెలుగు", "nai": "Tepehuan", From f883ecfbaeb9b5d196a4acd97ff8d0a6a5f108b1 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Mon, 8 Aug 2016 08:38:32 -0400 Subject: [PATCH 73/92] commit changes --- src/_colors.scss | 1 + src/components/grid/grid.jsx | 3 ++ src/components/grid/grid.scss | 37 ++++++++++----- src/components/thumbnail/thumbnail.jsx | 4 +- src/views/explore/explore.jsx | 62 ++++++++++++++------------ src/views/explore/explore.scss | 46 +++++++++++++++---- 6 files changed, 105 insertions(+), 48 deletions(-) diff --git a/src/_colors.scss b/src/_colors.scss index 7a8947665..dff8ef60a 100644 --- a/src/_colors.scss +++ b/src/_colors.scss @@ -11,6 +11,7 @@ $background-color: hsla(0, 0, 99, 1); //#FDFDFD /* UI Secondary Colors */ $ui-aqua: hsla(170, 70, 50, 1); //#26D9BB $ui-purple: hsla(265, 55, 55, 1); //#824DCB +$ui-yellow: hsla(45, 100, 50, 1); //#FFBF00 $ui-white: #fff; $ui-border: hsla(0, 0, 85, 1); //#D9D9D9 diff --git a/src/components/grid/grid.jsx b/src/components/grid/grid.jsx index 04f8a0b42..052a61dd7 100644 --- a/src/components/grid/grid.jsx +++ b/src/components/grid/grid.jsx @@ -12,6 +12,7 @@ var Grid = React.createClass({ return { items: require('./grid.json'), itemType: 'projects', + explore: false, showLoves: false, showFavorites: false, showRemixes: false, @@ -32,6 +33,7 @@ var Grid = React.createClass({ if (this.props.itemType == 'projects') { return ( - - - {this.getBubble('all')} - {this.getBubble('animations')} - {this.getBubble('art')} - {this.getBubble('games')} - {this.getBubble('music')} - {this.getBubble('stories')} - - - {this.getTab('projects')} - {this.getTab('studios')} - -

    - - - - + +
    +

    Explore

    - +
    + + {this.getTab('projects')} + {this.getTab('studios')} + + + {this.getBubble('all')} + {this.getBubble('animations')} + {this.getBubble('art')} + {this.getBubble('games')} + {this.getBubble('music')} + {this.getBubble('stories')} + +
    + + + + +
    diff --git a/src/views/explore/explore.scss b/src/views/explore/explore.scss index 3e8406771..8918d0e04 100644 --- a/src/views/explore/explore.scss +++ b/src/views/explore/explore.scss @@ -4,6 +4,36 @@ $base-bg: $ui-white; #view { + padding: 0; +} + +.outer { + .title-banner { + &.masthead { + margin-bottom: 0; + background-color: $ui-yellow; + padding: 0; + + h1 { + text-align: center; + color: $ui-white; + font-size: 3rem; + } + + p { + margin: 0; + width: $cols6; + text-align: left; + color: $ui-white; + + a { + border-bottom: 1px solid $ui-white; + color: $ui-white; + } + } + } + } + .box { display: block; margin-right: auto; @@ -13,7 +43,7 @@ $base-bg: $ui-white; .box-content { padding: 0; } - } + } .categories { display: inline-block; @@ -26,20 +56,20 @@ $base-bg: $ui-white; opacity: .75; background-color: $ui-white; color: $header-gray; - + &:hover { opacity: 1; border-color: $active-dark-gray; } - } - li.active { - opacity: 1; - border-color: $active-dark-gray; - - &:hover { + &.active { opacity: 1; border-color: $active-dark-gray; + + &:hover { + opacity: 1; + border-color: $active-dark-gray; + } } } } From 432b621079729244e8f978d0ac1ff802ea562383 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Mon, 8 Aug 2016 13:00:40 -0400 Subject: [PATCH 74/92] wip --- src/components/grid/grid.jsx | 15 ++++++++++- src/components/thumbnail/thumbnail.jsx | 9 +++++++ src/views/explore/explore.jsx | 3 ++- src/views/explore/explore.scss | 37 +++++++++++++++++++++++++- 4 files changed, 61 insertions(+), 3 deletions(-) diff --git a/src/components/grid/grid.jsx b/src/components/grid/grid.jsx index 052a61dd7..292cd416b 100644 --- a/src/components/grid/grid.jsx +++ b/src/components/grid/grid.jsx @@ -4,6 +4,7 @@ var React = require('react'); var Thumbnail = require('../thumbnail/thumbnail.jsx'); var FlexRow = require('../flex-row/flex-row.jsx'); +var api = require('../../lib/api'); require('./grid.scss'); var Grid = React.createClass({ @@ -16,9 +17,19 @@ var Grid = React.createClass({ showLoves: false, showFavorites: false, showRemixes: false, - showViews: false + showViews: false, + showAvatar: false }; }, + getAvatar: function (username) { + var url = ''; + api({ + uri: '/users/' + username + }, function (err, body) { + this.url = body.profile.images['32x32']; + }.bind(this)); + console.log(url); + }, render: function () { var classes = classNames( 'grid', @@ -38,10 +49,12 @@ var Grid = React.createClass({ showFavorites={this.props.showFavorites} showRemixes={this.props.showRemixes} showViews={this.props.showViews} + showAvatar={this.props.showAvatar} type={'project'} href={href} title={item.title} src={item.image} + avatar={this.getAvatar(item.author.username)} creator={item.author.username} loves={item.stats.loves} favorites={item.stats.favorites} diff --git a/src/components/thumbnail/thumbnail.jsx b/src/components/thumbnail/thumbnail.jsx index 32fff6206..8fa73c3b3 100644 --- a/src/components/thumbnail/thumbnail.jsx +++ b/src/components/thumbnail/thumbnail.jsx @@ -14,11 +14,13 @@ var Thumbnail = React.createClass({ href: '#', title: 'Project', src: '', + avatar: '', type: 'project', showLoves: false, showFavorites: false, showRemixes: false, showViews: false, + showAvatar: false, linkTitle: true, explore: false, alt: '' @@ -32,6 +34,13 @@ var Thumbnail = React.createClass({ {'explore': this.props.explore} ); var extra = []; + if (this.props.avatar && this.props.showAvatar) { + extra.push( + + {this.props.creator} + + ); + } if (this.props.creator) { extra.push(
    diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 83b585f09..f92ea9a7a 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -139,7 +139,8 @@ var Explore = injectIntl(React.createClass({ explore={true} showLoves={false} showFavorites={false} - showViews={false} /> + showViews={false} + showAvatar={true}/> - + +
    -
    ); diff --git a/src/views/search/search.scss b/src/views/search/search.scss index 49752fb82..888d2de38 100644 --- a/src/views/search/search.scss +++ b/src/views/search/search.scss @@ -4,33 +4,276 @@ $base-bg: $ui-white; #view { - .box { - display: block; - margin-right: auto; - margin-bottom: 20px; - margin-left: auto; + background-color: $ui-gray; + padding: 0; +} - .box-content { +.outer { + .title-banner { + &.masthead { + margin-bottom: 0; + background-color: darken($ui-blue, 10%); padding: 0; - } - } - #projectBox { - border-top: 2px solid; - border-color: $active-gray; + h1 { + text-align: center; + color: $ui-white; + font-size: 3rem; + } + + p { + margin: 0; + width: $cols6; + text-align: left; + color: $ui-white; + + a { + border-bottom: 1px solid $ui-white; + color: $ui-white; + } + } + } + } + + .search { + margin: 0 auto; + border-right: 0; + width: $cols6; + color: $type-white; + + .form { + margin: 0; + } + + .row { + .help-block { + display: none; + } + } + + .input, + .button { + display: inline-block; + margin-top: 5px; + outline: none; + border: 0; + background-color: $active-gray; + height: 14px; + + &[type=text] { + transition: .15s ease background-color; + padding: 0; + padding-right: 10px; + padding-left: 40px; + width: calc(100% - 50px); + height: 40px; + color: $type-white; + font-size: .85em; + + &::placeholder { + $placeholder-transparent: rgba(255, 255, 255, .75); + color: $placeholder-transparent; + } + + &:focus { + transition: .15s ease background-color; + background-color: $active-dark-gray; + } + + .ie9 & { + width: 70px; + } + } + } + + .btn-search { + position: absolute; + + box-shadow: none; + background-color: transparent; + background-image: url("/images/nav-search-glass.png"); + background-repeat: no-repeat; + background-position: center center; + background-size: 14px 14px; + + width: 40px; + height: 40px; + + &:hover { + box-shadow: none; + } + } + } + + .select { + select { + margin-bottom: 0; + color: $header-gray; + } + + .help-block { + display: none; + } + } + + .tab-background { + box-shadow: 0 0 1px $box-shadow-gray; background-color: $ui-white; - padding-bottom: 30px; width: 100%; } - .load button { - outline: None; - border: None; - background-color: $ui-white; + #projectBox { + margin-top: 16px; + background-color: $ui-gray; + padding-bottom: 32px; + width: 100%; + + .grid .flex-row { + width: $cols12; + justify-content: space-between; + } + + .button { + display: block; + margin: 0 auto; + } + } + + + .thumbnail { + $project-width: 220px; + $project-height: 208px; padding: 0; - li { - color: $header-gray; + &.project { + margin-bottom: 16px; + border-radius: 4px; + width: $project-width; + height: $project-height; + + .thumbnail-image { + margin: 8px auto; + width: 204px; + height: 152px; + + img { + border: 0; + border-radius: 4px; + } + } + } + + &.gallery { + margin-bottom: 16px; + border-radius: 4px; + width: $project-width; + height: $project-height; + + .thumbnail-image { + margin: 8px auto; + width: 204px; + height: 120px; + + img { + border: 0; + border-radius: 4px; + } + } + } + + .thumbnail-info { + margin: 0 auto; + width: 204px; + + .creator-image { + float: left; + + img { + margin-right: 8px; + border-radius: 4px; + width: 32px; + height: 32px; + } + } + + .thumbnail-title { + float: left; + max-width: 164px; + + .thumbnail-creator a { + color: $type-gray; + } + } + } + } +} + +//4 columns +@media only screen and (max-width: $mobile - 1) { + .outer { + .search { + .btn-search { + left: 40px; + } + } + + .tabs { + width: $cols4; + } + + .sort-controls { + width: $cols4; + } + + #projectBox { + .grid { + .flex-row { + width: $cols4; + } + } + } + } +} + + +//6 columns +@media only screen and (min-width: $mobile) and (max-width: $tablet - 1) { + .outer { + .tabs { + width: $cols6; + } + + .sort-controls { + width: $cols6; + } + + #projectBox { + .grid { + .flex-row { + width: $cols6; + } + } + } + } +} + +// 8 columns +@media only screen and (min-width: $tablet) and (max-width: $desktop - 1) { + .outer { + .tabs { + width: $cols8; + } + + .sort-controls { + width: $cols8; + } + + #projectBox { + .grid { + .flex-row { + width: $cols9; + } + } } } } From 6394d3e8cf0b7461792955606f715ac3d6b4431f Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 16 Aug 2016 19:19:01 -0600 Subject: [PATCH 83/92] make search bar on 4 column layout look right --- src/views/search/search.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/search/search.scss b/src/views/search/search.scss index 888d2de38..032c3b43b 100644 --- a/src/views/search/search.scss +++ b/src/views/search/search.scss @@ -212,6 +212,8 @@ $base-bg: $ui-white; @media only screen and (max-width: $mobile - 1) { .outer { .search { + width: $cols4; + .btn-search { left: 40px; } From f27e99f1a4afa34d61091f044051d494a802cc5d Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Mon, 22 Aug 2016 11:21:08 -0600 Subject: [PATCH 84/92] move card styling to grid.scss, use card as default grid style --- src/components/grid/grid.jsx | 3 - src/components/grid/grid.scss | 118 ++++++++++++++++--------- src/components/thumbnail/thumbnail.jsx | 4 +- src/views/explore/explore.scss | 95 -------------------- src/views/search/search.scss | 97 -------------------- 5 files changed, 76 insertions(+), 241 deletions(-) diff --git a/src/components/grid/grid.jsx b/src/components/grid/grid.jsx index 6764484f5..93572840d 100644 --- a/src/components/grid/grid.jsx +++ b/src/components/grid/grid.jsx @@ -12,7 +12,6 @@ var Grid = React.createClass({ return { items: require('./grid.json'), itemType: 'projects', - cards: false, showLoves: false, showFavorites: false, showRemixes: false, @@ -34,7 +33,6 @@ var Grid = React.createClass({ if (this.props.itemType == 'projects') { return ( Date: Mon, 22 Aug 2016 11:30:44 -0600 Subject: [PATCH 85/92] remove inactive class on tabs --- src/components/tabs/tabs.scss | 13 +++++++++---- src/views/explore/explore.jsx | 3 +-- src/views/search/search.jsx | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/tabs/tabs.scss b/src/components/tabs/tabs.scss index 303708f45..a612c3f76 100644 --- a/src/components/tabs/tabs.scss +++ b/src/components/tabs/tabs.scss @@ -1,6 +1,12 @@ @import "../../colors"; @import "../../frameless"; +.tab-background { + box-shadow: 0 0 1px $box-shadow-gray; + background-color: $ui-white; + width: 100%; +} + .tabs { background-color: $ui-white; padding: 0; @@ -20,6 +26,7 @@ border-bottom: 3px solid $ui-aqua; &:hover { + border-bottom: 3px solid $ui-aqua; color: $header-gray; } } @@ -29,10 +36,8 @@ padding: .75em 1.5em; } - &.inactive { - &:hover { - border-bottom: 3px solid $active-dark-gray; - } + &:hover { + border-bottom: 3px solid $active-dark-gray; } .tab-icon { diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 3a17a8ae5..993056c28 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -115,8 +115,7 @@ var Explore = injectIntl(React.createClass({ }, getTab: function (type) { var classes = classNames({ - active: (this.props.itemType === type), - inactive: (this.props.itemType !== type) + active: (this.props.itemType === type) }); return ( diff --git a/src/views/search/search.jsx b/src/views/search/search.jsx index 66031db6b..87e2b9ae0 100644 --- a/src/views/search/search.jsx +++ b/src/views/search/search.jsx @@ -80,7 +80,7 @@ var Search = injectIntl(React.createClass({ getTab: function (type) { var term = this.props.searchTerm.split(' ').join('+'); var allTab = -
  • +
  • From f0703b9f4697aa27352965b71ce2577ff252d0fd Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 23 Aug 2016 08:11:18 -0600 Subject: [PATCH 86/92] fix styling error --- src/components/grid/grid.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index 88734b987..d890a0e2d 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -15,7 +15,8 @@ margin: 0 auto; padding: 12px; width: $cols12; - justify-content: space-between; } + justify-content: space-between; + } .thumbnail { padding: 0; From 32ef37e3bf6215f78506ae7c7017680b2bc95bb2 Mon Sep 17 00:00:00 2001 From: Technoboy10 Date: Tue, 23 Aug 2016 11:10:02 -0600 Subject: [PATCH 87/92] remove unused variable --- src/views/explore/explore.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/explore/explore.jsx b/src/views/explore/explore.jsx index 993056c28..c1c0e00df 100644 --- a/src/views/explore/explore.jsx +++ b/src/views/explore/explore.jsx @@ -131,7 +131,6 @@ var Explore = injectIntl(React.createClass({ ); }, render: function () { - var formatMessage = this.props.intl.formatMessage; return (
    From 9a11e49444f0c56de4ab4c97ee000b59f5085047 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 07:54:08 -0400 Subject: [PATCH 88/92] Add `device-width` by default Now that we have mobile nav/footer --- src/routes.json | 18 ++++++------------ src/template-config.js | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/routes.json b/src/routes.json index 0520c20cd..478b94c9e 100644 --- a/src/routes.json +++ b/src/routes.json @@ -4,8 +4,7 @@ "pattern": "^/?$", "routeAlias": "/?$", "view": "splash/splash", - "title": "Imagine, Program, Share", - "viewportWidth": "device-width" + "title": "Imagine, Program, Share" }, { "name": "about", @@ -48,32 +47,28 @@ "pattern": "^/conference/plan/?$", "routeAlias": "/conference(?!/201[4-5])", "view": "conference/plan/plan", - "title": "Plan Your Visit", - "viewportWidth": "device-width" + "title": "Plan Your Visit" }, { "name": "conference-expectations", "pattern": "^/conference/expect/?$", "routeAlias": "/conference(?!/201[4-5])", "view": "conference/expect/expect", - "title": "What to Expect", - "viewportWidth": "device-width" + "title": "What to Expect" }, { "name": "conference-schedule", "pattern": "^/conference/schedule/?$", "routeAlias": "/conference(?!/201[4-5])", "view": "conference/schedule/schedule", - "title": "Conference Schedule", - "viewportWidth": "device-width" + "title": "Conference Schedule" }, { "name": "conference-details", "pattern": "^/conference/:id/details/?$", "routeAlias": "/conference(?!/201[4-5])", "view": "conference/details/details", - "title": "Event Details", - "viewportWidth": "device-width" + "title": "Event Details" }, { "name": "developers", @@ -108,8 +103,7 @@ "pattern": "^/educators/register/?$", "routeAlias": "/educators(?:/(faq|register|waiting))?/?$", "view": "teacherregistration/teacherregistration", - "title": "Teacher Registration", - "viewportWidth": "device-width" + "title": "Teacher Registration" }, { "name": "teacherwaitingroom", diff --git a/src/template-config.js b/src/template-config.js index 297328d74..33cd26ca7 100644 --- a/src/template-config.js +++ b/src/template-config.js @@ -7,7 +7,7 @@ module.exports = { 'and animations.', // override if mobile-friendly - viewportWidth: 942, + viewportWidth: 'device-width', // Open graph og_image: 'https://scratch.mit.edu/images/scratch-og.png', From 28f96a1d0db54a89546c47c8ffc5b306723b35f3 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 10:23:26 -0400 Subject: [PATCH 89/92] Align grid items on the left use `flex-start` with margins to ensure proper spacing between, while still starting at the left of each row. --- src/components/grid/grid.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index d890a0e2d..97047f516 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -15,10 +15,11 @@ margin: 0 auto; padding: 12px; width: $cols12; - justify-content: space-between; + justify-content: flex-start; } .thumbnail { + margin: 6px; padding: 0; &.project { From fb5d9788f86faf7c50a77e6c622474498bed47e1 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 10:24:01 -0400 Subject: [PATCH 90/92] Re-structure grid styling a bit combine stylings where possible, re-name some of the variables to be used more often --- src/components/grid/grid.scss | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index 97047f516..914090982 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -5,11 +5,11 @@ display: inline-block; width: 100%; - $project-width: 220px; + $thumbnail-width: 220px; + $thumbnail-inner-width: 204px; + $project-height: 208px; - - $gallery-width: 200px; - $gallery-height: 118px; + $gallery-height: 164px; .flex-row { margin: 0 auto; @@ -22,46 +22,46 @@ margin: 6px; padding: 0; + &.gallery, &.project { margin-bottom: 16px; border-radius: 4px; box-shadow: 0 0 3px $box-shadow-gray; background-color: $ui-white; - width: $project-width; - height: $project-height; + width: $thumbnail-width; .thumbnail-image { margin: 8px auto; - width: 204px; + width: $thumbnail-inner-width; + } + } + + &.project { + height: $project-height; + + .thumbnail-image { height: 152px; img { margin: 0 auto; border: 0; border-radius: 4px; - width: 204px; + width: $thumbnail-inner-width; height: 152px; } } } &.gallery { - margin-bottom: 16px; - border-radius: 4px; - box-shadow: 0 0 3px $box-shadow-gray; - background-color: $ui-white; - width: $project-width; - height: 164px; + height: $gallery-height; .thumbnail-image { - margin: 8px auto; - width: 204px; height: 120px; img { border: 0; border-radius: 4px; - width: 204px; + width: $thumbnail-inner-width; height: 120px; } } @@ -69,7 +69,7 @@ .thumbnail-info { margin: 0 auto; - width: 204px; + width: $thumbnail-inner-width; .creator-image { float: left; From 5dd80c10200c868f7df23cd7a3d2e0cb6cb65d36 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 10:55:13 -0400 Subject: [PATCH 91/92] additional reformatting --- src/components/grid/grid.scss | 71 ++++++++++++++++------------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/src/components/grid/grid.scss b/src/components/grid/grid.scss index 914090982..2afed6b19 100644 --- a/src/components/grid/grid.scss +++ b/src/components/grid/grid.scss @@ -13,26 +13,46 @@ .flex-row { margin: 0 auto; - padding: 12px; + padding: 12px 0; width: $cols12; justify-content: flex-start; } .thumbnail { - margin: 6px; - padding: 0; + margin: 7px; + border-radius: 4px; + box-shadow: 0 0 3px $box-shadow-gray; + background-color: $ui-white; + padding-bottom: 4px; + width: $thumbnail-width; - &.gallery, - &.project { - margin-bottom: 16px; - border-radius: 4px; - box-shadow: 0 0 3px $box-shadow-gray; - background-color: $ui-white; - width: $thumbnail-width; + .thumbnail-image { + margin: 8px auto; + width: $thumbnail-inner-width; + } - .thumbnail-image { - margin: 8px auto; - width: $thumbnail-inner-width; + .thumbnail-info { + margin: 0 auto; + width: $thumbnail-inner-width; + + .creator-image { + float: left; + + img { + margin-right: 8px; + border-radius: 4px; + width: 32px; + height: 32px; + } + } + + .thumbnail-title { + float: left; + max-width: 164px; + + .thumbnail-creator a { + color: $type-gray; + } } } @@ -66,31 +86,6 @@ } } } - - .thumbnail-info { - margin: 0 auto; - width: $thumbnail-inner-width; - - .creator-image { - float: left; - - img { - margin-right: 8px; - border-radius: 4px; - width: 32px; - height: 32px; - } - } - - .thumbnail-title { - float: left; - max-width: 164px; - - .thumbnail-creator a { - color: $type-gray; - } - } - } } &.column { From ab6f8e1049d7c912d3cbb34c6b3cfd287553c516 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 24 Aug 2016 16:38:39 -0400 Subject: [PATCH 92/92] Add in an Oxford Comma *whistles as he commits see https://github.com/LLK/scratch-www/pull/819#issuecomment-242195194 --- src/views/faq/l10n.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/faq/l10n.json b/src/views/faq/l10n.json index bdb848a5b..a81f73c91 100644 --- a/src/views/faq/l10n.json +++ b/src/views/faq/l10n.json @@ -13,7 +13,7 @@ "faq.makeGameTitle":"How do I make a game or animation with Scratch?", "faq.makeGameBody":"Check out the help page to see lots of ways to get started with Scratch. Or just dive in to the project editor.", "faq.requirementsTitle":"What are the system requirements for Scratch?", - "faq.requirementsBody":"To run Scratch 2, you need to be using (1) a Mac, Linux or Windows computer; (2) a version of Adobe Flash Player released on or after June 15, 2016; (3) a relatively recent web browser: one of the latest two versions of Chrome, Firefox, Safari (Mac or Windows only), Edge (Windows only), or Internet Explorer 10+ (Windows only). If your computer doesn’t meet these requirements, you can try downloading and installing Scratch 1.4, which you can still use to share projects to the Scratch 2 website.", + "faq.requirementsBody":"To run Scratch 2, you need to be using (1) a Mac, Linux, or Windows computer; (2) a version of Adobe Flash Player released on or after June 15, 2016; (3) a relatively recent web browser: one of the latest two versions of Chrome, Firefox, Safari (Mac or Windows only), Edge (Windows only), or Internet Explorer 10+ (Windows only). If your computer doesn’t meet these requirements, you can try downloading and installing Scratch 1.4, which you can still use to share projects to the Scratch 2 website.", "faq.offlineTitle":"Do you have a downloadable version so I can create and view projects offline?", "faq.offlineBody":"The Scratch 2 offline editor allows you to create Scratch projects without an internet connection. You can download Scratch 2 from the website. You can also still use Scratch 1.4. Note: You can have both Scratch 1.4 and 2 on your computer.", "faq.uploadOldTitle":"Can I still upload projects created with older versions of Scratch to the website?",