Commit graph

79 commits

Author SHA1 Message Date
Andrew Sliwinski
be9d5fefed Merge from Upstream Blockly ()
* WIP merge from upstream google/blockly

* fixing some merging bugs. Getting the drag surface to work, updating some function calls, etc.

* make the trash can lid animate again and fix the cursor to show an x when things will be removed.

* Fix text rendering logic in fields

* Hand apply some more changes from blockly flyout.js to flyout_base.js.

Also revert 08efd1381c
in scratch-blocks since it breaks variables and there is more work fenichel is planning
to do here.

* Fix drop-down field rendering

* Resolve issue with text input field widths on init

* Remove unused blockly (built) files

* Remove unused language files

* Resolve lint issues and rebuild

* Add blockly build targets to cleanup script

* Return 0 if 'this.arrow_' does not exist in a dropdown field

* Remove unused / irrelevant comments
2017-02-02 14:17:43 -05:00
Rachel Fenichel
41fc324aee lint 2016-11-02 13:56:27 -07:00
Rachel Fenichel
a3839b52ad Merge branch 'develop' of https://github.com/google/blockly into feature/merge_nov_1 2016-11-01 18:02:37 -07:00
Rachel Fenichel
844b7771e2 Merge branch 'develop' of https://github.com/google/blockly into feature/merge_nov_1 2016-11-01 18:00:26 -07:00
Andrew n marshall
52ffc64f6a Refactor variable rename to handle UI actions more directly. ()
FieldDropdown now has onItemSelected(..) method to handle the menu item selection action. Variable renames and deletes are now handled here, instead of during validation.

Also fixes an issue deleting variables used by less than two blocks.

Fixes .
2016-11-01 16:32:10 -07:00
rachel-fenichel
ed9453cfb5 fix some annotations 2016-10-21 17:38:57 -07:00
rachel-fenichel
3d53b1e7fb Fix annotation 2016-10-21 17:34:59 -07:00
Andrew n marshall
81499e4392 Merge pull request from AnmAtAnm/alert-confirm-prompt
Adding hooks to support custom alert, confirm, and prompt dialogs
2016-10-20 17:20:00 -07:00
Andrew n marshall
8f3b4bcb5e Replaces calls to window.alert(), window.confirm(), and window.prompt() with Blockly.alert(), Blockly.confirm(), and Blockly.prompt(). These are designed to allow app developers to replace the dialogs with versions that match their own open app, possibly avoiding modal browser dialogs. They each take a callback, so the developer has the opportunity to implement non-modal behavior. 2016-10-20 16:30:40 -07:00
Tim Mickel
f318d6a7ea Tweaks for clicking blocks in toolbox ()
* Make a copy of listeners (fix ), allow ID lookup in flyout

* Move flyout cursor change to when block drags

* Fire a stack-click event in flyout, to match workspace
2016-10-13 17:09:41 -04:00
Chris Johnson
832df810c1 Stops duplicating on rename of old ID to old ID. 2016-10-09 13:11:21 -05:00
Shannon McCabe
f7bbaaa82d JSDoc format fixes 2016-10-07 14:30:14 -07:00
Neil Fraser
bd4c6d096f Use goog.array.remove 2016-10-04 21:20:07 -07:00
Tim Mickel
dec82e2551 Hide DropDownDivs and WidgetDivs on workspace clear () 2016-09-28 16:41:35 -04:00
Tim Mickel
a6f34ae519 Merge google/develop, recompile ()
* Check result of window.confirm before deleting variables.

* Create CONTRIBUTING.md

* Localisation updates from https://translatewiki.net.

* Cherrypick fixes made directly to master back into develop ()

* Check result of window.confirm before deleting variables.

* Create CONTRIBUTING.md

* rebuild

* Localisation updates from https://translatewiki.net.

* Minor wording change.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Simplify the handling of the active desc for a toolbox without categories.

* Remove tables from the HTML. Move the toolbar buttons to the end so that they don't impede switching between the toolbox and workspace.

* When cutting or copying a block, do not include blocks joined to it.

* Add shadow to flyout buttons.

* Move 'create new group' button to the bottom of each toolbox block, and remove other buttons if there is nothing in the workspace.

* Add keyboard shortcuts for cut, copy and paste operations.

* Remove clipboard buttons to simplify UI.

* Prevent setting a number value to NaN. Select the field value on entry to an input field. State the contents of the input field when describing the field.

* Add aria-level and aria-selected attrs to dropdowns.

* routine recompile

* Update demo to latest interpreter.

* Move 'move to marked spot' button to the top of the block options list.

* Fix incorrect aria-levels in toolbox tree component.

* Add new fields to toolbarButtonConfig.

* Recompile

* Remove CONTRIBUTING
2016-09-22 16:39:52 -04:00
picklesrus
dab7fd5751 Cherrypick fixes made directly to master back into develop ()
* Check result of window.confirm before deleting variables.

* Create CONTRIBUTING.md
2016-09-07 11:50:50 -07:00
Rachel Fenichel
a979a422e4 Merge branch 'develop' of https://github.com/google/blockly into merge_sept_01 2016-09-01 16:52:08 -07:00
Tim Mickel
f1aac859e3 Stripping old blocks code; moving blocks -> blocks_common, project-wide lint ()
* Remove unused Blockly blocks

* Remove unused text Blockly blocks; convert to JSON

* Move blocks/ -> blocks_common/

* Recompile for moved/removed blocks

* Remove spectools

* Project-wide lint

* Recompile August 30

* Pin package.json
2016-08-30 15:50:59 -04:00
Rachel Fenichel
d2ce081dc4 Move functions for updating variables on a workspace into workspace.js, and some lint 2016-08-17 16:07:50 -07:00
Rachel Fenichel
dfe61087f0 Correctly update variable list when pasting code 2016-07-14 15:39:41 -07:00
Rachel Fenichel
acbb456f0a Update variable list when copying in new blocks 2016-07-13 16:46:27 -07:00
Rachel Fenichel
18be9d1de8 Merge branch 'feature/variable_management' of https://github.com/google/blockly into feature/variable_management 2016-07-13 14:36:35 -07:00
Rachel Fenichel
3f0b2961a1 call allUsedVariables in addTopBlock 2016-07-07 15:28:23 -07:00
Rachel Fenichel
13c6c63daa Create variables from the flyout 2016-07-07 14:39:45 -07:00
Rachel Fenichel
4a81ecb601 Create variable list, and use it for add and rename 2016-07-07 14:38:56 -07:00
Tim Mickel
f1c7cae728 Remove maxBlocks (fix ) ()
* Remove `maxBlocks` (fix )

* Also remove filterForCapacity_

* More references to remainingCapacity
2016-06-21 15:54:03 -04:00
Tim Mickel
0594c88649 Remove obsolete "tap listeners". ()
These were put in before Blockly had UI events; they're no longer needed or used.
2016-05-25 12:23:02 -04:00
Rachel Fenichel
59e065ae5b Merge branch 'develop' of https://github.com/google/blockly into feature/merge_upstream_horizontal_toolbox 2016-05-23 13:07:11 -07:00
Rachel Fenichel
624a20efdd Merge branch 'develop' of https://github.com/google/blockly into google-blockly/develop 2016-05-12 18:30:42 -07:00
Rachel Fenichel
77a8b92ac2 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-05-11 11:44:38 -07:00
Rachel Fenichel
3605dfb9c0 Undo decimation of variable redeclarations 2016-05-10 14:40:48 -07:00
Rachel Fenichel
640b38f38e lint 2016-05-05 13:13:48 -07:00
Rachel Fenichel
a27fe99be4 Merge branch 'develop' into feature/horizontal_toolbox_port 2016-04-25 14:25:36 -07:00
Neil Fraser
9f260501fe Remove duplicate getBlockById function. 2016-04-18 03:14:55 -07:00
rachel-fenichel
21e999678c correctly position trash can and zoom controls when the flyout is always open; add flyout and toolbox size to main workspace metrics; get rid of flyout's vertical offset. 2016-04-13 15:30:11 -07:00
rachel-fenichel
18a1550285 Horizontal toolbox layout with positioning at start or end. 2016-04-07 14:02:22 -07:00
Neil Fraser
61b3fbfe11 Move block database to workspace. 2016-04-05 18:43:39 -07:00
Tim Mickel
3cbe49e37a Merge branch 'develop' of https://github.com/google/blockly into google-master-april-1
# Conflicts:
#	blockly_compressed_horizontal.js
#	core/block.js
#	core/block_render_svg_vertical.js
#	core/connection.js
#	core/inject.js
2016-04-01 15:00:44 -04:00
Tim Mickel
a65109f423 Merge remote-tracking branch 'Google/master' into google-master-april-1
# Conflicts:
#	blockly_compressed_horizontal.js
#	blockly_uncompressed_vertical.js
#	blocks_compressed.js
#	core/block.js
#	core/block_svg.js
#	core/blockly.js
#	core/connection.js
#	core/field_textinput.js
#	core/workspace_svg.js
#	generators/lua/lists.js
#	generators/lua/text.js
#	msg/js/he.js
#	msg/js/id.js
#	msg/js/sr.js
#	msg/js/zh-hant.js
#	msg/json/en.json
2016-04-01 14:44:46 -04:00
Neil Fraser
83925b2fe7 Merge branch 'master' into develop 2016-03-30 20:52:02 -07:00
Neil Fraser
a52c3e9db4 Roll back PR due to issue . 2016-03-29 20:56:15 -07:00
rachel-fenichel
e2f1a6c843 Fix annotations 2016-03-29 14:26:56 -07:00
Neil Fraser
d73531da6b Routine recompile. 2016-03-29 09:04:25 -07:00
Ciaran Jessup
9d99fe5385 Clearing the workspace now works even if a field is being edited
Previously if a workspace.clear() was executed whilst a field was being edited then the following errors would appear in the console and the blockly workspace would become unresponsive.

    Uncaught TypeError: Cannot read property 'removeChangeListener' of null(anonymous function) @       blockly_compressed.js:19071Blockly.WidgetDiv.hide @ blockly_compressed.js:20609Blockly.WidgetDiv.hideIfOwner @     blockly_compressed.js:20620Blockly.FieldTextInput.dispose @ blockly_compressed.js:18961Blockly.Input.dispose @     blockly_compressed.js:15786Blockly.Block.dispose @ blockly_compressed.js:17275Blockly.BlockSvg.dispose @     blockly_compressed.js:18327Blockly.Block.dispose @ blockly_compressed.js:17272Blockly.BlockSvg.dispose @     blockly_compressed.js:18327Blockly.Block.dispose @ blockly_compressed.js:17272Blockly.BlockSvg.dispose @     blockly_compressed.js:18327Blockly.Block.dispose @ blockly_compressed.js:17272Blockly.BlockSvg.dispose @     blockly_compressed.js:18327Blockly.Workspace.clear @ blockly_compressed.js:14510window.onmessage @ index.html:175
    blockly_compressed.js:19041

    Uncaught TypeError: Cannot read property 'scale' of nullBlockly.FieldTextInput.resizeEditor_ @     blockly_compressed.js:19041Blockly.Workspace.fireChangeListener @ blockly_compressed.js:14544Blockly.Events.fireNow_ @     blockly_compressed.js:18833
 

Explicitly hiding the popup div first avoids this problem.
2016-03-29 12:10:48 +01:00
Neil Fraser
05fc1ad91b Add workspace.clearUndo 2016-03-25 19:03:18 -07:00
Neil Fraser
6ae436a153 Add undo/redo context menu options on workspace. 2016-03-17 14:44:26 -07:00
Neil Fraser
3bf04aedc6 Add toJson to events. 2016-03-16 17:55:44 -07:00
Tim Mickel
5241c4dd9f Merge remote-tracking branch 'Google/develop' into upstream-march-15
# Conflicts:
#	blockly_compressed_vertical.js
#	blockly_uncompressed_vertical.js
#	blocks/text.js
#	core/block_svg.js
2016-03-15 10:35:47 -04:00
Neil Fraser
72bb08a4ec Add undo/redo.
Some bugs in undoing function argument changes.
2016-03-14 23:14:05 -07:00
Tim Mickel
516cd05d82 Merge remote-tracking branch 'Google/develop' into feature/upstream-merge-march-11-2
# Conflicts:
#	blockly_compressed_vertical.js
#	blocks_compressed.js
#	build.py
#	core/connection.js
#	core/workspace.js
#	tests/playground.html
2016-03-11 13:18:14 -05:00