Commit Graph

1080 Commits

Author SHA1 Message Date
Rachel Fenichel
39e689b458 Fix default variable name 2017-12-04 15:52:53 -08:00
Rachel Fenichel
c802125d37 Make unique variable names in the flyout 2017-12-04 15:46:44 -08:00
Rachel Fenichel
6bb048d1bb All tests pass 2017-12-04 14:29:16 -08:00
Rachel Fenichel
d1c2401fcf All but XML tests now pass 2017-12-04 14:19:19 -08:00
Rachel Fenichel
a8a83a77a7 Move code from renameVariableInternal to renameVariableById 2017-12-01 16:22:52 -08:00
Rachel Fenichel
b78264a33e Update tests in workspace_test. Get rid of renameVariable 2017-12-01 16:21:19 -08:00
Rachel Fenichel
494c4882be Fix variable_map_test and variable_model_test 2017-12-01 14:05:37 -08:00
Rachel Fenichel
fa02e56c17 Fix tests in field_variable_test.js 2017-12-01 14:04:10 -08:00
Rachel Fenichel
25913884ab Delete by id 2017-11-30 17:21:12 -08:00
Rachel Fenichel
112fcccb31 Fix renaming 2017-11-30 17:12:39 -08:00
Rachel Fenichel
86e88aae92 Can now create a variable with the button in the flyout; drag a block with a variable out of the flyout; handle default variable names; and import and export variables 2017-11-30 16:30:58 -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
Rachel Fenichel
222407c6ce Extract code for domToField_ 2017-11-30 12:08:01 -08:00
Rachel Fenichel
d73337ad73 Extract fieldToDom into its own function 2017-11-30 11:24:57 -08:00
Karishma Chadha
143d95222c Fixing type annotation. 2017-11-22 15:22:34 -05:00
Karishma Chadha
aae1b1bb74 Addressing PR comment. Moving functionality to get newly added variables into a helper function. 2017-11-22 14:51:11 -05:00
Karishma Chadha
ee142e92bb Fixing comment style. 2017-11-22 13:43:25 -05:00
Karishma Chadha
c950225897 Minor refactoring 2017-11-22 13:37:30 -05:00
Karishma Chadha
71205de2ef Target workspace is the one that carries the variables we want. VarCreate gets fired when a block with a new default variable is dragged out into the workspace. 2017-11-22 13:27:29 -05:00
Karishma Chadha
07d6624625 Fixing bug where VarCreate event does not fire when adding a block with pre-existing variables from the flyout into the workspace. 2017-11-22 12:50:00 -05:00
Rachel Fenichel
662757ab7d Switch to parentNode for IE 2017-11-20 16:50:21 -08:00
Rachel Fenichel
3b81eede3e Call forceRerender instead of setText 2017-11-17 14:39:12 -08:00
Sam El-Husseini
ee7ad3dfef Fix right aligned Flyout buttons when workspace is scaled 2017-11-16 00:53:07 -08:00
Neil Fraser
5707657569 Stop blocks from exploding.
Uncompiled a goog.math.Coordinate toStrings as a nice “(1, 2)”, but
complied it toStrings as a useless “[object Object]”.  Fixes #1448.
2017-11-14 15:44:09 -08:00
Neil Fraser
eb796b71de Prevent selection of toolbox categories. 2017-11-13 15:30:33 -08:00
Rachel Fenichel
13aa7bfb69 No-regex-spaces 2017-11-07 17:27:00 -08:00
Neil Fraser
8a398ab334 Add @package 2017-11-07 14:23:41 -08:00
Neil Fraser
3bf0418460 Right-align flyout buttons in RTL.
Fixes #1208.
2017-11-07 14:23:41 -08:00
Neil Fraser
8cedef49ac Cleanup. 2017-11-07 14:23:41 -08:00
Neil Fraser
7216c060bd Terminology: "background button" -> "mat"
Originally flyouts had ‘blocks’ and rectangular hidden ’buttons’
underneath the blocks.  When UI buttons were added to flyounts, there
was a terminology collision.  This change renames the original
background ‘buttons’ to ‘mats’.  As in placemats or door mats.
2017-11-07 14:23:41 -08:00
Rachel Fenichel
f06aed4710 Fix text input widget position in RTL 2017-11-06 12:50:22 -08:00
Rachel Fenichel
30716fbd78 switch to variabletype everywhere 2017-11-03 16:03:32 -07:00
Rachel Fenichel
a6457ef614 Get rid of highlighting when releasing the drag would delete instead of connecting 2017-11-03 15:47:15 -07:00
Rachel Fenichel
768bd4aef5 Check workspace.isDragging() instead of Blockly.dragMode_ 2017-11-03 15:46:41 -07:00
Rachel Fenichel
8c51935025 More lint for unused variables 2017-11-03 14:04:36 -07:00
Rachel Fenichel
cd9be725c1 fix lint in field_angle.js 2017-11-02 16:37:09 -07:00
picklesrus
e0f7862547 spacing changes 2017-11-02 14:05:29 -07:00
picklesrus
de8d13eaa1 Fix lint errors so we can eventually run eslint on travis. 2017-11-02 14:05:29 -07:00
Neil Fraser
6635dada6d Allow external code to load new audio. (#1409)
If external code can ‘play’, it should be able to ‘load’.  Resolves
compile error in Blockly Games.  Feel free to push back if this API
shouldn’t be public.

Also fix compiler warnings on block defs.  ‘undefined’ means undefined, ‘=‘ means optional.
2017-11-01 17:47:24 -07:00
Neil Fraser
63637a927a Remove unnecessary restriction on variable names. 2017-11-01 12:08:53 -07:00
Evan W. Patton
67e192e208 Fix logic bugs related to e1e9427 (#1398)
This commit adds a fallback when attempting to merge events that
collide on a hash but do not actually merge. Previously, the latter
event would be dropped.

This also fixes a minor UX problem where moving the isNull check into
the merging loop resulted in extra events in the undo queue that
served no purpose and required multiple undo operations without visual
feedback.

Fixes #1373
2017-10-27 16:04:17 -07:00
Andrew n marshall
85f8a24ac8 Adding JSDoc for Blockly event fields (#1385)
Adding JSDoc for blockId, varId, workspaceId, group, and recordUndo
2017-10-25 12:26:24 -07:00
Neil Fraser
8779a8c3d9 Introduce minimap to style guide. 2017-10-24 14:06:29 -07:00
Neil Fraser
e100c66659 Linting. 2017-10-24 14:06:29 -07:00
Neil Fraser
2445a752b7 Resolve another 20 warnings. 2017-10-24 14:06:29 -07:00
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
Andrew n marshall
f992ea0f9c Fix #1369: resource loading order constraints, interpolation tokens in message expansion (PR #1383)
This fixes race condition in #1369 by using message references instead of explicit string lookups. This required fixing a bug the token interpolation parser that was breaking on the inner '"%1"' for these tooltips.
2017-10-24 13:02:14 -07:00
Rachel Fenichel
5a8ebef4b8 Move some context menu options into contextmenu.js (#1372) 2017-10-23 13:27:39 -07:00
Rachel Fenichel
bd1d199058 Don't check typeof == undefined in variable deserialization (#1379) 2017-10-23 11:28:00 -07:00