Skip to content

Merge google/blockly, May 2017 #881

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

Merged
merged 396 commits into from
May 11, 2017

Conversation

paulkaplan
Copy link
Contributor

@paulkaplan paulkaplan commented May 8, 2017

In Progress

Merge google/blockly develop into scratch-blocks develop.

Issues that need to be sorted before merging:

  • webpack command does not properly build scratch-blocks for the GUI /cc @rschamp, error is Cannot find module "./shim/blockly_compressed_vertical-blocks_compressed
  • Fix duplicate function in core/workspace.js (allInputsFilled)
  • Fix duplicate function in core/field.js (getDisplayText_)

rachel-fenichel and others added 30 commits January 4, 2017 13:40
…drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. (scratchfoundation#805)
See thread in support group before merging.
…connect_under_flyout

Don't connect to blocks under the flyout.
…re-compiler-npm-module

Use the npm closure library
…dropdown field labels

Adding support for string table lookups in dropdown field labels specified in JSON.

Adds Blockly.utils.replaceMessageReferences() method to handle string replacement without interpolation tokens.  Effectively uses the same old code, now moved into tokenizeInterpolation_(), which takes a parseInterpolationTokens option.

Replaces the direct JavaScript references (not pure JSON, and thus not portable).

Demonstrating this behavior in the logic_boolean dropdown.
…/mirror_naming

Naming changes in mirror demo
This will be used to define constants accessible in JSON block definitions. Messages with descriptions that include `{{Notranslate}}` will not be included in the translation files sent to TranslateWiki. Instead, they are written to `msg/json/constants.json`, and later merged back into the `.js` files, similar to synonyms.

Template details: https://translatewiki.net/wiki/Template:Notranslate
…ratchfoundation#825)

String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
* Does nothing if useDragSurface_ is false.
* @private
*/
Blockly.BlockSvg.prototype.moveToDragSurface_ = function() {

This comment was marked as abuse.

* Does nothing if useDragSurface_ is false.
* @private
*/
Blockly.BlockSvg.prototype.moveOffDragSurface_ = function() {

This comment was marked as abuse.

* Used when the block is switching from 3d to 2d transform or vice versa.
* @private
*/
Blockly.BlockSvg.prototype.clearTransformAttributes_ = function() {

This comment was marked as abuse.

@@ -490,8 +491,8 @@ Blockly.Workspace.prototype.fireChangeListener = function(event) {
*/
Blockly.Workspace.prototype.getBlockById = function(id) {
var block = this.blockDB_[id];
if (!block && this.getFlyout() && this.getFlyout().getWorkspace()) {
block = this.getFlyout().getWorkspace().blockDB_[id];
if (!block && this.getFlyout_() && this.getFlyout_().getWorkspace()) {

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

core/block.js Outdated
@@ -1388,7 +1388,8 @@ Blockly.Block.newFieldImageFromJson_ = function(options) {
var height =
Number(Blockly.utils.replaceMessageReferences(options['height']));
var alt = Blockly.utils.replaceMessageReferences(options['alt']);
return new Blockly.FieldImage(src, width, height, alt);
var flip_rtl = Blockly.utils.replaceMessageReferences(options['flip_rtl']);

This comment was marked as abuse.

@thisandagain
Copy link
Contributor

thisandagain commented May 10, 2017

This is looking really good @paulkaplan. Thanks for pulling this together.

I am able to build and testing in both the horizontal and vertical playgrounds looks good so far. 👍

@rachel-fenichel
Copy link
Collaborator

Looks good to me as well, aside from the getFlyout_ issue that I pointed out (which can be resolved in a followup).

Make sure you squash it when you merge, please

@@ -235,12 +235,6 @@ Blockly.FieldAngle.prototype.setText = function(text) {
return;
}
this.updateGraph_();
// Insert degree symbol.

This comment was marked as abuse.

@paulkaplan paulkaplan merged commit 1827255 into scratchfoundation:develop May 11, 2017
@rachel-fenichel
Copy link
Collaborator

🎉

@thisandagain
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.