Commit Graph

491 Commits

Author SHA1 Message Date
Sean Lip
5c79d2f36f When the workspace is empty, make it easy for the user to add a new group of blocks to it. 2016-11-22 15:53:45 -08:00
Neil Fraser
fbd9276e9c Lint 2016-11-18 20:26:56 -08:00
Sean Lip
602c1ba56e Delete the on-screen toolbox. 2016-11-17 17:45:12 -08:00
Sean Lip
6ab1244560 Add a contextual modal for the toolbox. 2016-11-17 15:58:23 -08:00
Sean Lip
a027ec8573 Move away from using a common modal service, since the block options and the toolbox modals are going to end up behaving fairly differently. 2016-11-16 16:47:26 -08:00
Sean Lip
25588fc7bd Break the sidebar out into its own individual component. 2016-11-15 17:19:01 -08:00
Neil Fraser
f6aef459fc API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
2016-11-15 13:54:33 -08:00
Rachel Fenichel
1f67654088 Merge pull request #736 from google/fraser-develop
Allow images in dropdown menus.
2016-11-15 13:07:46 -08:00
Sean Lip
b1109f47f0 Add correct focus behavior for the modal. Update boundary sounds. 2016-11-14 18:31:36 -08:00
Neil Fraser
98c341bcfb Allow images in dropdown menus. 2016-11-05 00:17:07 -07:00
Neil Fraser
5b033e2f7b Misc cleanup. 2016-11-05 00:15:39 -07:00
Andrew n marshall
52ffc64f6a Refactor variable rename to handle UI actions more directly. (#726)
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 #723.
2016-11-01 16:32:10 -07:00
Andrew n marshall
0156f2e103 Addressing comments from #703 2016-10-28 16:04:57 -07:00
Neil Fraser
9e5273bfc7 Update JS Interpreter to latest. 2016-10-26 20:42:21 -07:00
Neil Fraser
144be4d49f Block highlighting
* Separate block selection (editing) from highlighting (execution).
* Remove add/removeDragging functions. They clutter the API for no reason.
2016-10-26 18:39:56 -07:00
Neil Fraser
4f08f2536f Replace category colour pallet with correctly calculated colours. 2016-10-23 01:05:13 -07:00
Andrew n marshall
81499e4392 Merge pull request #703 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
acb5569d39 Adding a demo for custom dialogs. 2016-10-20 16:30:55 -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
Neil Fraser
9fe29a9cc2 Block Factory: Add missing workspace options, fix reset button. 2016-10-17 17:32:14 -07:00
Neil Fraser
728284ab61 Disable options in readonly mode. (Block Factory) 2016-10-14 08:57:39 -07:00
Neil Fraser
a2e7481d04 Stop block exporter options from jumping around. 2016-10-14 08:29:48 -07:00
Neil Fraser
ea1d0d7d3a Add labels to Block Factory. 2016-10-14 07:47:23 -07:00
Neil Fraser
8b7ce77f8e Rotate Block Factory colour picker 90deg for more room. 2016-10-14 07:29:41 -07:00
Neil Fraser
5e797c704c Fix orphaned and overlapping menus in Block Factory. 2016-10-14 07:16:31 -07:00
Neil Fraser
5fc9e04b5c Untangle modal buttons. 2016-10-14 06:57:21 -07:00
Neil Fraser
32d09de62f Make dropdown in Block Factory modal. 2016-10-14 05:39:10 -07:00
Neil Fraser
c677a8efe4 Fix two incorrect URLs in Closure dialog. 2016-10-14 02:39:10 -07:00
Neil Fraser
7550cb1e96 Fix loading of Block Factory in Firefox. 2016-10-14 02:20:25 -07:00
Neil Fraser
7255ec0eec Fix #693, this time correctly. 2016-10-14 02:00:43 -07:00
Neil Fraser
92e92cdeaf Fix race condition when loading. 2016-10-14 01:56:55 -07:00
Neil Fraser
ff48285a86 Block factory cleanup. Fix one-based list option. 2016-10-13 20:18:44 -07:00
picklesrus
7c2016284a Change label of block factory to blockly developer tools. Change the icon too. Also remove old, unneeded index.html file from workspacefactory directory. (#694) 2016-10-12 11:21:59 -07:00
picklesrus
88dba494b9 Commit 941bdcd187 swapped caseInsensitiveCompare with toLowerCase but forgot to swap the check so it reversed the (#693)
error case. Fixing.
2016-10-12 11:06:09 -07:00
Neil Fraser
941bdcd187 Remove a bunch of Closure from Block Factory. 2016-10-11 16:50:13 -07:00
Neil Fraser
5df55ddea0 Block(ly) Factory prompts should have defaults. Drop unused copy of colourpicker code. 2016-10-11 12:16:17 -07:00
picklesrus
c102734ccb Replace Block Factory with Blockly Factory. Save Block Factory in blockfactory_old for safety. (#691)
Keep icon.png and blocks.js back into blockfactory rather than pointing to blockfactory_old.
2016-10-11 11:25:07 -07:00
Neil Fraser
e95c437919 Very quick readability pass on Blockly Factory. 2016-10-06 19:53:48 -07:00
Rachel Fenichel
3f9b40ff61 add option to skip exporting block ids in XML, and use it in the workspace factory 2016-10-05 16:49:19 -07:00
picklesrus
1e58be0cd6 Fix #636 by changing the factory_base block definition to only (#671)
span shadow blocks for output types when the dropdown to
add/change/remove output types is changed.  This way, we won't overwrite
existing blocks when loading from xml.
2016-10-05 15:04:52 -07:00
Sean Lip
8bd64948dd Introduce a FieldSegment component for handling blocks with multiple fields. 2016-10-05 12:45:50 -07:00
picklesrus
70a8bcd4df Add warning if you do not have required parts of closure available when loading BlocklyFactory. This should be temporary until #668 is fixed (#669) 2016-10-04 16:26:09 -07:00
picklesrus
58774811b3 Replace guts of buggy hasVariableField method and just ask the block for variables instead. (#667) 2016-10-04 16:18:29 -07:00
Katelyn Mann
e5635325d5 Fix #648. It was calling method on the wrong object. Broken by refactoring in #606. 2016-10-04 13:17:09 -07:00
Katelyn Mann
f680800b97 Fix #643 to make exported json valid 2016-10-04 11:04:06 -07:00
Sean Lip
3b84076c93 Add new fields to toolbarButtonConfig. 2016-09-21 15:41:58 -07:00
Neil Fraser
5cdb843f3e Update demo to latest interpreter. 2016-09-20 12:52:22 -07:00
Emma Dauterman
953fb9f1b4 Blockly Factory: Check for Unsaved Changes in Workspace Factory (#617)
* Bug fix for adding variables and procedures categories with prompt, removed blocks from category name, check if unsaved changes in workspace factory before leave

* Updated flags in clear all. Added more comments

* Solved merge conflicts
2016-09-01 10:38:52 -07:00
Tina Quach
66188b4c54 Blockly Factory: Global Self Bug Fix (#616)
* fix bug with global self

* cleaned up code, moved warn into block lib controller, check for starter block in FactoryUtils.savedBlockChanges
2016-09-01 09:56:16 -07:00
Tina Quach
cbdf8a597e Blockly Factory: Warn user when leaving/refreshing page (#607)
* warn user upon refreshing page and leaving page (by going to prev page or by exiting the window or tab)

* alert upon leaving page ONLY when unsaved changes

* nit remove log

* no alert when on starter block, added clarifying comment
2016-08-31 13:39:47 -07:00