Commit Graph

53 Commits

Author SHA1 Message Date
Neil Fraser
5c00256e96 Style improvements. No functional changes. (#1367) 2017-10-17 15:19:50 -07: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
picklesrus
36fa5f6016 Fix #986. Looks like the original PR just forgot this block. (#992) 2017-03-23 10:20:42 -07:00
Rachel Fenichel
aa8e996799 Handle mutations with both mixins and functions 2017-02-23 17:07:06 -08:00
Rachel Fenichel
455432250e Use mutator extension for controls_if block 2017-02-22 17:05:52 -08:00
Andrew n marshall
feed5ffc6d Renamed extension function constant, and moved variables into the mixin. 2017-02-14 09:37:45 -08:00
Andrew n marshall
6919f588f8 extension controls_if => controls_if_mutator. 2017-02-14 09:37:45 -08:00
Andrew n marshall
2e8d107682 Correcting output of the logic_null block. 2017-02-13 16:28:43 -08:00
Andrew n marshall
a4cfd5cbc8 Porting Loop blocks to JSON (#919)
* Improved documentation on `Blockly.Extensions.buildTooltipForDropdown`
 * Replaced incorrect uses of `@mixes` JSDoc annotation (on mixin extensions) with `@augments Blockly.Block`.
 * Added Blockly.Extensions.buildTooltipWithFieldValue() extension helper.
2017-02-08 11:36:38 -08:00
Andrew n marshall
49c9c024e4 Correction to logic_ternary type check (#920) 2017-02-08 10:16:59 -08:00
Andrew n marshall
d97edf0dde Blockly.Constants.Math and Blockly.Constants.Colour extension constants (#916)
Also, correcting quotes in logic.js.
2017-02-06 16:20:48 -08:00
Andrew n marshall
680fc4b6d3 Porting Logic blocks to JSON (#913)
Extensions, mixins, mutators and constants now grouped under the new namespace Blockly.Constants.Logic.
2017-02-06 13:40:05 -08:00
Andrew n marshall
4fdd16b499 JSON support for message lookup in colour, tooltip, and help URL. (#825)
String replacement for the colour, tooltip text and help URL attributes of JSON defined blocks.
Demonstrated in logic_boolean.
2017-01-13 16:54:27 -08:00
Andrew n marshall
ac3df2759c PR #818: Adding support for string table lookups in 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.
2017-01-11 15:47:56 -08:00
Andrew n marshall
dd95203cdc controls_ifelse: Remove right-align. Remove Boolean check on statements. (#749) 2016-11-16 09:55:58 -08:00
Neil Fraser
c27841f8df Fix compiler errors. 2016-11-15 16:41:11 -08:00
Andrew n marshall
e5d25bb686 String reference in JSON string messages (#741)
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
 * Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
2016-11-15 15:51:51 -08:00
Rachel Fenichel
82261e3d68 Remove ifelse block and messages' 2016-11-11 17:21:29 -08:00
Andrew n marshall
72ff6d9ead Adding controls_ifelse block (#722)
Adding controls_ifelse, an if/else block that is loaded from JSON and does not use mutators. This gives "else" capability to Android & iOS implementations, which don't support JavaScript mutators.

Added this block to the playground simple toolbox and all generators.
2016-10-31 11:00:39 -07:00
Neil Fraser
b614cfb1c1 Fix RTL comparator operators. 2016-08-24 02:49:53 -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
a3b850b0d3 Merge pull request #287 from rachel-fenichel/feature/source_block_fn
Add a getter; stop accessing private field sourceBlock_ from outside …
2016-03-16 19:45:20 -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
72bb08a4ec Add undo/redo.
Some bugs in undoing function argument changes.
2016-03-14 23:14:05 -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
5097963cb1 Reduce code duplication in 'if' block. 2016-03-01 18:21:02 -08:00
Madeeha
7d48f253e6 changing the controls_if_if block to allow controls_if_elseif and controls_if_else blocks to attach to the bottom of the if block instead of in the middle of the block. 2015-12-17 15:29:50 -08:00
Neil Fraser
6acaf35967 Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
Neil Fraser
535b4202d9 Convert 5 blocks to JSON.
No functional change.
2015-08-24 01:28:43 -07:00
Neil Fraser
64bd9d498d Stop calling onchange on deleted blocks. 2015-07-13 14:16:09 -07:00
Neil Fraser
e300931071 Allow multiple interpolation messages. Fix variable context menus. 2015-06-27 12:49:01 -07:00
Neil Fraser
41b2a61931 Fix NaN in if block (issue #109). 2015-06-17 14:59:03 -07:00
Neil Fraser
edd3e3bf33 Lint corrections. 2015-06-17 13:05:24 -07:00
Neil Fraser
9050e32954 Adding JsonInit method of creating blocks. 2015-06-08 15:54:18 -07:00
Neil Fraser
17961f7f58 Support multiple Blockly instances. 2015-04-28 13:51:25 -07:00
Neil Fraser
706080c7ae Prevent 'c?a:b' block from performing type violations. 2015-03-22 01:53:17 -07:00
Neil Fraser
deb133cc25 Improve previous commit (faster, remove dependency). 2015-02-02 17:00:19 -08:00
Paul Kendall
82f1ab1157 Fix the logic block to bump the correct block.
Previously it was always bumping the first block added
even if you are putting the new block over the first block, so it
bumped the new block as well.
2015-02-03 11:06:57 +13:00
Neil Fraser
69294d8344 Change logic compare block to eject mismatched blocks. 2015-01-28 17:45:13 -08:00
Neil Fraser
193c47420c Refactor previous merge. 2015-01-28 17:07:22 -08:00
Paul Kendall
1bf394ad83 Update logic block so it is reactive to the input attahced to it.
i.e. if you place a number in an input the other input changes it's type to number as well.
When you remove all inputs it reverts back to allowing any input type.
2015-01-29 13:26:18 +13:00
Neil Fraser
ddcf1ac969 Factor out hues into constants. 2015-01-26 01:20:03 -08:00
Neil Fraser
9a605e90e7 Reduce duplicated code in text and list blocks. 2014-12-19 18:14:41 -08:00
Neil Fraser
6539211104 Change official project URL. 2014-10-07 13:09:55 -07:00
Neil Fraser
7122410373 Changing project location from Google Code to GitHub. 2014-09-08 15:18:02 -07:00
Neil Fraser
d998a1c8ec Update to latest version. 2014-09-08 14:26:52 -07:00
ellen.spertus
c3b19ca9cc Automatic commit Wed Feb 5 03:00:02 PST 2014 2014-02-05 03:00:02 -08:00
ellen.spertus
6ee38cdec3 Automatic commit Tue Jan 28 03:00:09 PST 2014 2014-01-28 03:00:09 -08:00
ellen.spertus
c7a1b36c86 Automatic commit Wed Jan 22 03:00:07 PST 2014 2014-01-22 03:00:07 -08:00