Skip to content

Commit b723be4

Browse files
committed
Set stage size initialState to small
This change means that Scratch starts with the stage (where users can run their code) in the "small" mode. They can then toggle to "large" or "fullscreen". The reason for this change is to make the scratch interface we embed in Experience CS more suitable for narrower screens, where we still need to leave room for the instruction panel next to Scratch. I considered making a more extensive modification to gui.jsx[1] where it calls `resolveStageSize` to take into account the size of the containing element, rather than the size of the screen/browser window (I think this code will have been written with the assumption that Scratch is taking over the whole viewport). In the end I decided against this - it'd be a more invasive change and one that would probably require quite a bit more testing and longer-term maintainance in case of upstream changes. Given that the user has the option to toggle to a larger stage themselves, I think for now this very small change to the default is preferable. [1] https://github.com/RaspberryPiFoundation/scratch-gui/blob/a226c7a6ed58bc4b3b25bbb9bce40db5d328b7d1/src/components/gui/gui.jsx#L147
1 parent a226c7a commit b723be4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/reducers/stage-size.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {STAGE_DISPLAY_SIZES} from '../lib/layout-constants.js';
33
const SET_STAGE_SIZE = 'scratch-gui/StageSize/SET_STAGE_SIZE';
44

55
const initialState = {
6-
stageSize: STAGE_DISPLAY_SIZES.large
6+
stageSize: STAGE_DISPLAY_SIZES.small
77
};
88

99
const reducer = function (state, action) {

0 commit comments

Comments
 (0)