-
Notifications
You must be signed in to change notification settings - Fork 524
[Blockly] Remove references to Google #70191
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
Conversation
This reverts commit bfd59c2.
StudioApp.loadBlocks is no longer additive
| } | ||
| textBlocks = Blockly.Xml.domToText(xml); | ||
| } | ||
| textBlocks = Blockly.cdoUtils.getCode(Blockly.mainBlockSpace); |
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 can be greatly simplified now that we do not need the entire else clause. This logic was necessary with the fork because invisible procedure blocks were present on the main workspace, which could potentially pollute the saved toolbox blocks. Now that these blocks are on the hidden workspace, we can simplify get the XML code for the main workspace.
| * object without affecting apps code. | ||
| * This wrapper will contain all of our customizations to Google Blockly. | ||
| * See also ./cdoBlocklyWrapper.js | ||
| * Wrapper class for https://github.com/RaspberryPiFoundation/blockly |
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.
There are lots of links to github.com/google/blockly in our repo, all of which redirect correctly to /RaspberryPiFoundation/. I only updated a few here that are for live documentation. Most of these links are permalinks to specific code for reference so I did not update them.
| afterEach(() => { | ||
| // Reset Blockly for other tests. | ||
| Blockly = cdoBlockly; // eslint-disable-line no-global-assign | ||
| Blockly = globalBlockly; // eslint-disable-line no-global-assign |
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 may not actually be needed, but I didn't confirm yet. The reset was necessary when tests would alternate between levels that used different versions of Blockly. I found lots of little things like this that can potentially be further cleaned up, but I didn't want to expand the scope of this PR too greatly.
| simulateDrag: function() { | ||
| if ( | ||
| window.Blockly && | ||
| Blockly.version === "Google" && |
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 change was important to make sure we can continue to use pointer events for simulated block drags in UI tests.
hannahbergam
left a comment
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.
I did a skim, but trust that our build would help catch any naming issues! This is so exciting!
Now that we have completely unforked and removed support for CDO Blockly #70175, referring to the single remaining support version as "Google Blockly" has become redundant. Furthermore, Blockly now lives at Raspberry Pi Foundation, not Google, as of November.
This PR aims to clarify and simplify things in that regard, although there will still be more work to do.
Despite the large number of files changed, this is mostly straight forward:
blockly/coreinstances will change fromGoogleBlocklytoBlocklyCore. (Note thatBlocklystill refers to the wrapper instance in most places, so that name is not readily available.customBlocks/googleBlockly/will be moved up a level tocustomBlocks/. (The siblingcustomBlocks/cdoBlocklydirectory of utils has already been deleted.).versionproperty (value'Google') has been removed. Small changes were also made in a couple of places that made decisions based on that value. These are tagged in line.Follow-up work
Privacy
Security
Caching
PR Creation Checklist: