Commit Graph

173 Commits

Author SHA1 Message Date
Andrew n marshall
ab8692652a Revert "Removing namespace declarations for deprecated and unused namespaces. (#1796)" (#1809)
This reverts commit 75459abfdd.
2018-04-20 08:08:11 -07:00
Andrew n marshall
75459abfdd Removing namespace declarations for deprecated and unused namespaces. (#1796)
These namespaces use to contain the original block hue constants,
but were deprecated (via comment, except for procedures) over a year
ago. With the removal of those constants, the declarations were
creating empty, unused objects.
2018-04-18 15:32:26 -07:00
Rachel Fenichel
23666664fa Fix context menus on blocks with variables 2018-04-12 16:56:07 -07:00
Andrew n marshall
e9d8e00a55 Making all blocks use the MSG colour values. (#1749)
* Making all blocks use the MSG colour values.
 * Deprecating Blockly.Constants.Lists.HUE and similar constants.
 * Removing deprecated Blockly.Blocks.lists.HUE constants.
 * Allowing message references in the Block.setColour() parameter.
 * Adding checking of older constants, ensuring they are not overwritten.
2018-04-09 17:37:47 -07:00
Rachel Fenichel
3a4adb3b0d Scroll to the procedure definition from the procedure call context menu 2018-04-05 17:57:47 -07:00
Sam El-Husseini
134b32fe56 Don't show create var getter in block contextmenu when in flyout 2018-03-27 23:40:54 -07:00
Rachel Fenichel
74fd58131b Serialize variable IDs in procedure definitions 2018-02-20 13:18:48 -08:00
Rachel Fenichel
af59e27d96 Cleanup 2018-02-16 11:02:03 -08:00
Rachel Fenichel
f3a4664dea Delete extra variables at the end of a procedure argument edit 2018-02-15 17:18:23 -08:00
Rachel Fenichel
3e62ffc20a Split at higher level for multiline function calls 2018-01-24 11:26:41 -08:00
Rachel Fenichel
9a53e96d53 More lint fixes 2018-01-23 18:22:53 -08:00
Rachel Fenichel
b593d44379 Make the potential variable map null when not needed 2018-01-12 14:51:02 -08:00
Rachel Fenichel
1fa27fa043 Update comments and remove unused functions 2018-01-12 12:03:28 -08:00
Rachel Fenichel
5d6d7519cd Remove some TODOs; add a variable-referencing block to the simple playground flyout 2018-01-08 14:14:26 -08:00
Rachel Fenichel
ea6bf607fa Add displayRenamedVar to procedures_defnoreturn 2018-01-04 16:38:36 -08:00
Rachel Fenichel
832dae009e Cleanup 2018-01-04 16:32:23 -08:00
Rachel Fenichel
77cf3ddc33 Track variable IDs for procedure arguments 2018-01-04 16:16:12 -08:00
Rachel Fenichel
9b091a8f9e Update procedure generators 2018-01-02 16:27:17 -08:00
Rachel Fenichel
38d134aa4f Tests 2017-12-06 15:49:20 -08:00
Rachel Fenichel
5169b2da18 Get rid of workspace.deleteVariable 2017-12-05 13:44:08 -08:00
Rachel Fenichel
e4844cd120 Move getOrCreateVariable to variables.js 2017-12-05 13:08:01 -08:00
Rachel Fenichel
3c76028e14 Add TODOs and fix return type 2017-11-30 13:16:17 -08:00
Rachel Fenichel
b870c3ccb9 Allow variables of different types to share the same name. 2017-11-30 13:16:16 -08:00
Tom
a6245f4c6e Compile messages with externs and demo with advanced optimizations (#1259)
* Revert "Fix synonyms when compiled. (#1248)"

This reverts commit f08afbb351.

* Revert "Compatibility for Closure Compiler. (#1240)" [fc8d4c9]

* Adding exports to all messages.

* Fixed missing dependency to Blockly.defineBlocksWithJsonArray()

* Adding a fully compiled demo draft (still simple optimizations).

* Demo optimizations switched to advanced and enabled exports (for Blockly.Msg).

* Message interpolation updated to use the exported (global) Blockly.Msg array.

* Adding some debug compilation options to the build script.

* Adding SVG externs.

* Fixed Blockly.inject's config array to work with compilation.

* Reverting all compiled code.

This fixes commit b307ba1151.
This fixes commit dec6910b67.

* Reverting all compiled code.

This fixes commit 824c806ec3.

* Removing old todo

* Merge commit 'fe96bec765f0eb58c5321101965100c2716760ed' into compile-messages-with-externs

* commit 'fe96bec765f0eb58c5321101965100c2716760ed':
  Fixes positional index for Czech translation (#1264)
  Missed one use of string instead of .property in extensions.js (#1262)
  Update extensions.js to be compatible with ADVANCED_OPTIMIZATIONS (#1253)
  Fix type tags and todo placement.
  Procedure block renames variable in mutator if there is a case change.

* Fixes based on review by @NeilFraser
- 80 cols
- using goog.global instead of window
- @export on the same line as messages

* BF: Moving the msg dependency earlier, since Blockly.Msg.en is filling the Blockly.Msg object, which is empty without Blockly.Msg.en (and the rest of the code is using it as Blockly.Msg).

* Updating some texts in the demo's html file to be more descriptive.

* Commenting the debug options in the build, to maximize the optimizations. They are not removed, to allow anybody to turn them on if needed (since they are not documented on the Closure Compiler's REST API pages).

* BF: fixed blocks_compressed.js compilation, as it now requires Blockly namespace to exist.

* SVG externs file updated based on the one in https://github.com/google/closure-compiler/blob/master/contrib/externs/svg.js (eliminating 2 warnings)
2017-08-08 11:16:49 -07:00
marisaleung
d37309497f Procedure block renames variable in mutator if there is a case change. 2017-08-02 16:49:06 -07:00
marisaleung
aff9c4867c Correctly named block events called. 2017-06-08 15:44:43 -07:00
Rachel Fenichel
4152542c2f Fix some lint errors 2017-02-03 14:01:18 -08:00
Rachel Fenichel
158df44a94 Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory 2017-01-03 18:41:28 -08:00
Neil Fraser
fbd9276e9c Lint 2016-11-18 20:26:56 -08:00
Neil Fraser
531b6caf5d Stop some blocks from throwing errors in headless workspaces. 2016-11-18 13:32:31 -08:00
Neil Fraser
122f69f92c Disable break/return blocks in addition to warning. 2016-10-19 17:04:07 -07:00
Neil Fraser
918da99f39 Wrapping lines > 80 char. 2016-09-28 23:06:09 -07:00
Chris Johnson
90d924b84a Adds default def comment only if comments enabled. 2016-09-29 00:49:06 -05:00
Rachel Fenichel
c7a5944ea3 Create variables from procedure definitions 2016-08-11 14:59:11 -07:00
Neil Fraser
e849c93db9 Merge branch 'master' into develop 2016-07-08 16:52:18 -07:00
Neil Fraser
2dab19c015 Ensure that if a procedure call exists, so does its definition.
Specifically, if a call is copied, then the def is deleted, then the
call is pasted, the def should be created.
2016-07-08 15:50:09 -07:00
Rodrigo Queiro
589f6ae13f Re-enable events even when an exception is thrown
This prevents a recoverable exception permanently disabling events. This
could be caused by calling domToWorkspace() to load a corrupt program.
2016-06-29 14:46:06 +02:00
Rachel Fenichel
4841f136f1 More lint and eslint configuration. 2016-05-25 15:35:11 -07:00
Rachel Fenichel
8597c94a49 lint 2016-05-24 15:35:38 -07:00
Neil Fraser
c1872750ae Fix recursive undo/redo loop in logic_compare and logic_ternary blocks. 2016-03-27 02:20:30 -07:00
Neil Fraser
e0ebce1b60 Fix undoing function argument changes. 2016-03-24 15:30:29 -07:00
Neil Fraser
39fbd24659 Remove setProcedureParameters from API (use domToMutation instead). 2016-03-22 10:48:13 -07:00
Neil Fraser
6ae436a153 Add undo/redo context menu options on workspace. 2016-03-17 14:44:26 -07:00
Neil Fraser
0b5338b707 Simplify function statement toggle reconnection. 2016-03-16 23:11:55 -07:00
rachel-fenichel
2c70f7ec26 Add a getter; stop accessing private field sourceBlock_ from outside of a connection. 2016-03-15 16:03:49 -07:00
Neil Fraser
2a1ffa11c4 Add undo/redo. Also refactor connections.
Bugs in undoing mutators and renaming variables.
2016-03-03 17:48:54 -08:00
Neil Fraser
211595075e Make colour optional in JSON. Add ;/n in generator stub. 2016-01-28 14:25:38 -05:00
Neil Fraser
9804b31bb0 Allow easier addition of custom loops or functions. 2016-01-21 18:16:25 -08:00
Neil Fraser
19c71573b7 Update messages.
Remove unused PROCEDURES_CALLNORETURN_CALL.  Add
PROCEDURES_DEFNORETURN_COMMENT and PROCEDURES_IFRETURN_HELPURL.
2015-12-17 15:34:23 -08:00
Neil Fraser
a5ea93a1db Allow comments in flyouts. 2015-12-17 14:16:04 -08:00