Skip to content

Commit d1024cd

Browse files
authored
Merge pull request #3460 from benjiwheeler/show-coming-soon
added showComingSoon flag prop for gui
2 parents 0458332 + 2fb61af commit d1024cd

File tree

4 files changed

+64
-52
lines changed

4 files changed

+64
-52
lines changed

src/components/gui/gui.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ const GUIComponent = props => {
9292
onSeeCommunity,
9393
onShare,
9494
previewInfoVisible,
95-
targetIsStage,
95+
showComingSoon,
9696
soundsTabVisible,
9797
stageSizeMode,
98+
targetIsStage,
9899
tipsLibraryVisible,
99100
vm,
100101
...componentProps
@@ -178,6 +179,7 @@ const GUIComponent = props => {
178179
className={styles.menuBarPosition}
179180
enableCommunity={enableCommunity}
180181
renderLogin={renderLogin}
182+
showComingSoon={showComingSoon}
181183
onClickAccountNav={onClickAccountNav}
182184
onCloseAccountNav={onCloseAccountNav}
183185
onLogOut={onLogOut}
@@ -351,6 +353,7 @@ GUIComponent.propTypes = {
351353
onUpdateProjectTitle: PropTypes.func,
352354
previewInfoVisible: PropTypes.bool,
353355
renderLogin: PropTypes.func,
356+
showComingSoon: PropTypes.bool,
354357
soundsTabVisible: PropTypes.bool,
355358
stageSizeMode: PropTypes.oneOf(Object.keys(STAGE_SIZE_MODES)),
356359
targetIsStage: PropTypes.bool,
@@ -369,6 +372,7 @@ GUIComponent.defaultProps = {
369372
canSaveAsCopy: false,
370373
canShare: false,
371374
onUpdateProjectTitle: () => {},
375+
showComingSoon: false,
372376
stageSizeMode: STAGE_SIZE_MODES.large
373377
};
374378

src/components/menu-bar/menu-bar.jsx

Lines changed: 58 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -298,39 +298,39 @@ class MenuBar extends React.Component {
298298
>
299299
{newProjectMessage}
300300
</MenuItem>
301-
) : (
301+
) : (this.props.showComingSoon ? (
302302
<MenuItemTooltip
303303
id="new"
304304
isRtl={this.props.isRtl}
305305
>
306306
<MenuItem>{newProjectMessage}</MenuItem>
307307
</MenuItemTooltip>
308-
)}
308+
) : [])}
309309
<MenuSection>
310310
{this.props.canSave ? (
311311
<MenuItem onClick={this.handleClickSave}>
312312
{saveNowMessage}
313313
</MenuItem>
314-
) : (
314+
) : (this.props.showComingSoon ? (
315315
<MenuItemTooltip
316316
id="save"
317317
isRtl={this.props.isRtl}
318318
>
319319
<MenuItem>{saveNowMessage}</MenuItem>
320320
</MenuItemTooltip>
321-
)}
321+
) : [])}
322322
{this.props.canSaveAsCopy ? (
323323
<MenuItem onClick={this.handleClickSaveAsCopy}>
324324
{saveAsCopyMessage}
325325
</MenuItem>
326-
) : (
326+
) : (this.props.showComingSoon ? (
327327
<MenuItemTooltip
328328
id="copy"
329329
isRtl={this.props.isRtl}
330330
>
331331
<MenuItem>{saveAsCopyMessage}</MenuItem>
332332
</MenuItemTooltip>
333-
)}
333+
) : [])}
334334
</MenuSection>
335335
<MenuSection>
336336
<SBFileUploader onUpdateProjectTitle={this.props.onUpdateProjectTitle}>
@@ -438,13 +438,15 @@ class MenuBar extends React.Component {
438438
</div>
439439
<div className={classNames(styles.menuBarItem)}>
440440
{this.props.canShare ? shareButton : (
441-
<MenuBarItemTooltip id="share-button">
442-
{shareButton}
443-
</MenuBarItemTooltip>
441+
this.props.showComingSoon ? (
442+
<MenuBarItemTooltip id="share-button">
443+
{shareButton}
444+
</MenuBarItemTooltip>
445+
) : []
444446
)}
445447
</div>
446448
<div className={classNames(styles.menuBarItem, styles.communityButtonWrapper)}>
447-
{this.props.enableCommunity ?
449+
{this.props.enableCommunity ? (
448450
<Button
449451
className={classNames(styles.communityButton)}
450452
iconClassName={styles.communityButtonIcon}
@@ -456,7 +458,8 @@ class MenuBar extends React.Component {
456458
description="Label for see community button"
457459
id="gui.menuBar.seeCommunity"
458460
/>
459-
</Button> :
461+
</Button>
462+
) : (this.props.showComingSoon ? (
460463
<MenuBarItemTooltip id="community-button">
461464
<Button
462465
className={classNames(styles.communityButton)}
@@ -470,7 +473,7 @@ class MenuBar extends React.Component {
470473
/>
471474
</Button>
472475
</MenuBarItemTooltip>
473-
}
476+
) : [])}
474477
</div>
475478
</div>
476479

@@ -572,44 +575,48 @@ class MenuBar extends React.Component {
572575
</Button>
573576
</a>
574577
</div>
575-
<MenuBarItemTooltip id="mystuff">
576-
<div
577-
className={classNames(
578-
styles.menuBarItem,
579-
styles.hoverable,
580-
styles.mystuffButton
581-
)}
582-
>
583-
<img
584-
className={styles.mystuffIcon}
585-
src={mystuffIcon}
586-
/>
587-
</div>
588-
</MenuBarItemTooltip>
589-
<MenuBarItemTooltip
590-
id="account-nav"
591-
place={this.props.isRtl ? 'right' : 'left'}
592-
>
593-
<div
594-
className={classNames(
595-
styles.menuBarItem,
596-
styles.hoverable,
597-
styles.accountNavMenu
598-
)}
599-
>
600-
<img
601-
className={styles.profileIcon}
602-
src={profileIcon}
603-
/>
604-
<span>
605-
{'scratch-cat'}
606-
</span>
607-
<img
608-
className={styles.dropdownCaretIcon}
609-
src={dropdownCaret}
610-
/>
611-
</div>
612-
</MenuBarItemTooltip>
578+
{this.props.showComingSoon ? (
579+
<React.Fragment>
580+
<MenuBarItemTooltip id="mystuff">
581+
<div
582+
className={classNames(
583+
styles.menuBarItem,
584+
styles.hoverable,
585+
styles.mystuffButton
586+
)}
587+
>
588+
<img
589+
className={styles.mystuffIcon}
590+
src={mystuffIcon}
591+
/>
592+
</div>
593+
</MenuBarItemTooltip>
594+
<MenuBarItemTooltip
595+
id="account-nav"
596+
place={this.props.isRtl ? 'right' : 'left'}
597+
>
598+
<div
599+
className={classNames(
600+
styles.menuBarItem,
601+
styles.hoverable,
602+
styles.accountNavMenu
603+
)}
604+
>
605+
<img
606+
className={styles.profileIcon}
607+
src={profileIcon}
608+
/>
609+
<span>
610+
{'scratch-cat'}
611+
</span>
612+
<img
613+
className={styles.dropdownCaretIcon}
614+
src={dropdownCaret}
615+
/>
616+
</div>
617+
</MenuBarItemTooltip>
618+
</React.Fragment>
619+
) : []}
613620
</React.Fragment>
614621
)}
615622
</div>
@@ -656,6 +663,7 @@ MenuBar.propTypes = {
656663
onUpdateProjectTitle: PropTypes.func,
657664
renderLogin: PropTypes.func,
658665
sessionExists: PropTypes.bool,
666+
showComingSoon: PropTypes.bool,
659667
username: PropTypes.string
660668
};
661669

src/containers/gui.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ GUI.propTypes = {
109109
isShowingProject: PropTypes.bool,
110110
loadingError: PropTypes.bool,
111111
loadingStateVisible: PropTypes.bool,
112-
onChangeProjectInfo: PropTypes.func,
113112
onSeeCommunity: PropTypes.func,
114113
onUpdateProjectId: PropTypes.func,
115114
onUpdateProjectTitle: PropTypes.func,

src/playground/render-gui.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default appTarget => {
3939

4040
ReactDOM.render(
4141
<WrappedGui
42+
showComingSoon
4243
backpackOptions={backpackOptions}
4344
/>,
4445
appTarget);

0 commit comments

Comments
 (0)