From 2c7afbce084acd96896e7d8324654bd48d914cdb Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Fri, 16 Sep 2022 14:49:58 -0700 Subject: [PATCH 1/6] refactor: mark OS_ENUM as @enum{string} to reduce TS warnings --- src/lib/os-enum.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/os-enum.js b/src/lib/os-enum.js index 24d41c018..85037880d 100644 --- a/src/lib/os-enum.js +++ b/src/lib/os-enum.js @@ -1,3 +1,6 @@ +/** + * @enum {string} + */ const OS_ENUM = { WINDOWS: 'Windows', MACOS: 'macOS', From 48e62c4caffd263408d97074df48238733c4d9c5 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:10:13 -0700 Subject: [PATCH 2/6] feat: link Scratch Link landing page from extension pages --- .../install-scratch-link.jsx | 109 +++++++++++------- src/l10n.json | 7 +- 2 files changed, 75 insertions(+), 41 deletions(-) diff --git a/src/components/extension-landing/install-scratch-link.jsx b/src/components/extension-landing/install-scratch-link.jsx index 507cdbeb7..71a9b2a51 100644 --- a/src/components/extension-landing/install-scratch-link.jsx +++ b/src/components/extension-landing/install-scratch-link.jsx @@ -17,52 +17,53 @@ const InstallScratchLink = ({

-
- - - - -
- - - - - - - + + + + - - -
+ }-store-badge.svg`} + /> + + + + + + + +
+ - +
+

+ +

+
+ + + + + + ) + }} + /> +
diff --git a/src/l10n.json b/src/l10n.json index 4b6c25e6c..4778e4511 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -167,7 +167,12 @@ "installScratchLink.installHeaderTitle": "Install Scratch Link", "installScratchLink.downloadAndInstall": "Download and install Scratch Link.", - "installScratchLink.startScratchLink": "Start Scratch Link and make sure it is running. It should appear in your toolbar.", + "installScratchLink.startScratchLink.macOS": "Start Scratch Link and make sure it is running. It should appear in your menu bar.", + "installScratchLink.startScratchLink.Windows": "Start Scratch Link and make sure it is running. It should appear in your notification area (system tray).", + "installScratchLink.startScratchLink2.macOS": "If it does not appear, run Scratch Link from your Applications folder.", + "installScratchLink.startScratchLink2.Windows": "If it does not appear, run Scratch Link from your Start menu.", + "installScratchLink.learnMore.bodyText": "To learn more about Scratch Link, click {linkText}.", + "installScratchLink.learnMore.linkText": "here", "parents.FaqAgeRangeA": "While Scratch is primarily designed for 8 to 16 year olds, it is also used by people of all ages, including younger children with their parents.", "parents.FaqAgeRangeQ": "What is the age range for Scratch?", From beb810933adc6ad08de8932f6a1ec8240ea33cd1 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:33:12 -0700 Subject: [PATCH 3/6] feat: add Scratch Link 1.4 link for EV3 troubleshooting Plus lots of minor style changes to make it fit well. --- .../install-scratch-link.jsx | 40 ++++++++++++------- src/components/steps/steps.scss | 7 ++-- src/l10n.json | 2 + src/views/download/scratch-link/download.jsx | 1 + src/views/ev3/ev3.jsx | 1 + 5 files changed, 33 insertions(+), 18 deletions(-) diff --git a/src/components/extension-landing/install-scratch-link.jsx b/src/components/extension-landing/install-scratch-link.jsx index 71a9b2a51..6f7f3a03f 100644 --- a/src/components/extension-landing/install-scratch-link.jsx +++ b/src/components/extension-landing/install-scratch-link.jsx @@ -11,7 +11,9 @@ require('./extension-landing.scss'); // Assumes this will only be called with an OS that needs Scratch Link const InstallScratchLink = ({ - currentOS + currentOS, + hideScratchLink, + showEv3 }) => (
@@ -65,7 +67,7 @@ const InstallScratchLink = ({ }`} /> -
+ -
-

- -

+ +

- - + {!hideScratchLink && - - + } + {showEv3 && + +
+
} + }
); InstallScratchLink.propTypes = { - currentOS: PropTypes.string + currentOS: PropTypes.string.isRequired, + hideScratchLink: PropTypes.bool, + showEv3: PropTypes.bool }; module.exports = InstallScratchLink; diff --git a/src/components/steps/steps.scss b/src/components/steps/steps.scss index 0fdecd159..e6d34807f 100644 --- a/src/components/steps/steps.scss +++ b/src/components/steps/steps.scss @@ -48,11 +48,12 @@ box-sizing: border-box; .step-image { - height: 10rem; + max-height: 10rem; img { - width: auto; - height: 100%; + max-height: 10rem; + width: 100%; + height: auto; } } } diff --git a/src/l10n.json b/src/l10n.json index 4778e4511..004511f85 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -173,6 +173,8 @@ "installScratchLink.startScratchLink2.Windows": "If it does not appear, run Scratch Link from your Start menu.", "installScratchLink.learnMore.bodyText": "To learn more about Scratch Link, click {linkText}.", "installScratchLink.learnMore.linkText": "here", + "installScratchLink.ev3Workaround": "If you have issues connecting EV3 with Scratch Link 2.0, please try Scratch Link 1.4.", + "installScratchLink.downloadScratchLink1.4": "Direct download Scratch Link 1.4", "parents.FaqAgeRangeA": "While Scratch is primarily designed for 8 to 16 year olds, it is also used by people of all ages, including younger children with their parents.", "parents.FaqAgeRangeQ": "What is the age range for Scratch?", diff --git a/src/views/download/scratch-link/download.jsx b/src/views/download/scratch-link/download.jsx index ac0a88402..94e7e4c0e 100644 --- a/src/views/download/scratch-link/download.jsx +++ b/src/views/download/scratch-link/download.jsx @@ -57,6 +57,7 @@ const ScratchLink = ({intl}) => { /> {(isDownloaded(os)) && ( )} diff --git a/src/views/ev3/ev3.jsx b/src/views/ev3/ev3.jsx index 562715e28..480a69316 100644 --- a/src/views/ev3/ev3.jsx +++ b/src/views/ev3/ev3.jsx @@ -73,6 +73,7 @@ class EV3 extends ExtensionLanding { /> {(isDownloaded(this.state.OS)) && ( )} From 2935d7dd01c55b82bb76d19462f69f1a13cc287c Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:16:18 -0700 Subject: [PATCH 4/6] fix: move EV3 troubleshooting into troubleshooting section --- .../extension-landing/extension-landing.scss | 5 ++++ .../extension-troubleshooting.jsx | 2 +- .../install-scratch-link.jsx | 30 ++++++++++--------- src/l10n.json | 6 ++-- src/views/download/scratch-link/download.jsx | 7 +++++ src/views/ev3/ev3.jsx | 6 ++++ 6 files changed, 39 insertions(+), 17 deletions(-) diff --git a/src/components/extension-landing/extension-landing.scss b/src/components/extension-landing/extension-landing.scss index 6d569f0d5..7d2f45d4f 100644 --- a/src/components/extension-landing/extension-landing.scss +++ b/src/components/extension-landing/extension-landing.scss @@ -7,6 +7,11 @@ padding: 0; } +html { + // Adjust target position to compensate for the floating top content + scroll-padding-top: calc(50px + 5rem); // nav bar + OS chooser +} + .extension-landing { &>div { padding: 4rem 0; diff --git a/src/components/extension-landing/extension-troubleshooting.jsx b/src/components/extension-landing/extension-troubleshooting.jsx index 7ca3df87c..7e168f1fa 100644 --- a/src/components/extension-landing/extension-troubleshooting.jsx +++ b/src/components/extension-landing/extension-troubleshooting.jsx @@ -13,7 +13,7 @@ const ExtensionTroubleshooting = props => { }; return ( -

diff --git a/src/components/extension-landing/install-scratch-link.jsx b/src/components/extension-landing/install-scratch-link.jsx index 6f7f3a03f..9c6418b6a 100644 --- a/src/components/extension-landing/install-scratch-link.jsx +++ b/src/components/extension-landing/install-scratch-link.jsx @@ -12,8 +12,7 @@ require('./extension-landing.scss'); // Assumes this will only be called with an OS that needs Scratch Link const InstallScratchLink = ({ currentOS, - hideScratchLink, - showEv3 + hideScratchLink }) => (
@@ -82,7 +81,7 @@ const InstallScratchLink = ({ }`} />

- {(showEv3 || !hideScratchLink) && @@ -102,15 +101,19 @@ const InstallScratchLink = ({ }} /> } - {showEv3 && - -
-
} -
} + + + ) + }} + /> + +
@@ -118,8 +121,7 @@ const InstallScratchLink = ({ InstallScratchLink.propTypes = { currentOS: PropTypes.string.isRequired, - hideScratchLink: PropTypes.bool, - showEv3: PropTypes.bool + hideScratchLink: PropTypes.bool }; module.exports = InstallScratchLink; diff --git a/src/l10n.json b/src/l10n.json index 004511f85..fb7ea7fb2 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -173,8 +173,8 @@ "installScratchLink.startScratchLink2.Windows": "If it does not appear, run Scratch Link from your Start menu.", "installScratchLink.learnMore.bodyText": "To learn more about Scratch Link, click {linkText}.", "installScratchLink.learnMore.linkText": "here", - "installScratchLink.ev3Workaround": "If you have issues connecting EV3 with Scratch Link 2.0, please try Scratch Link 1.4.", - "installScratchLink.downloadScratchLink1.4": "Direct download Scratch Link 1.4", + "installScratchLink.ifYouHaveTrouble.bodyText": "If you have trouble, see the {linkText} for tips.", + "installScratchLink.ifYouHaveTrouble.linkText": "Troubleshooting section", "parents.FaqAgeRangeA": "While Scratch is primarily designed for 8 to 16 year olds, it is also used by people of all ages, including younger children with their parents.", "parents.FaqAgeRangeQ": "What is the age range for Scratch?", @@ -451,6 +451,8 @@ "extensions.checkOSVersionTitle": "Make sure your operating system is compatible with Scratch Link", "extensions.checkOSVersionText": "The minimum operating system versions are listed at the top of this page. See instructions for checking your version of {winOSVersionLink} or {macOSVersionLink}.", "extensions.checkOsVersionText2": "If you are using macOS 12, please update to macOS 12.3 or newer. Earlier versions of macOS 12 do not work correctly with Scratch Link.", + "extensions.ev3TryScratchLink1.4": "If you have issues connecting EV3 with Scratch Link 2.0, please try Scratch Link 1.4.", + "extensions.downloadScratchLink1.4": "Download Scratch Link 1.4", "extensions.winOSVersionLinkText": "Windows", "extensions.macOSVersionLinkText": "macOS", "extensions.closeScratchCopiesTitle": "Close other copies of Scratch", diff --git a/src/views/download/scratch-link/download.jsx b/src/views/download/scratch-link/download.jsx index 94e7e4c0e..e85de5593 100644 --- a/src/views/download/scratch-link/download.jsx +++ b/src/views/download/scratch-link/download.jsx @@ -16,6 +16,7 @@ import ExtensionSection from '../../../components/extension-landing/extension-se import ExtensionTroubleshooting from '../../../components/extension-landing/extension-troubleshooting.jsx'; import InstallScratchLink from '../../../components/extension-landing/install-scratch-link.jsx'; +import OS_ENUM from '../../../lib/os-enum.js'; import {isDownloaded} from '../../../components/install-scratch/install-util.js'; import '../../../components/extension-landing/extension-landing.scss'; @@ -135,6 +136,12 @@ const ScratchLink = ({intl}) => { />

+

+

)}

diff --git a/src/views/ev3/ev3.jsx b/src/views/ev3/ev3.jsx index 480a69316..dc44c1084 100644 --- a/src/views/ev3/ev3.jsx +++ b/src/views/ev3/ev3.jsx @@ -288,6 +288,12 @@ class EV3 extends ExtensionLanding { > {isDownloaded(this.state.OS) && ( +

+

Date: Wed, 12 Jul 2023 15:16:18 -0700 Subject: [PATCH 5/6] fix: update browser compatibility text for Scratch Link 2.0 --- src/components/extension-landing/extension-troubleshooting.jsx | 2 +- src/l10n.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/extension-landing/extension-troubleshooting.jsx b/src/components/extension-landing/extension-troubleshooting.jsx index 7e168f1fa..c06ee17c2 100644 --- a/src/components/extension-landing/extension-troubleshooting.jsx +++ b/src/components/extension-landing/extension-troubleshooting.jsx @@ -22,7 +22,7 @@ const ExtensionTroubleshooting = props => { values={sharedValues} />

{props.children} diff --git a/src/l10n.json b/src/l10n.json index fb7ea7fb2..b37f402cf 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -447,7 +447,7 @@ "extensions.troubleshootingTitle": "Troubleshooting", "extensions.browserCompatibilityTitle": "Make sure your browser is compatible with Scratch Link", - "extensions.browserCompatibilityText": "Scratch Link 1.4 is not compatible with Safari. If you use macOS, please use another supported browser, such as Chrome or Firefox.", + "extensions.browserCompatibilityText2": "Scratch Link 1.4 is not compatible with Safari. If you use Safari, please upgrade to Scratch Link 2.0.", "extensions.checkOSVersionTitle": "Make sure your operating system is compatible with Scratch Link", "extensions.checkOSVersionText": "The minimum operating system versions are listed at the top of this page. See instructions for checking your version of {winOSVersionLink} or {macOSVersionLink}.", "extensions.checkOsVersionText2": "If you are using macOS 12, please update to macOS 12.3 or newer. Earlier versions of macOS 12 do not work correctly with Scratch Link.", From d5ce8aa5420a114d817927d358018efcde2eca17 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Fri, 14 Jul 2023 14:16:23 -0700 Subject: [PATCH 6/6] fix: remove EV3 info from Scratch Link page Based on feedback from Kevin B --- src/l10n.json | 2 -- src/views/download/scratch-link/download.jsx | 7 ------- src/views/ev3/ev3.jsx | 12 ++++++------ src/views/ev3/l10n.json | 2 ++ 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/l10n.json b/src/l10n.json index b37f402cf..225ee8f58 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -451,8 +451,6 @@ "extensions.checkOSVersionTitle": "Make sure your operating system is compatible with Scratch Link", "extensions.checkOSVersionText": "The minimum operating system versions are listed at the top of this page. See instructions for checking your version of {winOSVersionLink} or {macOSVersionLink}.", "extensions.checkOsVersionText2": "If you are using macOS 12, please update to macOS 12.3 or newer. Earlier versions of macOS 12 do not work correctly with Scratch Link.", - "extensions.ev3TryScratchLink1.4": "If you have issues connecting EV3 with Scratch Link 2.0, please try Scratch Link 1.4.", - "extensions.downloadScratchLink1.4": "Download Scratch Link 1.4", "extensions.winOSVersionLinkText": "Windows", "extensions.macOSVersionLinkText": "macOS", "extensions.closeScratchCopiesTitle": "Close other copies of Scratch", diff --git a/src/views/download/scratch-link/download.jsx b/src/views/download/scratch-link/download.jsx index e85de5593..94e7e4c0e 100644 --- a/src/views/download/scratch-link/download.jsx +++ b/src/views/download/scratch-link/download.jsx @@ -16,7 +16,6 @@ import ExtensionSection from '../../../components/extension-landing/extension-se import ExtensionTroubleshooting from '../../../components/extension-landing/extension-troubleshooting.jsx'; import InstallScratchLink from '../../../components/extension-landing/install-scratch-link.jsx'; -import OS_ENUM from '../../../lib/os-enum.js'; import {isDownloaded} from '../../../components/install-scratch/install-util.js'; import '../../../components/extension-landing/extension-landing.scss'; @@ -136,12 +135,6 @@ const ScratchLink = ({intl}) => { />

-

-

)}

diff --git a/src/views/ev3/ev3.jsx b/src/views/ev3/ev3.jsx index dc44c1084..cb9eb76e8 100644 --- a/src/views/ev3/ev3.jsx +++ b/src/views/ev3/ev3.jsx @@ -288,12 +288,6 @@ class EV3 extends ExtensionLanding { > {isDownloaded(this.state.OS) && ( -

-

+

+

)}

diff --git a/src/views/ev3/l10n.json b/src/views/ev3/l10n.json index 40e7c258c..f96468748 100644 --- a/src/views/ev3/l10n.json +++ b/src/views/ev3/l10n.json @@ -28,6 +28,8 @@ "ev3.troubleshootingTitle": "Troubleshooting", "ev3.checkOSVersionTitle": "Make sure your operating system is compatible with Scratch Link", "ev3.checkOSVersionText": "The minimum operating system versions are listed at the top of this page. See instructions for checking your version of {winOSVersionLink} or {macOSVersionLink}.", + "ev3.tryScratchLink1.4": "If you have issues connecting EV3 with Scratch Link 2.0, please try Scratch Link 1.4", + "ev3.downloadScratchLink1.4": "Download Scratch Link 1.4", "ev3.winOSVersionLinkText": "Windows", "ev3.macOSVersionLinkText": "macOS", "ev3.makeSurePairedTitle": "Make sure your computer is paired with your EV3",