Merge pull request #7764 from cwillisf/move-running-check-to-troubleshooting

fix: move the 'if Scratch Link is not running' advice into the Troubleshooting section
This commit is contained in:
Christopher Willis-Ford 2023-07-31 12:20:20 -07:00 committed by GitHub
commit 06af1a04a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 18 deletions

View file

@ -4,6 +4,9 @@ const React = require('react');
const ExtensionSection = require('./extension-section.jsx');
const OS_ENUM = require('../../lib/os-enum.js');
const {isDownloaded} = require('../install-scratch/install-util.js');
// TODO: after the Scratch Conference 2022, migrate from the individual extension landing pages all the
// troubleshooting steps which are common to all extensions.
const ExtensionTroubleshooting = props => {
@ -17,6 +20,16 @@ const ExtensionTroubleshooting = props => {
id="extensions.troubleshootingTitle"
values={sharedValues}
/></h2>
{(isDownloaded(props.currentOS)) && (<React.Fragment>
<h3 className="faq-title"><FormattedMessage
id="extensions.scratchLinkRunning"
values={sharedValues}
/></h3>
<p><FormattedMessage
id={`extensions.startScratchLink.${
props.currentOS === OS_ENUM.WINDOWS ? 'Windows' : 'macOS'
}`}
/></p>
<h3 className="faq-title"><FormattedMessage
id="extensions.browserCompatibilityTitle"
values={sharedValues}
@ -24,7 +37,7 @@ const ExtensionTroubleshooting = props => {
<p><FormattedMessage
id="extensions.browserCompatibilityText"
values={sharedValues}
/></p>
/></p></React.Fragment>)}
{props.children}
{!props.scratchLinkOnly && (
<React.Fragment>
@ -44,6 +57,7 @@ const ExtensionTroubleshooting = props => {
ExtensionTroubleshooting.propTypes = {
children: PropTypes.node,
currentOS: PropTypes.string.isRequired,
deviceName: PropTypes.string.isRequired,
deviceNameShort: PropTypes.string,
scratchLinkOnly: PropTypes.bool

View file

@ -75,11 +75,6 @@ const InstallScratchLink = ({
}-toolbar.png`}
/>
</span>
<p className="step-description"><FormattedMessage
id={`installScratchLink.startScratchLink2.${
currentOS === OS_ENUM.WINDOWS ? 'Windows' : 'macOS'
}`}
/></p>
</Step>
<Step
compact

View file

@ -169,8 +169,6 @@
"installScratchLink.downloadAndInstall": "Download and install Scratch Link.",
"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",
"installScratchLink.ifYouHaveTrouble.bodyText": "If you have trouble, see the {linkText} for tips.",
@ -446,6 +444,9 @@
"helpWidget.confirmation": "Thank you for your message.",
"extensions.troubleshootingTitle": "Troubleshooting",
"extensions.scratchLinkRunning": "Make sure Scratch Link is running",
"extensions.startScratchLink.macOS": "If Scratch Link does not appear in your menu bar, run Scratch Link from your Applications folder.",
"extensions.startScratchLink.Windows": "If Scratch Link does not appear in your notification area (system tray), run Scratch Link from your Start menu.",
"extensions.browserCompatibilityTitle": "Make sure your browser is compatible with Scratch Link",
"extensions.browserCompatibilityText": "Scratch Link is compatible with most browsers on macOS and Windows. For Safari, please update to Scratch Link 2.x, Safari 14 or newer, and macOS 10.15 or newer.",
"extensions.checkOSVersionTitle": "Make sure your operating system is compatible with Scratch Link",

View file

@ -193,7 +193,10 @@ class Boost extends ExtensionLanding {
/>
</Steps>
</ExtensionSection>
<ExtensionTroubleshooting deviceName="BOOST">
<ExtensionTroubleshooting
currentOS={this.state.OS}
deviceName="BOOST"
>
{isDownloaded(this.state.OS) && (
<React.Fragment>
<h3 className="faq-title"><FormattedMessage id="boost.updateScratchLinkTitle" /></h3>

View file

@ -103,6 +103,7 @@ const ScratchLink = ({intl}) => {
</div>
</ExtensionSection>
<ExtensionTroubleshooting
currentOS={os}
deviceName={intl.formatMessage({id: 'scratchLink.headerTitle'})}
scratchLinkOnly
>

View file

@ -283,6 +283,7 @@ class EV3 extends ExtensionLanding {
</Steps>
</ExtensionSection>
<ExtensionTroubleshooting
currentOS={this.state.OS}
deviceName="EV3"
scratchLinkOnly // EV3 is Bluetooth Classic so it's only available through Scratch Link
>

View file

@ -207,6 +207,7 @@ class GdxFor extends ExtensionLanding {
</Steps>
</ExtensionSection>
<ExtensionTroubleshooting
currentOS={this.state.OS}
deviceName={this.props.intl.formatMessage({id: 'gdxfor.deviceName'})}
deviceNameShort={this.props.intl.formatMessage({id: 'gdxfor.deviceNameShort'})}
>

View file

@ -319,7 +319,10 @@ class MicroBit extends ExtensionLanding {
</FlexRow>
<hr />
</ExtensionSection>
<ExtensionTroubleshooting deviceName="micro:bit">
<ExtensionTroubleshooting
currentOS={this.state.OS}
deviceName="micro:bit"
>
{isDownloaded(this.state.OS) && (
<React.Fragment>
<h3 className="faq-title"><FormattedMessage id="microbit.checkOSVersionTitle" /></h3>

View file

@ -192,7 +192,10 @@ class Wedo2 extends ExtensionLanding {
/>
</Steps>
</ExtensionSection>
<ExtensionTroubleshooting deviceName="WeDo 2.0">
<ExtensionTroubleshooting
currentOS={this.state.OS}
deviceName="WeDo 2.0"
>
{isDownloaded(this.state.OS) && (
<React.Fragment>
<h3 className="faq-title"><FormattedMessage id="wedo2.checkOSVersionTitle" /></h3>