Repository navigation
Update to Blockly 13 - #4069
Update to Blockly 13#4069
Conversation
|
@mjgallag I'm marking this as for-ai2-test so we can get some additional eyes on the update. |
|
@ewpatton Sounds good, that'll get more eyes on it then throwing my test instance out there. FYI @jisqyv I'm going to update it to https://github.com/RaspberryPiFoundation/blockly/releases/tag/blockly-v13.3.0 today as might as well do that before it goes to ai2-test. |
RaspberryPiFoundation/blockly@59fab94 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L217-L219 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/renderers/common/constants.ts#L254 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/renderers/common/constants.ts#L1166-L1171 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/renderers/common/constants.ts#L1172-L1175 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/renderers/common/constants.ts#L1187-L1191
https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L148-L152 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L160-L162 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L189-L193 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L195-L197 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L205-L208 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L234-L239 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L301-L304 https://github.com/RaspberryPiFoundation/blockly/blob/blockly-v12.5.1/packages/blockly/core/css.ts#L345-L347
Stage the BlocklyPanel element in a hidden div before initializing the workspace. GWT later moves it into the ProjectEditor deck when the editor is added. Blockly measures a hidden workspace using computed CSS, which requires the workspace element to be attached to the document. RaspberryPiFoundation/blockly#8572
Removes staging of BlocklyPanel element in a hidden div before initializing the workspace workaround.
367f7da to
d11f73c
Compare
|
@ewpatton I'm not seeing things as black... (I'm not in dark mode) |
| @@ -0,0 +1,57 @@ | |||
| import type { FlyoutItem } from '../flyout_item.js'; | |||
There was a problem hiding this comment.
Interestingly, this file doesn't include a copyright / license header?
| @@ -0,0 +1,151 @@ | |||
| import type { IDraggable } from '../interfaces/i_draggable.js'; | |||
There was a problem hiding this comment.
Another .d.ts file lacking documentation.
| @@ -0,0 +1,26 @@ | |||
| import type { IBoundedElement } from './interfaces/i_bounded_element.js'; | |||
| BlockSelectorBox.getBlockSelectorBox().addBlockDrawerSelectionListener(this); | ||
|
|
||
| designer = (T) projectEditor.getFileEditor(blocksNode.getEntityName(), DesignerEditor.EDITOR_TYPE); | ||
| formToBlocksEditor.put(entityName, this); |
There was a problem hiding this comment.
I don't understand why we need to delay setting up the mapping until after load. Can you clarify why this is needed? It is true here as well as being true inLoad, so delaying it seems like it could only introduce problems.
| } | ||
|
|
||
| @Override | ||
| protected void onWorkspaceInitialized() { |
There was a problem hiding this comment.
For sanity's sake, we should still call super despite it currently being a no-op, in case in the future we do add onWorkspaceInitialized behavior in the parent in the future. GWT will optimize it out for now.
| int pos = Collections.binarySearch(fileIds, newBlocksEditor.getFileId(), | ||
| getFileIdComparator()); | ||
| if (pos < 0) { | ||
| pos = -pos - 1; | ||
| } | ||
| insertFileEditor(newBlocksEditor, pos); | ||
| } |
There was a problem hiding this comment.
Likely something to defer given how old this code is, but given that ProjectEditor has knowledge of fileIds, I wonder why we don't just move the logic of finding the position, etc. into insertFileEditor rather than having the subclass do the work.
| String fileId = fileEditor.getFileId(); | ||
| openFileEditors.put(fileId, fileEditor); | ||
| fileIds.add(beforeIndex, fileId); | ||
| fileIds.add(beforeIndex, fileEditor.getFileId()); |
There was a problem hiding this comment.
See my comments on YaProjectEditor about insert/open files and how we handle the responsibility of these things.
ewpatton
left a comment
There was a problem hiding this comment.
I am approving this but I did leave a bunch of minor comments for us to think about.
@jisqyv @mjgallag On ai2a, I see the following CSS rule: geras2_renderer-renderer.classic-theme .blocklyFieldParameter > rect {
fill: rgb(222, 143, 108);
fill-opacity: 1.0;
stroke-width: 2;
stroke: rgb(231, 175, 150);
}but I see no similar application on ai2-test. |
|
I should also note that this is marked as an inline rule, so it's being injected by something, presumably the lexical variable plugin given the context. |
|
@ewpatton your picture isn’t loading. |
|
@mjgallag It's a quoted picture from Jeff's earlier comment. Regardless, what I'm (not) seeing is the injected stylesheet for geras2 from the lexvar plugin (I think). I see that the injection div has the right class (i.e., |
|
Never mind. It appears to be a dark mode bug. After switching ai2a to dark mode I have replicated the problem in prod. |
|
So to summarize, in light mode I see the light orange in both ai2a and ai2-test, but when I switch to dark mode the parameters/flydowns end up with a black background. I'd suggest filing this as an issue and accepting the PR as is. |




What does this PR accomplish?
Description
What does this PR accomplish?
josmas/blockly-plugins#6
mit-cml/blockly-plugins#88
mit-cml/workspace-multiselect#154
I had to map all of the single letter shortcuts due to typeblocking. I went with option/alt as it seemed to lack system conflicts.
Note the Blockly keyboard shortcut help dialog we had in 12 is not in 13 as Blockly did not move it into core from https://github.com/raspberrypifoundation/blockly-keyboard-experimentation.
Context for the changes
If this PR changes anything related to the companion make sure you have used the
ucrbranch. For all other changes usemasteror provide context for having used a different branch.See a summary of git branches in the docs: App Inventor Developer Overview
If your code changes how something works on the device (i.e., it affects the companion):
I have made no changes that affect the companion
I branched from
ucrMy pull request has
ucras the baseFurther, if you've changed the blocks language or another user-facing designer/blocks API (added a SimpleProperty, etc.):
For all other changes:
I have made no changes that affect the master branch
I branched from
masterMy pull request has
masteras the baseGeneral items:
ant testspasses on my machine