Commit Graph

59 Commits

Author SHA1 Message Date
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
Neil Fraser
6acaf35967 Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
Neil Fraser
218fdc667d Fix duplicate procedure naming.
https://groups.google.com/forum/#!topic/blockly/2q0pleoMIco
2015-08-25 14:11:07 +01:00
Neil Fraser
179052792c Save dynamic output types in XML. 2015-07-22 17:17:01 -07:00
Neil Fraser
64bd9d498d Stop calling onchange on deleted blocks. 2015-07-13 14:16:09 -07:00
Neil Fraser
d1f6bdb173 Make Block.getField public. 2015-07-02 16:14:10 -07:00
Neil Fraser
edd3e3bf33 Lint corrections. 2015-06-17 13:05:24 -07:00
Neil Fraser
f454f77910 Break out procedure call argument rendering into separate function. 2015-04-30 14:57:14 -07:00
Neil Fraser
6dc6837981 Fix procedure param error. 2015-04-06 14:27:55 -07:00
Neil Fraser
6ee32c285a Allow enabling/disabling of spellcheck on text fields. 2015-02-25 13:35:37 -08:00
Ryan Loader
4a5f0a0bf1 Fixed issue with mutated function call blocks 2015-02-17 11:35:37 +13:00
Neil Fraser
b36a88f423 Fix bad rendering of collapsed function calls. 2015-02-10 14:42:54 -08:00
Neil Fraser
9e81d41181 Fix missing procedure argument text fields (issue 61). 2015-02-06 16:23:20 -08:00
Neil Fraser
ddcf1ac969 Factor out hues into constants. 2015-01-26 01:20:03 -08:00
Neil Fraser
c6fc29b4a2 Make 'WITH' text field be optional (for Blockly Games). 2015-01-06 16:29:27 -08:00