From c75e944f06ccec62e14dec7c371b7f09551ffdec Mon Sep 17 00:00:00 2001 From: Rachel Fenichel Date: Fri, 5 Nov 2021 18:28:52 -0700 Subject: [PATCH] chore: remove references to JSON extraction (#5683) --- blocks/colour.js | 9 ++------- blocks/lists.js | 9 ++------- blocks/logic.js | 10 +--------- blocks/loops.js | 9 ++------- blocks/math.js | 9 ++------- blocks/text.js | 4 ++-- blocks/variables.js | 9 ++------- blocks/variables_dynamic.js | 9 ++------- 8 files changed, 15 insertions(+), 53 deletions(-) diff --git a/blocks/colour.js b/blocks/colour.js index 9ca7c7c47..1fab7df88 100644 --- a/blocks/colour.js +++ b/blocks/colour.js @@ -6,11 +6,6 @@ /** * @fileoverview Colour blocks for Blockly. - * - * This file is scraped to extract a .json file of block definitions. The array - * passed to defineBlocksWithJsonArray(..) must be strict JSON: double quotes - * only, no outside references, no functions, no trailing commas, etc. The one - * exception is end-of-line comments, which the scraper will remove. */ 'use strict'; @@ -28,7 +23,7 @@ goog.require('Blockly.FieldLabel'); */ Blockly.Constants.Colour.HUE = 20; -Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT +Blockly.defineBlocksWithJsonArray([ // Block for colour picker. { "type": "colour_picker", @@ -117,4 +112,4 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "style": "colour_blocks", "tooltip": "%{BKY_COLOUR_BLEND_TOOLTIP}", }, -]); // END JSON EXTRACT (Do not delete this comment.) +]); diff --git a/blocks/lists.js b/blocks/lists.js index b62eb6682..e3b5075aa 100644 --- a/blocks/lists.js +++ b/blocks/lists.js @@ -6,11 +6,6 @@ /** * @fileoverview List blocks for Blockly. - * - * This file is scraped to extract a .json file of block definitions. The array - * passed to defineBlocksWithJsonArray(..) must be strict JSON: double quotes - * only, no outside references, no functions, no trailing commas, etc. The one - * exception is end-of-line comments, which the scraper will remove. */ 'use strict'; @@ -28,7 +23,7 @@ goog.require('Blockly.Mutator'); */ Blockly.Constants.Lists.HUE = 260; -Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT +Blockly.defineBlocksWithJsonArray([ // Block for creating an empty list // The 'list_create_with' block is preferred as it is more flexible. // @@ -111,7 +106,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "tooltip": "%{BKY_LISTS_LENGTH_TOOLTIP}", "helpUrl": "%{BKY_LISTS_LENGTH_HELPURL}", }, -]); // END JSON EXTRACT (Do not delete this comment.) +]); Blockly.Blocks['lists_create_with'] = { /** diff --git a/blocks/logic.js b/blocks/logic.js index 1ee60458a..0265cfd0c 100644 --- a/blocks/logic.js +++ b/blocks/logic.js @@ -6,11 +6,6 @@ /** * @fileoverview Logic blocks for Blockly. - * - * This file is scraped to extract a .json file of block definitions. The array - * passed to defineBlocksWithJsonArray(..) must be strict JSON: double quotes - * only, no outside references, no functions, no trailing commas, etc. The one - * exception is end-of-line comments, which the scraper will remove. */ 'use strict'; @@ -29,7 +24,7 @@ goog.require('Blockly.Mutator'); */ Blockly.Constants.Logic.HUE = 210; -Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT +Blockly.defineBlocksWithJsonArray([ // Block for boolean data type: true and false. { "type": "logic_boolean", @@ -226,9 +221,6 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "helpUrl": "%{BKY_LOGIC_TERNARY_HELPURL}", "extensions": ["logic_ternary"], }, -]); // END JSON EXTRACT (Do not delete this comment.) - -Blockly.defineBlocksWithJsonArray([ // Mutator blocks. Do not extract. // Block representing the if statement in the controls_if mutator. { "type": "controls_if_if", diff --git a/blocks/loops.js b/blocks/loops.js index 584650524..35a8621ca 100644 --- a/blocks/loops.js +++ b/blocks/loops.js @@ -6,11 +6,6 @@ /** * @fileoverview Loop blocks for Blockly. - * - * This file is scraped to extract a .json file of block definitions. The array - * passed to defineBlocksWithJsonArray(..) must be strict JSON: double quotes - * only, no outside references, no functions, no trailing commas, etc. The one - * exception is end-of-line comments, which the scraper will remove. */ 'use strict'; @@ -31,7 +26,7 @@ goog.require('Blockly.Warning'); */ Blockly.Constants.Loops.HUE = 120; -Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT +Blockly.defineBlocksWithJsonArray([ // Block for repeat n times (external number). { "type": "controls_repeat_ext", @@ -200,7 +195,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "controls_flow_in_loop_check", ], }, -]); // END JSON EXTRACT (Do not delete this comment.) +]); /** * Tooltips for the 'controls_whileUntil' block, keyed by MODE value. diff --git a/blocks/math.js b/blocks/math.js index e592e075c..52bc3c936 100644 --- a/blocks/math.js +++ b/blocks/math.js @@ -6,11 +6,6 @@ /** * @fileoverview Math blocks for Blockly. - * - * This file is scraped to extract a .json file of block definitions. The array - * passed to defineBlocksWithJsonArray(..) must be strict JSON: double quotes - * only, no outside references, no functions, no trailing commas, etc. The one - * exception is end-of-line comments, which the scraper will remove. */ 'use strict'; @@ -30,7 +25,7 @@ goog.require('Blockly.FieldVariable'); */ Blockly.Constants.Math.HUE = 230; -Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT +Blockly.defineBlocksWithJsonArray([ // Block for numeric value. { "type": "math_number", @@ -384,7 +379,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "tooltip": "%{BKY_MATH_ATAN2_TOOLTIP}", "helpUrl": "%{BKY_MATH_ATAN2_HELPURL}", }, -]); // END JSON EXTRACT (Do not delete this comment.) +]); /** * Mapping of math block OP value to tooltip message for blocks diff --git a/blocks/text.js b/blocks/text.js index e3f0eae38..e16eb757b 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -27,7 +27,7 @@ goog.require('Blockly.Mutator'); */ Blockly.Constants.Text.HUE = 160; -Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT +Blockly.defineBlocksWithJsonArray([ // Block for text value { "type": "text", @@ -222,7 +222,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "inputsInline": true, "mutator": "text_charAt_mutator", }, -]); // END JSON EXTRACT (Do not delete this comment.) +]); Blockly.Blocks['text_getSubstring'] = { /** diff --git a/blocks/variables.js b/blocks/variables.js index 510fe3a12..d5b128805 100644 --- a/blocks/variables.js +++ b/blocks/variables.js @@ -6,11 +6,6 @@ /** * @fileoverview Variable blocks for Blockly. - - * This file is scraped to extract a .json file of block definitions. The array - * passed to defineBlocksWithJsonArray(..) must be strict JSON: double quotes - * only, no outside references, no functions, no trailing commas, etc. The one - * exception is end-of-line comments, which the scraper will remove. */ 'use strict'; @@ -28,7 +23,7 @@ goog.require('Blockly.FieldVariable'); */ Blockly.Constants.Variables.HUE = 330; -Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT +Blockly.defineBlocksWithJsonArray([ // Block for variable getter. { "type": "variables_get", @@ -68,7 +63,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "helpUrl": "%{BKY_VARIABLES_SET_HELPURL}", "extensions": ["contextMenu_variableSetterGetter"], }, -]); // END JSON EXTRACT (Do not delete this comment.) +]); /** * Mixin to add context menu items to create getter/setter blocks for this diff --git a/blocks/variables_dynamic.js b/blocks/variables_dynamic.js index dc5ffa0e7..2ba449a9d 100644 --- a/blocks/variables_dynamic.js +++ b/blocks/variables_dynamic.js @@ -6,11 +6,6 @@ /** * @fileoverview Variable blocks for Blockly. - - * This file is scraped to extract a .json file of block definitions. The array - * passed to defineBlocksWithJsonArray(..) must be strict JSON: double quotes - * only, no outside references, no functions, no trailing commas, etc. The one - * exception is end-of-line comments, which the scraper will remove. */ 'use strict'; @@ -27,7 +22,7 @@ goog.require('Blockly.FieldVariable'); */ Blockly.Constants.VariablesDynamic.HUE = 310; -Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT +Blockly.defineBlocksWithJsonArray([ // Block for variable getter. { "type": "variables_get_dynamic", @@ -64,7 +59,7 @@ Blockly.defineBlocksWithJsonArray([ // BEGIN JSON EXTRACT "helpUrl": "%{BKY_VARIABLES_SET_HELPURL}", "extensions": ["contextMenu_variableDynamicSetterGetter"], }, -]); // END JSON EXTRACT (Do not delete this comment.) +]); /** * Mixin to add context menu items to create getter/setter blocks for this