-
Notifications
You must be signed in to change notification settings - Fork 2
Changes necessary to resolve errors with RAISE Playground #235
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: modern-blockly
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,10 @@ | |
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /* BEGIN RG ADDITION */ | ||
| export * from "./colours"; | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is necessary as there's lots of places (one example) |
||
| /* END RG ADDITION */ | ||
|
|
||
| import * as Blockly from "blockly/core"; | ||
| import "./blocks/colour"; | ||
| import "./blocks/math"; | ||
|
|
@@ -20,7 +24,13 @@ import "./blocks/operators"; | |
| import "./blocks/procedures"; | ||
| import "./blocks/sensing"; | ||
| import "./blocks/sound"; | ||
| import * as scratchBlocksUtils from "./scratch_blocks_utils"; | ||
| /* BEGIN RG ADDITION */ | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is necessary because the https://github.com/scratchfoundation/scratch-gui/blob/develop/src/lib/blocks.js#L344 |
||
| import * as scratchBlocksUtilsModule from "./scratch_blocks_utils"; | ||
| const scratchBlocksUtils = { | ||
| ...scratchBlocksUtilsModule, | ||
| } | ||
| export { scratchBlocksUtils }; | ||
| /* END RG ADDITION */ | ||
| import * as ScratchVariables from "./variables"; | ||
| import "./css"; | ||
| import "./renderer/renderer"; | ||
|
|
@@ -70,7 +80,6 @@ export * from "./procedures"; | |
| export * from "../msg/scratch_msgs.js"; | ||
| export * from "./constants"; | ||
| export { glowStack }; | ||
| export { scratchBlocksUtils }; | ||
| export { CheckableContinuousFlyout }; | ||
| export { ScratchVariables }; | ||
| export { contextMenuItems }; | ||
|
|
@@ -81,6 +90,11 @@ export { | |
| StatusButtonState, | ||
| } from "./status_indicator_label"; | ||
|
|
||
| /* BEGIN RG ADDITION */ | ||
| import { StatusIndicatorLabel } from "./status_indicator_label"; | ||
| export { StatusIndicatorLabel as FlyoutExtensionCategoryHeader }; | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is necessary as https://github.com/scratchfoundation/scratch-gui/blob/develop/src/lib/blocks.js#L326 |
||
| /* END RG ADDITION */ | ||
|
|
||
| export function inject(container: Element, options: Blockly.BlocklyOptions) { | ||
| registerScratchFieldAngle(); | ||
| registerFieldColourSlider(); | ||
|
|
@@ -105,6 +119,7 @@ export function inject(container: Element, options: Blockly.BlocklyOptions) { | |
| metricsManager: ContinuousMetrics, | ||
| }, | ||
| }); | ||
|
|
||
| const workspace = Blockly.inject(container, options); | ||
|
|
||
| buildGlowFilter(workspace); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,19 +29,19 @@ export class ConstantProvider extends Blockly.zelos.ConstantProvider { | |
| } else { | ||
| const style = { | ||
| colourPrimary: | ||
| "colourQuaternary" in colour | ||
| "colourQuaternary" in colour && Boolean(colour.colourQuaternary) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Without these checks, I'd get lots of |
||
| ? `${colour.colourQuaternary}` | ||
| : colour.colourTertiary, | ||
| colourSecondary: | ||
| "colourQuaternary" in colour | ||
| "colourQuaternary" in colour && Boolean(colour.colourQuaternary) | ||
| ? `${colour.colourQuaternary}` | ||
| : colour.colourTertiary, | ||
| colourTertiary: | ||
| "colourQuaternary" in colour | ||
| "colourQuaternary" in colour && Boolean(colour.colourQuaternary) | ||
| ? `${colour.colourQuaternary}` | ||
| : colour.colourTertiary, | ||
| colourQuaternary: | ||
| "colourQuaternary" in colour | ||
| "colourQuaternary" in colour && Boolean(colour.colourQuaternary) | ||
| ? `${colour.colourQuaternary}` | ||
| : colour.colourTertiary, | ||
| hat: "", | ||
|
|
||
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.
This is necessary as
scratch-guiexpects this properties to exist onScratchBlocks.Coloursone example:
https://github.com/scratchfoundation/scratch-gui/blob/develop/src/lib/blocks.js#L70