Commit Graph

4232 Commits

Author SHA1 Message Date
Neil Fraser
b701475984 Simplify trashcan code (#3110)
Also delete unused props in CSS.
2019-09-27 11:43:56 -07:00
Sam El-Husseini
fc2c730e44 Make workspace comments an optional module, remove from this release. (#3115) 2019-09-27 11:15:11 -07:00
Monica Kozbial
328f2c3373 Removing deprecated renderMode reference in playground. (#3107) 2019-09-27 11:12:49 -07:00
Monica Kozbial
f4136fdc2a Adding test and updating TODO. (#3102)
* Adding test and updating TODO.

* changing bug number referenced in TODO
2019-09-27 11:12:37 -07:00
Monica Kozbial
40e0d55187 Removing obsolete TODO comment. (#3104) 2019-09-27 11:12:11 -07:00
Neil Fraser
872aa45fae More straightening out of dependencies. 2019-09-27 10:48:14 -07:00
Neil Fraser
6650ecf13f Make dynamic variables be an optional module.
Also straighten out some dependencies.
2019-09-27 10:48:14 -07:00
Neil Fraser
4ed3295ad9 Make generator an optional module (#3105) 2019-09-27 10:47:10 -07:00
Sam El-Husseini
6a771a8636 Remove old node module, update tests to use the npm one. (#3111) 2019-09-27 10:32:52 -07:00
Sam El-Husseini
35424f2484 Angle field touch fixes (#3079)
* Fix touch support for angle fields
2019-09-26 17:11:03 -07:00
Sam El-Husseini
870824bc3e Workspace theme (#3093)
* Move the theme object so it's on the workspace.

* Add support for subscribing UI elements to theme component styles and changes.
2019-09-26 16:52:17 -07:00
alschmiedt
b587ad71c5 Fix changing category color in multi playground (#3103) 2019-09-26 16:05:47 -07:00
Monica Kozbial
22e79ae496 Updating behavior of register functions and adding unregister. (#3085)
* Updating behavior of register functions and adding unregister.

* Updates jsdoc comments.
2019-09-26 13:23:45 -07:00
Monica Kozbial
8619ad1a0a Re-enable block delete test. (#3088) 2019-09-26 13:19:25 -07:00
Sam El-Husseini
a57c7ffb13 Clean up fields by passing the right type in fromJson (#3095) 2019-09-26 12:03:17 -07:00
alschmiedt
244bbe554b More navigation cleanup (#3100) 2019-09-26 11:13:47 -07:00
Neil Fraser
ddb04a3bc2 Partial code review of nav (#3091)
* Partial code review of nav

Had a few minutes free.

* Move getTopStackBlock to block

This is a generally useful function.
2019-09-26 10:19:40 -07:00
Neil Fraser
6ef84035ca Prevent dataset IDs from being renamed
The JS Compiler would rename ‘id’ and ‘blockId’ to something random.  Normally that would be fine, but if it ended up with a ‘$’ in the name, then that becomes an illegal HTML property name and Blockly crashes.

A bug that’s been lurking in Blockly for years and randomly surfaced on a recent compile.
2019-09-25 19:50:39 -07:00
Neil Fraser
75cf614104 Break CSS into modules. (#3084)
* Break CSS into modules.

Drops the compile test by 3 KB.
Remove obsolete .blocklyDraggable class stub (it used to be dynamically changed).
Remove unused menuseparator CSS.
2019-09-25 18:01:19 -07:00
Rachel Fenichel
06d65b81c7 Merge pull request #3092 from rachel-fenichel/lint_spacing
Enable eslint rule spaced-comment
2019-09-25 17:31:50 -07:00
Rachel Fenichel
269f0dc381 Enable eslint rule spaced-comment
Fix up all remaining violations and turn the rule on.
2019-09-25 16:04:05 -07:00
RoboErikG
e69db137a7 Add a test for built file size (#3075)
* Add a test for built file size

Adds a script test for building Blockly's compressed files and
checking their size to prevent unexpected increases.

* Update size for new changes

* Add full stop
2019-09-25 15:03:31 -07:00
alschmiedt
2c757aeb4d Cleanup navigation file (#3074)
* Cleanup navigation file
2019-09-25 13:57:42 -07:00
Monica Kozbial
e1e9513e86 Disconnect child block always for block.dispose(/* healStack */ true) (#3073)
* Disconnecting child block even if it cannot be connected to parent block.

* Bump disconnected child block.

* Added method for behavior on failed connection and updated expected behavior of unplug in unit tests.

* Removing obsolete TODO and calling new helper method in tests.
2019-09-25 10:47:29 -07:00
Neil Fraser
a03660243e Code cleanup, drop some CSS.
Random improvements to require statements.

Removal of some obviously dead CSS.

.blocklyDropDownDiv no longer supresses text selection (see comment in PR).

This PR drops the compiled size by 4 KB, which is larger than I was expecting.
2019-09-25 10:34:34 -07:00
Monica Kozbial
303a841685 Adding check for pushing last row with only empty dummy input. (#3081) 2019-09-24 13:41:26 -07:00
Neil Fraser
76af463ec4 Removing require for Blockly.FlyoutButton
Should have been in the previous PR, since that’s the point.

Also, a recompile given all the recent dependency changes.
2019-09-24 12:15:03 -07:00
Neil Fraser
6e76b6f49e Make flyout buttons be an optional module. 2019-09-24 10:58:33 -07:00
Neil Fraser
ddb8e46b87 Make flyouts be optional modules.
No Blockly instances need both Horizontal and Vertical flyouts.  Dropping one of these saves 2 KB.  Some don’t need flyouts at all (e.g. Blockly Games Puzzle or readonly documentation blocks).
2019-09-23 22:02:59 -07:00
Monica Kozbial
21c5698e98 Moving DARK_PATH_OFFSET to geras only. (#3066)
* Moving DARK_PATH_OFFSET to geras.

* Adding compressed and uncompressed files.

* Adding missing newlines

* Reverting commit of messages.

* Reverting compressed files.

* Updating compressed files.

* Addressing PR comments.

* Removing unecessary input overrides.
2019-09-23 15:57:59 -07:00
Neil Fraser
b84cda2c76 Strip out more bloat from toolbox (#3068)
Also removes three private accesses from workspaceSvg into toolbox tree.

The strategy for workspace.updateToolbox is no longer to clear and repopulate the toolbox, but rather to throw away the old toolbox and rebuild a new one.  This is simpler and more reliable.

This commit trims off another KB from the compiled code.
2019-09-23 15:18:32 -07:00
Neil Fraser
f550eb0c27 Uncomment requires
Although these requires aren’t required for advanced compilation, they are for simple compilation.
2019-09-23 14:16:00 -07:00
Neil Fraser
fb334fe1c6 Remove ‘dir’ insertion from uncompressed.js
Previously base.js lived outside the blockly directory.  Now it lives in blockly/closure.
2019-09-23 14:16:00 -07:00
Sam El-Husseini
494487b37f Mark fields as dirty when the workspace becomes visible. (#3072)
* Mark fields as dirty when the workspace becomes visible.
2019-09-23 11:21:45 -07:00
Beka Westberg
593383e18a Changed variable field to use configuration (#3065)
* Changed variable field to use new configuration.
2019-09-23 11:14:03 -07:00
alschmiedt
f3b4fc0732 Fix interaction between mouse and keyboard (#3070) 2019-09-23 11:07:59 -07:00
alschmiedt
c16ea62b58 A bunch of small bug fixes (#3067) 2019-09-23 08:59:50 -07:00
Neil Fraser
b0e700307a Quick hack to solve circular dependencies
Submitted without review since everything is broken.  Further investigation needed to find origin of this regression.
2019-09-21 09:58:46 -07:00
Neil Fraser
56e7a46f45 Add more missing dependencies
Submitted without review.  From this bug:
https://github.com/google/blockly-games/issues/116
2019-09-21 08:48:27 -07:00
Neil Fraser
7653785ae6 Add missing require for utils.colour
Pushed without review since it’s activily breaking users (bug report filed from Blockly Games).
2019-09-21 08:40:56 -07:00
Monica Kozbial
5609cda70f Copying values to insertion marker fields directly. (#3063) 2019-09-20 15:35:46 -07:00
Sam El-Husseini
9318c370f9 Handle blockly actions on the dropdown fields. (#3064)
* Handle blockly actions on the dropdown fields.
2019-09-20 15:07:35 -07:00
alschmiedt
23b31c7ea8 Cursor rtl (#3062)
* Fix rtl for cursor svg & small bug fix
2019-09-20 14:34:18 -07:00
Sam El-Husseini
e22ad7f33b Update README with new npm instructions. (#3059)
* Update Readme
2019-09-20 14:21:10 -07:00
Monica Kozbial
a14ac351b5 Adding checks for whether to add elem spacer on row ends (#3060)
* Adding checks for whether elem spacer shouldbe added to start and end of row.

* Fix eslint and add package visibility.
2019-09-20 14:20:14 -07:00
Beka Westberg
e053084621 Changed dropdown field to use new configuration. (#3061) 2019-09-20 13:35:13 -07:00
Monica Kozbial
a8af9fea21 Move populate for topRow and bottomRow to info (#3057)
* Move populate for topRow and bottomRow from measurable definition to info.

* Fix local variable and circular dependency.
2019-09-20 13:24:46 -07:00
Beka Westberg
9e5df6216a Fixed comment ownership. (#2923)
* Moved comment icons to use a model-based system. The block holds the model of the comment, and the comment icon holds a reference to it.
* Reorganized the setVisible function.
* Changed how xml.js serializes and deserializes comments.
2019-09-20 13:16:07 -07:00
Neil Fraser
0726e4a909 Removed unreachable functions from Blockly.Component 2019-09-20 10:36:06 -07:00
Neil Fraser
02fc5bf19c Remove empty span from toolbox.
Every row started with this useless tag:
<span role=“presentation”></span>
2019-09-20 10:36:06 -07:00