-
Notifications
You must be signed in to change notification settings - Fork 35
RaspberryPiFoundation feature enhancements #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
RaspberryPiFoundation feature enhancements #262
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
The remixProject reducer is already being exported from the `src/exported-reducers.ts` file which makes this export redundant.
The MenuBar is quite specific to the canonical version of the online Scratch editor [1]. In RaspberryPiFoundation projects we want to make use of the scratch-gui package without displaying the MenuBar. The MenuBar can be hidden by passing in the `menuBarHidden` prop. Since the height of the menu bar is hard-coded as a CSS variable, I've had to override the height calculation for the body wrapper when the menu bar is not visible. Ideally the height of the menu bar wouldn't be hard-coded and this wouldn't be necessary. We were unable to find an existing unit test for the Gui component and so we have not added any test coverage around the new `menuBarHidden` prop. [1]: https://scratch.mit.edu/projects/editor Co-authored-by: James Mead <[email protected]>
This will allow us to trigger the saving of a project from outside the GUI component. Co-authored-by: James Mead <[email protected]>
This will allow us to override the default stage size or change the stage size from outside of the GUI component.
e60adaa
to
440fcaf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question about remixProject
; if there's a good reason for that change, then this looks great! Otherwise, it looks 99% great ;)
Either way, thank you for sharing your work!
@cwillisf thanks for taking a look. Sorry for the confusion I explained my reasoning in the individual commits but did not mention them in the PR description. I have also responded to your query inline on the diff. |
Proposed Changes
This pull request includes a number of changes from the RaspberryPiFoundation fork of scratch-gui:
remixProject
exportmenuBarHidden
prop).manualUpdateProject
reducer action.setStageSize
reducer action.Reason for Changes
We maintain a number of forks of scratch-gui across the RaspberryPiFoundation which we are looking at rationalising. We believe that these particular changes could be useful for other people and therefore would be keen to get these features merged upstream.
Test Coverage
We were unable to find an existing unit test for the Gui component and so we have not added any test coverage around the new
menuBarHidden
prop.