Commit Graph

283 Commits

Author SHA1 Message Date
Emma Dauterman
4192ca6b52 Blockly Factory: Prompt User to Add Variables/Functions Category (#589)
* Fixed marking shadow blocks so keeps warnings when switching between categories

* Done with variable and procedure block checks

* Used setShadowDom instead of shadowDom_, and nit changes in wfactory init

* Fixed bug of disable div covering whole screen
2016-08-26 11:35:53 -07:00
Tina Quach
6e88d5c035 alert when creating new block with unsaved changes (#594)
working warnings on tab switches and create new block
2016-08-26 11:24:56 -07:00
Emma Dauterman
0cf5d12374 Blockly Factory: Resize Workspaces in Workspace Factory (#593)
* Made workspace factory toolboxes take up height of screen, made workspce options properly scrollable, fixed being able to accidentally see Block factory some times, made Exporter and workspace factory scrollable if necessary

* Nit alphabetize css rules

* Fixed display none problems for Block factory, making it so that it can be hidden properly

* Nit css style
2016-08-25 16:40:25 -07:00
Tina Quach
31d6e941e7 Blockly Factory: Disable Disconnected Blocks, Nit UI, Bug fix (#595)
* disabled disconnected blocks in block factory

change to block def and also warn user

fixed bug and renamed math_foo

* clearUndo upon opening a saved block, change alert messages that use ok

* removed warning for unsaved blocks. in separate CL

* fix bug and make the blank option clickable
2016-08-25 11:29:29 -07:00
Emma Dauterman
359e48c41b Blockly Factory: Warning for Undefined Blocks (#581)
* Done adding warning if not using defined block

* Nit comments

* Nit warning message

* Small fix for clear

* Fixed merging errors
2016-08-24 11:19:19 -07:00
Tina Quach
134b40c275 Blockly Factory: Use StandardCategories, No Abbreviations (#583)
* used standard categories

no abbrevs in function names for controllers

* no abbreviations in factory_utils function names
2016-08-24 10:31:29 -07:00
Tina Quach
8e44684c81 Blockly Factory: Clean Up Workspace on Save Block, Import Lowercase Types (#584)
* save only factory base block upon save to library; import block library with lowercase blocktypes

* nit comment
2016-08-24 10:29:24 -07:00
Emma Dauterman
aa9dd9646a Bug fix for clear (#582) 2016-08-23 13:47:08 -07:00
Tina Quach
b0432306a1 Blockly Factory: New Selector UI (#579)
* generate block selector with checkboxes

working click handler

updated block exporter view and controller to work with new UI

select a block by clicking on the option--not just checkbox

renamed selectorWorkspace and fixed checkbox selecting bug

adding used blocks works

added and cleaned up css, removed extra exporter controller function, nit  comment

simplified code

* style

* does not clear selected blocks upon tab switch

* added tooltips to buttons, reworded some buttons

* remove console.log statement and clarify this.selected in blockoption

* removed console log & nit comment
2016-08-23 13:39:01 -07:00
Emma Dauterman
ab850b9863 Blockly Factory: Workspace Factory UI (#577)
* Some UI changes made

* CSS changes

* Done with UI tweaks

* Changing arrow key event listeners, also changing category header in category list

* Fixed bug with error on updating toolbox with read only

* Changes to factory.css and workspacefactory view

* Bug fixes and UI changes and refactoring to have enableKeyEvents in wfactory controller

* Uncommented catch

* Changes to app_controller.js to use constants, other nit changes

* Nit line breaks
2016-08-23 10:48:36 -07:00
Tina Quach
6953afb0b5 added preview of code to export in exporter tab, it dynamically updates with each block selection (#573)
moved inject code out to factory utils, refactored updatePreview and similar functions in exporter controller

refactor
2016-08-23 10:33:48 -07:00
Tina Quach
7516866804 Blockly Factory: Select Used Blocks for Export (#565)
* addAllUsedBlocks in exporter works when you hand set the instance variable.

added click handler for export button (which got lost in refactor).

saveStateFromWorkspace on tab switch

fixed bug in deselect block in exporter; added warning alert for add all used blocks

* nit line

* not warning for standard block types
2016-08-22 18:07:52 -07:00
Emma Dauterman
66eff965c9 Blockly Factory: Workspace Factory Import Buttons (#578)
* Split import into 2 buttons, made file endings consistent

* Nit spelling

* Nit removed logging message
2016-08-22 17:48:31 -07:00
Tina Quach
37fae54a59 Block Factory: Nit UI Changes (#570)
* switch block factory buttons, clarify exporter helper text,rename block selector

* add space between navigation bar and content. hide toolbox content.

* nit space

* moved helper text out of the columns and moved currently selected blocks into export settings
2016-08-22 17:45:28 -07:00
Emma Dauterman
7fc476db36 Made StandardCategories a namespace for all of BlocklyFactory to use, included coreBlockTypes (#572) 2016-08-19 14:59:09 -07:00
Emma Dauterman
61af94314e Blockly Factory: Generate Block Library Category in Workspace Factory (#568)
* Added block library category to toolbox workspace in workspace factory and update it each time user switches to workspace factory

* Added whitespace to end of index.html

* Bug fixes for convertShadowBlocks and updateState

* Last part of bug fix for adding separators
2016-08-19 09:48:51 -07:00
rachel-fenichel
21fea1279c Merge pull request #557 from google/feature/variable_management
Integrate variable management into develop.
2016-08-18 15:56:18 -07:00
Tina Quach
bbb80c5243 Blockly Factory: Warn ONLY if Using Standard Block Name (#567)
* remove warning after user changes block type

* nit comment

* nit line length
2016-08-18 15:42:21 -07:00
Emma Dauterman
394b618a67 Blockly Factory: Import Blocks to Workspace Factory (#566)
* Can import blocks in JSON and Javascript to generate new category in toolbox workspace

* Added try/catch to file reading

* Added comment to getDefinedBlocks in generator and changed name

* Use random color for imported category and use different call to
update toolbox

* Nit removed extra line
2016-08-18 15:41:26 -07:00
Emma Dauterman
00c04688da Blockly Factory: Shadow Block Validation in Workspace Factory (#563)
* Added more shadow block validation and cascading when adding shadow blocks

* Rebased and small bug fix in add category

* Removed warning text in addShadow

* Broke long if statement into inlined function
2016-08-18 15:37:19 -07:00
Tina Quach
204e28f63f block library now exports valid xml and properly handles the imported xml in a robust way (#555) 2016-08-18 09:20:09 -07:00
Emma Dauterman
7b854f85a4 Blockly Factory: Update Workspace Factory Tab (#562)
* Updated tab in blockly factory to reflect changes made to workspace factory, changes mainly in index.html and wfactory_init.js

* Added tab for workspace editing mode

* Changed font size in dropdown menu

* Added class for options inputs to add event listeners more easily
2016-08-17 15:56:30 -07:00
Tina Quach
55aa5b804a Blockly Factory: Generate Category Xml (#552)
* generate category xml from block library and from imported block defs

* simplified algorithms for parsing block definition and cleaned up style

* refactored getCategoryFromBlockDefs, breaking it up and moving it to FactoryUtils

* refactored getCategoryXml, fixed bug in updatingToolBox of exporter

* removed unneeded function, added quick check for empty library

* nit comments
2016-08-17 15:49:24 -07:00
Emma Dauterman
e633539d52 Blockly Factory: Rename WorkspaceFactory Classes (#553)
* Changed all namespaces from 'Factory' to 'WorkspaceFactory'

* Fixed brace problem in factory.js, syntax error in app_controller.js
2016-08-16 16:14:51 -07:00
Emma Dauterman
33f0f51968 Wrote getAllUsedBlockTypes in model, small change to generator (squashed commit) (#554) 2016-08-16 16:00:27 -07:00
Emma Dauterman
8ec5745611 Add Workspace Factory to Blockly Factory Tab (#538)
* Starting to integrate workspacefactory

* Committing before switching branches

* Tab for workspace factory working

* Committing before switching branches

* Refactored to have FactoryInit namespace and move logic out of AppController

* Nit typo fix.

* Fixed bugs from rebasing

* Nit fix in factory.css

* Added this. to previewWorkspace
2016-08-16 15:52:12 -07:00
Tina Quach
1c06bcdacc Blockly Factory: Warn if Using Standard Block Name (#550)
* added warning if a block type already exists in blockly standard category

simplified isStandardBlockType

* simplified code, removed isStandardBlockType function

* nit remove implementation detail from comment
2016-08-16 15:48:27 -07:00
Emma Dauterman
7810a5397d Blockly Factory: UI for Navigation Bar, Help Button, Exporter (#549)
* Did cherry-picking for style changes with different resolution, no workspace factory style yet

* Nit changes

* Moving style out of index.html to factory.css

* Nit ordering in factory.css
2016-08-16 15:38:44 -07:00
Tina Quach
f6f39c48f5 Blockly Factory: Factory Utils (#535)
* created FactoryUtils, to share useful generator code between the different apps within Blockly Factory

* undo removal of alert upon empty block library

nit removed specification of wfactory exporter param in comment for export controller

* remove alert from index and nit comment in wfactory generator
2016-08-15 17:45:08 -07:00
Tina Quach
6885a88a82 removed unneeded download buttons and alert (#547) 2016-08-15 13:23:54 -07:00
Emma Dauterman
06f21f85e4 Blockly Factory: Add Pre-loaded blocks tab with import/export to workspace factory (#546)
* Added pre-loaded blocks with import and export, squashed commit.

* Configure Options object

Allows user to configure the options object, see changes in the preview workspace, and export the options object (squashed commit).

* Nit changes to style.css
2016-08-15 13:21:50 -07:00
Tina Quach
0d66c77357 show the starter block upon deleting a block and clearing block library (#548) 2016-08-15 11:18:15 -07:00
Rachel Fenichel
a2b3a3638a Merge branch 'develop' into feature/variable_management 2016-08-12 14:32:26 -07:00
Tina Quach
3748b6f8bd refactored onTab to call a single function for visually turning tabs on or off depending on whether it is selected (#544) 2016-08-12 14:17:18 -07:00
Tina Quach
73fbc06d4a Blockly Factory: Foundation for Integrating Workspace Factory (#533)
* working tabs using closure

expanded export settings menu

added old blockfactory and moved new files into blocklyfactory

expanded export to lay groundwork for workspace factory integration

fixed BlockFactory escapeString bug

* added TODO for refactoring onTab
2016-08-10 14:56:21 -07:00
Emma Dauterman
8211bb30f4 Workspace Factory (#522)
Workspace factory helps developers configure their workspace by allowing them to drag blocks into the workspace to add them to their toolbox. 
Current features:

supports categories or a single flyout of blocks
updates a preview workspace automatically
imports toolbox XML already written
exports toolbox XML to a file
prints toolbox XML to the console
imports a standard Blockly category
supports shadow blocks (allowing the user to move shadow blocks and toggle between shadow blocks and normal blocks), disabled blocks, block groups
allows the user to add/move/delete/rename/color categories and separators.
2016-08-10 11:03:11 -07:00
Tina Quach
9819d677a9 Blockly Factory: Block Library & Block Exporter (#530)
Created Blockly Factory, an expansion of the Block Factory demo that adds the Block Library and Block Exporter to the Block Factory. 

The Block Library provides the interfaces for the user to save their blocks to local storage so that upon opening and closing the page, their blocks will still persist. In Blockly Factory, Users can re-open saved blocks for edit through a dropdown interface, delete blocks from their library, clear their block library, and import and export their block library. Importing and exporting their block library may be useful for creating specific sets of in-progress blocks for editing.

The Block Exporter allows users to export block definitions and generator stubs of their saved blocks easily by using a visual interface powered by Blockly. It contains a selector workspace in which users add and remove blocks to the workspace to select and deselect them for export.
The exporter also contains an export settings form through which people may export block definitions and generator stubs.
2016-08-10 10:49:19 -07:00
Sean Lip
93af9c59b3 Add functionality for playing audio files. 2016-08-09 17:29:53 -07:00
Rachel Fenichel
350e1ff2cc Merge remote-tracking branch 'upstream/develop' into feature/variable_management_merge_develop 2016-08-08 16:58:51 -07:00
Sean Lip
051d5bc099 Remove superfluous menus from toolbox. Use aria live region instead of alerts, and redo the text based on user feedback. Add a simple tutorial at the top of the demo page. 2016-08-04 19:04:13 -07:00
Neil Fraser
d6d8b8eb97 Remove obsolete webkit CSS prefixes. 2016-08-03 18:33:18 -07:00
Sean Lip
9f22701a42 Remove disabled blocks from the accessible blockly demo. 2016-08-03 14:56:13 -07:00
rachel-fenichel
ef6c99c465 Merge pull request #517 from quachtina96/prefer-json
Block Factory: set JSON to default language format for block definitions
2016-08-02 09:59:57 -07:00
quachtina96
ae8fedc496 set JSON to default language format for block definitions 2016-08-01 17:03:08 -07:00
picklesrus
51a6bd3873 Call Blockly.svgResize() once the div it is going to be placed in (#489)
knows what size it is going to be.
2016-07-30 23:26:53 -07:00
Neil Fraser
f952cd9f2e Merge branch 'master' into develop 2016-07-26 17:22:25 -07:00
Hasso Tepper
b94dff049e Add Estonian translations to the code and plane demos (#505) 2016-07-26 17:20:54 -07:00
Sean Lip
606a5e1d08 Clean up active desc properly when a tree is removed from the workspace. Handle tree and screenreader focus correctly for 'move to marked spot' operations. 2016-07-21 16:30:38 -07:00
Rachel Fenichel
f040929bd8 Merge remote-tracking branch 'upstream/develop' into feature/merge_develop 2016-07-15 13:07:07 -07:00
Neil Fraser
efc2ca3d82 Add field_number to Block Factory. 2016-07-10 22:54:57 -07:00