Merge pull request #9728 from scratchfoundation/onboarding-integration

Onboarding integration
This commit is contained in:
Miroslav Dionisiev 2024-11-08 14:35:24 +02:00 committed by GitHub
commit 4924b9519a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -690,7 +690,7 @@ class MenuBar extends React.Component {
<div className={styles.fileGroup}> <div className={styles.fileGroup}>
<div <div
aria-label={this.props.intl.formatMessage(ariaMessages.tutorials)} aria-label={this.props.intl.formatMessage(ariaMessages.tutorials)}
className={classNames(styles.menuBarItem, styles.hoverable)} className={classNames(styles.menuBarItem, styles.hoverable, 'tutorials-button')}
onClick={this.props.onOpenTipLibrary} onClick={this.props.onOpenTipLibrary}
> >
<img <img

View File

@ -72,6 +72,9 @@ class GUI extends React.Component {
// At this time the project view in www doesn't need to know when a project is unloaded // At this time the project view in www doesn't need to know when a project is unloaded
this.props.onProjectLoaded(); this.props.onProjectLoaded();
} }
if (this.props.shouldStopProject && !prevProps.shouldStopProject) {
this.props.vm.stopAll();
}
} }
render () { render () {
if (this.props.isError) { if (this.props.isError) {
@ -130,6 +133,7 @@ GUI.propTypes = {
onVmInit: PropTypes.func, onVmInit: PropTypes.func,
projectHost: PropTypes.string, projectHost: PropTypes.string,
projectId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), projectId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
shouldStopProject: PropTypes.bool,
telemetryModalVisible: PropTypes.bool, telemetryModalVisible: PropTypes.bool,
vm: PropTypes.instanceOf(VM).isRequired vm: PropTypes.instanceOf(VM).isRequired
}; };

View File

@ -6,6 +6,7 @@ import {ScratchPaintReducer} from 'scratch-paint';
import {setFullScreen, setPlayer} from './reducers/mode'; import {setFullScreen, setPlayer} from './reducers/mode';
import {remixProject} from './reducers/project-state'; import {remixProject} from './reducers/project-state';
import {setAppElement} from 'react-modal'; import {setAppElement} from 'react-modal';
import {activateDeck} from './reducers/cards.js';
const guiReducers = { const guiReducers = {
locales: LocalesReducer, locales: LocalesReducer,
@ -27,5 +28,6 @@ export {
localesInitialState, localesInitialState,
remixProject, remixProject,
setFullScreen, setFullScreen,
setPlayer setPlayer,
activateDeck
}; };