From 048d5c1383e6781e4ab0e145be6b0afbd8dd8af4 Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Wed, 8 Nov 2017 16:50:14 -0500 Subject: [PATCH 1/2] Switch CTA button based on logged in state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Invite logged-out users to ‘Get Started with Coding!’, and make the whole Scratch animation clickable (goes to the Animate a Name tutorial). See #1664 --- src/views/splash/hoc/middle-banner.jsx | 4 +- src/views/splash/hoc/top-banner.jsx | 85 ++++++++++++++------------ src/views/splash/hoc/top-banner.scss | 1 + src/views/splash/l10n.json | 5 +- src/views/splash/presentation.jsx | 3 +- 5 files changed, 54 insertions(+), 44 deletions(-) diff --git a/src/views/splash/hoc/middle-banner.jsx b/src/views/splash/hoc/middle-banner.jsx index 31ce74fd1..718220075 100644 --- a/src/views/splash/hoc/middle-banner.jsx +++ b/src/views/splash/hoc/middle-banner.jsx @@ -90,10 +90,10 @@ var MiddleBanner = injectIntl(React.createClass({

- +

- +
diff --git a/src/views/splash/hoc/top-banner.jsx b/src/views/splash/hoc/top-banner.jsx index 3c55076a2..c82ce4b4f 100644 --- a/src/views/splash/hoc/top-banner.jsx +++ b/src/views/splash/hoc/top-banner.jsx @@ -21,6 +21,9 @@ var nameTile = { var TopBanner = injectIntl(React.createClass({ type: 'TopBanner', + propTypes: { + loggedIn: React.PropTypes.bool.isRequired + }, getInitialState: function () { // use translated tile var formatMessage = this.props.intl.formatMessage; @@ -46,47 +49,51 @@ var TopBanner = injectIntl(React.createClass({ return ( - - - - - - - - - - + + + + + + + + + + +
- + { this.props.loggedIn ? + : + + }
   diff --git a/src/views/splash/hoc/top-banner.scss b/src/views/splash/hoc/top-banner.scss index 00ddcfb37..9df878291 100644 --- a/src/views/splash/hoc/top-banner.scss +++ b/src/views/splash/hoc/top-banner.scss @@ -31,6 +31,7 @@ } .top-animation { + margin: auto; padding-top: 2rem; padding-bottom: 1rem; width: 70%; diff --git a/src/views/splash/l10n.json b/src/views/splash/l10n.json index 4a87ddc13..6956d38b0 100644 --- a/src/views/splash/l10n.json +++ b/src/views/splash/l10n.json @@ -29,8 +29,9 @@ "teacherbanner.classesButton": "My Classes", "teacherbanner.faqButton": "Teacher Account FAQ", - "middle-banner.header": "Get Creative with Coding", - "middle-banner.ttt": "See more activities", + "middleBanner.header": "Get Creative with Coding", + "middleBanner.ttt": "See more activities", + "topBanner.getStarted": "Get Started with Coding!", "ttt.tutorial": "Tutorial", "ttt.open": "Open", "ttt.tutorialSubtitle": "Find out how to make this project using a step-by-step tutorial in Scratch.", diff --git a/src/views/splash/presentation.jsx b/src/views/splash/presentation.jsx index e0827551d..8e699bc6c 100644 --- a/src/views/splash/presentation.jsx +++ b/src/views/splash/presentation.jsx @@ -255,7 +255,8 @@ var SplashPresentation = injectIntl(React.createClass({ {this.props.isEducator ? [ ] : []} - +
{this.props.sessionStatus === sessionActions.Status.FETCHED ? ( Object.keys(this.props.user).length !== 0 ? [ From 51d980cfb333878c22d6b76e89e1d314facfbfd0 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Fri, 1 Dec 2017 15:33:59 -0500 Subject: [PATCH 2/2] Conditionally purge on deploys We can configure this within Travis --- bin/configure-fastly.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/configure-fastly.js b/bin/configure-fastly.js index 657d83c56..6c2bacf11 100644 --- a/bin/configure-fastly.js +++ b/bin/configure-fastly.js @@ -177,10 +177,12 @@ async.auto({ fastly.activateVersion(results.version, function (err, response) { if (err) throw new Error(err); process.stdout.write('Successfully configured and activated version ' + response.number + '\n'); - fastly.purgeAll(FASTLY_SERVICE_ID, function (err) { - if (err) throw new Error(err); - process.stdout.write('Purged all.\n'); - }); + if (process.env.FASTLY_PURGE_ALL) { + fastly.purgeAll(FASTLY_SERVICE_ID, function (err) { + if (err) throw new Error(err); + process.stdout.write('Purged all.\n'); + }); + } }); } }