Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/scratch-gui/src/components/gui/gui.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
background-color: $ui-primary;
}

.body-wrapper-without-menu-bar {
height: 100%;
}

.body-wrapper * {
box-sizing: border-box;
}
Expand Down
12 changes: 9 additions & 3 deletions packages/scratch-gui/src/components/gui/gui.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const GUIComponent = props => {
loading,
logo,
manuallySaveThumbnails,
menuBarHidden,
renderLogin,
onClickAbout,
onClickAccountNav,
Expand Down Expand Up @@ -176,6 +177,9 @@ const GUIComponent = props => {

return (<MediaQuery minWidth={layout.fullSizeMinWidth}>{isFullSize => {
const stageSize = resolveStageSize(stageSizeMode, isFullSize);
const boxStyles = classNames(styles.bodyWrapper, {
[styles.bodyWrapperWithoutMenuBar]: menuBarHidden
});

return isPlayerOnly ? (
<StageWrapper
Expand Down Expand Up @@ -255,7 +259,7 @@ const GUIComponent = props => {
onRequestClose={onRequestCloseBackdropLibrary}
/>
) : null}
<MenuBar
{!menuBarHidden && <MenuBar
accountNavOpen={accountNavOpen}
authorId={authorId}
authorThumbnailUrl={authorThumbnailUrl}
Expand Down Expand Up @@ -290,8 +294,8 @@ const GUIComponent = props => {
userOwnsProject={userOwnsProject}
username={username}
accountMenuOptions={accountMenuOptions}
/>
<Box className={styles.bodyWrapper}>
/>}
<Box className={boxStyles}>
<Box className={styles.flexWrapper}>
<Box className={styles.editorWrapper}>
<Tabs
Expand Down Expand Up @@ -465,6 +469,7 @@ GUIComponent.propTypes = {
loading: PropTypes.bool,
logo: PropTypes.string,
manuallySaveThumbnails: PropTypes.bool,
menuBarHidden: PropTypes.bool,
onActivateCostumesTab: PropTypes.func,
onActivateSoundsTab: PropTypes.func,
onActivateTab: PropTypes.func,
Expand Down Expand Up @@ -527,6 +532,7 @@ GUIComponent.defaultProps = {
isShared: false,
isTotallyNormal: false,
loading: false,
menuBarHidden: false,
showComingSoon: false,
stageSizeMode: STAGE_SIZE_MODES.large,
useExternalPeripheralList: false
Expand Down
4 changes: 4 additions & 0 deletions packages/scratch-gui/src/exported-reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
onFetchedProjectData,
onLoadedProject,
defaultProjectId,
manualUpdateProject,
remixProject,
requestNewProject,
requestProjectUpload,
Expand All @@ -18,6 +19,7 @@ import {
closeLoadingProject,
openTelemetryModal
} from './reducers/modals.js';
import {setStageSize} from './reducers/stage-size';

export const guiReducers = {
locales: LocalesReducer,
Expand All @@ -30,10 +32,12 @@ export {
onFetchedProjectData,
onLoadedProject,
defaultProjectId,
manualUpdateProject,
remixProject,
requestNewProject,
requestProjectUpload,
setProjectId,
setStageSize,

openLoadingProject,
closeLoadingProject,
Expand Down
1 change: 0 additions & 1 deletion packages/scratch-gui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {legacyConfig} from './legacy-config';
export {default} from './containers/gui.jsx';
export {default as GUIComponent} from './components/gui/gui.jsx';
export {default as AppStateHOC} from './lib/app-state-hoc.jsx';
export {remixProject} from './reducers/project-state.js';
export {setAppElement} from 'react-modal';

export {legacyConfig};
Expand Down