Commit Graph

170 Commits

Author SHA1 Message Date
Monica Kozbial
17d7d1b449 Use ScrollbarPair and WorkspaceDragger in flyouts (#4607)
* Use ScrollbarPair for flyouts

* Address PR comments

* Fix compile error
2021-02-02 11:46:06 -08:00
alschmiedt
f1498e7f07 Keyboard shortcuts (#4421)
* Adds shortcut registry and removes action and key map (#4398)

* Adds Shortcut tests and refactored navigation tests (#4412)

* Adds shortcut items (#4408)

* Add shortcuts for navigation (#4409)

* Add final keyboard shortcut cleanup (#4413)
2020-11-02 13:30:05 -08:00
alschmiedt
624e126121 Remove component file (#4379) 2020-10-16 16:47:44 -07:00
Sam El-Husseini
db40e44b7c Move Blockly.utils.dom.SvgElementType to Blockly.utils.Svg (#4285)
* Move SVGElementType to its own file shaving off 2.7KB
2020-09-16 14:42:58 -07:00
Monica Kozbial
0a36117885 Replace console "WARNING" log calls with warn call (#4171) 2020-08-13 10:53:04 -07:00
alschmiedt
0f00f42580 Adds Ability to Add a Flyout as a Plugin (#4059) 2020-07-22 17:13:19 -07:00
Sam El-Husseini
0f3db47fa5 Use generics to derive SVG element type (#4036)
* Encapsulate type in a generic to automatically derive type of SVG element when using createSvgElement
2020-07-13 10:40:31 -07:00
Sam El-Husseini
e3babee1f3 Add Blockly.utils.Metrics @record (#3913)
* Add Blockly.utils.Metrics
2020-05-21 15:03:17 -07:00
alschmiedt
d0e91a15a2 Toolbox definition (#3891)
* Add support for creating a toolbox with JSON
2020-05-13 08:16:53 -07:00
Sam El-Husseini
1d3a1655c6 Support multiple renderer / theme combos on the same page. (#3732)
* Support multiple renderer / theme combos on the same page.
2020-03-11 20:09:00 -07:00
Neil Fraser
4e2f8e6e02 Use SPDX licences.
This is a followup to #3127.
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Monica Kozbial
c84ee46a89 Setting default options in workspace constructor. (#3592)
* Setting default options in workspace constructor.

* Changing logic for parsing workspace options.

* Adding gridPattern declaration to options and updating options handling for workspace.

* Addressing PR comments.

* Moving objects to constructor.

* Using constructor instead of casting for Blockly.Options.

* fix eslint

* Adding types.

* Change in type.

* eslint fix.

* Fix typings.
2020-01-17 15:16:20 -08:00
alschmiedt
a1ed9ab791 Update component names (#3549) 2020-01-06 13:18:15 -08:00
Sam El-Husseini
f9dcb60f82 Zelos replacement highlight (#3431)
* Zelos replacement highlight
2019-11-13 17:14:28 -08:00
Neil Fraser
a15d9611d0 Add missing requires. 2019-11-12 13:15:06 -08:00
alschmiedt
40bdfac017 Fix setting focus for workspace (#3425)
* Fix setting focus for workspace
2019-11-11 16:44:58 -08:00
Beka Westberg
8625a96496 Fixed getRootBlock error. 2019-11-09 07:27:58 -08:00
Rachel Fenichel
611c8b81fe Only log about a missing event group if we actually did something 2019-11-08 15:14:14 -08:00
Sam El-Husseini
fdc50f2cd0 Add the theme name to the injection div (#3413)
* Set the theme name as a class on the injection div.
2019-11-07 15:19:58 -08:00
Rachel Fenichel
46f323971a Move filter and pattern creation from inject into constants. 2019-11-01 13:32:17 -07:00
Neil Fraser
123f436e04 Add parens around inline assignments (#3381) 2019-10-31 15:17:35 -07:00
alschmiedt
cbf867f441 Add keyboard navigation support for multiple workspaces (#3352)
* Add keyboard navigation support for multiple workspaces
2019-10-28 12:53:51 -07:00
Sam El-Husseini
7e82d0d201 Remove @deprecated annotation on Blockly.bindEvent_ (#3333) 2019-10-25 19:15:27 -04:00
Sam El-Husseini
4f02ceeba0 Make Blockly options an interface (#3312)
* Make workspace options an interface so it can be extended in the d.ts.
2019-10-22 14:20:26 -04:00
Sam El-Husseini
3c2c4677df Fix 55 warnings related to flyouts. (#3211)
* Fix 55 warnings related to flyouts.
2019-10-16 12:13:37 -05:00
Sam El-Husseini
2ac4149d98 Misc compiler warnings. (#3172)
* Fix misc compiler warnings. Use ws.getToolbox() instead of ws.toolbox_
2019-10-07 11:06:56 -07:00
Sam El-Husseini
e4cc2217e6 Fix compiler warnings related to events. (#3151)
* Fix 23 warnings in event related code.
2019-10-03 15:59:01 -07:00
Neil Fraser
b46a4fe286 Bring our license format up to date (#3127)
* Google changed from an Inc to an LLC.

This happened back in 2017 but we didn’t notice.  Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.

* Remove project description/titles from licenses

This is no longer part of Google’s header requirements.  Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).

* License no longer requires URL.

* Fix license regexps.
2019-10-02 14:46:56 -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
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
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
e43e19d19a Remove three functions deprecated in 2015
We’ve had four years of console warnings, and this next release is known to be breaking.  Each is trivial to fix in code.
2019-09-12 18:04:45 -07:00
alschmiedt
ec07a36e44 Update cursor api (#3002)
* Move over to new implementation for cursor
2019-09-11 18:16:05 -07:00
Sam El-Husseini
63f55da379 Remove last bit of closure! (#2858) 2019-08-16 18:39:25 -07:00
Sam El-Husseini
f118d6de88 No closure toolbox (#2819)
* Update the toolbox to not rely on closure and instead use the built in Blockly.tree component
2019-08-14 13:48:21 -07:00
alschmiedt
00be6a6381 Make the navigation namespace lowercase (#2812) 2019-08-13 14:00:49 -07:00
alschmiedt
74fa3bb71a Initial commit for changing key mappings (#2787)
* Added ability to easily change key mappings
2019-08-13 13:37:01 -07:00
Beka Westberg
37efbd0559 Fixed jitter when bumping blocks if objects were too large for the workspace. (#2778) 2019-08-12 09:11:27 -07:00
alschmiedt
6dc9a07810 Integrates cursor into develop (#2710)
* Integrates cursor into blockly

* Fix review comments

* Add dispose to cursor

* Fixes dispose functionality

* Remove unnecessary dispose method
2019-07-25 11:14:40 -07:00
Neil Fraser
0213de11bc Use Rect in more places. 2019-06-07 10:32:57 -07:00
Neil Fraser
98a98bcce6 Add Blockly.utils.dom.XLINK_NS
And fix provide/require mixup.
2019-06-07 10:32:57 -07:00
Neil Fraser
848d3a3509 Move setCssTransform & createSvgElement to dom.
Also move SVG_NS and HTML_NS properties.
2019-06-07 10:32:57 -07:00
Neil Fraser
775ce34eac Simplify workspace.getBlocksBoundingBox
Previously it returned x,y,width,height.  Returning top,bottom,left,right results in simpler code, both in this function and in downstream callers.

This commit makes the minumum change to the metrics_test.  I’m happy to change the test’s data if that makes more sense.
2019-06-07 10:32:57 -07:00
Neil Fraser
02e9b25f03 Flaten bounding box data structure.
Old: a box object with two coordinate objects, each with two numbers.
New: a box object with four numbers.

The old system would make sense if there was a reason to group the top-left and bottom-right coordinates.  But in our code we only pulled out top/bottom/left/right numbers.

New code is simpler and faster.
2019-06-07 10:32:57 -07:00
Neil Fraser
3dfac9a2ba Alphabetize require statements.
Search and replace for userAgent didn’t take into account alphabetic ordering.
Also some line wraping.
2019-06-07 10:32:57 -07:00
Neil Fraser
566f182fa8 Move Blockly.userAgent to Blockly.utils.userAgent 2019-06-07 10:32:57 -07:00
Neil Fraser
d1a29739d8 Move utilities into own directory.
TODO: There are more functions which may be migrated into dom and string.
2019-06-07 10:32:57 -07:00
Neil Fraser
5c614d73c1 Add tests for XY regexs. 2019-05-24 15:45:05 -07:00
Neil Fraser
9f528922a7 Fix some dependencies 2019-05-24 15:45:05 -07:00
RoboErikG
2386038138 Fix bug with in bounds bumping (#2467)
Traced one cause of Mocha tests sometimes failing to blocks being
bumped back into bounds. It looks like a block being moved to be
a child of another block was ended up out of bounds probably
because the size of the workspace isn't set yet. When the change
handler tried to move it back in it would throw an error since you
can't move child blocks with that method.
2019-05-17 17:57:53 -07:00