rename isEmbedded

Liked @paulkaplan’s suggestion that the property get renamed `showBranding` as we use ‘embedded’ in multiple ways that would get confusing.

The embedded project view is ‘playerOnly’, ‘fullscreen’ and ‘showBranding’.
This commit is contained in:
chrisgarrity committed 2018-12-05 15:23:06 -05:00
1 parent e1808275c0
commit ad328c065e
4 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -49,7 +49,6 @@ const messages = defineMessages({
const StageHeaderComponent = function (props) {
const {
isEmbedded,
isFullScreen,
isPlayerOnly,
onKeyPress,
@@ -57,6 +56,7 @@ const StageHeaderComponent = function (props) {
onSetStageSmall,
onSetStageFull,
onSetStageUnFull,
showBranding,
stageSizeMode,
vm
} = props;
@@ -65,7 +65,7 @@ const StageHeaderComponent = function (props) {
if (isFullScreen) {
const stageDimensions = getStageDimensions(null, true);
const stageButton = isEmbedded ? (
const stageButton = showBranding ? (
<div className={styles.embedScratchLogo}>
<a
href="https://scratch.mit.edu"
@@ -182,7 +182,6 @@ const mapStateToProps = state => ({
StageHeaderComponent.propTypes = {
intl: intlShape,
isEmbedded: PropTypes.bool.isRequired,
isFullScreen: PropTypes.bool.isRequired,
isPlayerOnly: PropTypes.bool.isRequired,
onKeyPress: PropTypes.func.isRequired,
@@ -190,6 +189,7 @@ StageHeaderComponent.propTypes = {
onSetStageLarge: PropTypes.func.isRequired,
onSetStageSmall: PropTypes.func.isRequired,
onSetStageUnFull: PropTypes.func.isRequired,
showBranding: PropTypes.bool.isRequired,
stageSizeMode: PropTypes.oneOf(Object.keys(STAGE_SIZE_MODES)),
vm: PropTypes.instanceOf(VM).isRequired
};
+2 -2
View File
@@ -43,17 +43,17 @@ class StageHeader extends React.Component {
}
StageHeader.propTypes = {
isEmbedded: PropTypes.bool,
isFullScreen: PropTypes.bool,
isPlayerOnly: PropTypes.bool,
onSetStageUnFull: PropTypes.func.isRequired,
showBranding: PropTypes.bool,
stageSizeMode: PropTypes.oneOf(Object.keys(STAGE_SIZE_MODES)),
vm: PropTypes.instanceOf(VM).isRequired
};
const mapStateToProps = state => ({
stageSizeMode: state.scratchGui.stageSize.stageSize,
isEmbedded: state.scratchGui.mode.isEmbedded,
showBranding: state.scratchGui.mode.showBranding,
isFullScreen: state.scratchGui.mode.isFullScreen,
isPlayerOnly: state.scratchGui.mode.isPlayerOnly
});
+1 -1
View File
@@ -88,7 +88,7 @@ const initEmbedded = function (currentState) {
{},
currentState,
{mode: {
isEmbedded: true,
showBranding: true,
isFullScreen: true,
isPlayerOnly: true,
hasEverEnteredEditor: false
+1 -1
View File
@@ -2,7 +2,7 @@ const SET_FULL_SCREEN = 'scratch-gui/mode/SET_FULL_SCREEN';
const SET_PLAYER = 'scratch-gui/mode/SET_PLAYER';
const initialState = {
isEmbedded: false,
showBranding: false,
isFullScreen: false,
isPlayerOnly: false,
hasEverEnteredEditor: true