Commit graph

1281 commits

Author SHA1 Message Date
Rodrigo Queiro
88eac2480b Convert string tag name to goog.dom.TagName (#515)
in createDom calls only. This improves the type information of the
created objects.
2016-08-19 03:55:45 -07:00
Sean Lip
e03b191f73 Add more help labels. 2016-08-18 19:27:25 -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
Sean Lip
6da1f56879 Change below/above to after/before for 'paste' and 'mark spot' buttons. 2016-08-17 16:31:41 -07:00
Sean Lip
b6d3351739 Add more indicators to move to the right to view the submenu. 2016-08-17 16:21:50 -07:00
Rachel Fenichel
15d937c63a Merge remote-tracking branch 'upstream/feature/variable_management' into feature/variable_management 2016-08-17 16:10:26 -07:00
Rachel Fenichel
0f7907c680 Update variable-related messages 2016-08-17 16:08:38 -07: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
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
rachel-fenichel
eba075b5b6 Merge pull request #556 from rachel-fenichel/feature/variable_management
Use a Blockly.Msg for button text
2016-08-16 16:56:32 -07:00
Rachel Fenichel
19722e2350 Use a Blockly.Msg for button text 2016-08-16 16:53:53 -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
rachel-fenichel
ba375412b8 Merge pull request #540 from picklesrus/develop-mutator-coord
Fix for #521.
2016-08-16 11:49:11 -07:00
Katelyn Mann
33e9d75457 Fix for #521.
Add a isMutator member similar to isFlyout to workspace_svg so it knows whether
it is mutator or not. Allow blocks to access that property so that they can recalculate
coordinates appropriately.
2016-08-16 11:19:29 -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
Sean Lip
d0083f802e Update text for marked spot and 'more options' labels. 2016-08-15 14:05:06 -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
c7dea98e88 Merge pull request #534 from picklesrus/develop-screenctm-bugs
Fix for #498.  Recalculate the things that use screen coordinates (de…
2016-08-12 17:15:20 -07:00
Katelyn Mann
244733467d Fix for #498. Recalculate the things that use screen coordinates (delete area and
screen transformation matrix) when a scroll happened.
This is not done using a scroll handler since the update
is expensive (getScreenCTM and getClientBoundingRect) and we don't need to do it
until the scroll is done and the user is interacting with blocks again.
2016-08-12 16:56:22 -07:00
rachel-fenichel
aa8cc2cb9f Merge pull request #545 from rachel-fenichel/feature/variable_management
Merge from develop.
2016-08-12 14:37:09 -07:00
Rachel Fenichel
a2b3a3638a Merge branch 'develop' into feature/variable_management 2016-08-12 14:32:26 -07:00
rachel-fenichel
aa4014d933 Merge pull request #542 from rachel-fenichel/feature/procedure_variables
Disallow deleting variables that are used in the definition of a function
2016-08-12 14:23:29 -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
Rachel Fenichel
70ff4291af Double quotes around variable names 2016-08-12 11:09:32 -07:00
rachel-fenichel
9a03734438 Merge pull request #543 from rachel-fenichel/bugfix/variable_from_toolbox
Create variables on block creation
2016-08-12 10:24:45 -07:00
Rachel Fenichel
d50f806624 Create variables on block creation 2016-08-11 17:31:19 -07:00
Rachel Fenichel
775e298c2c Disallow deleting variables that are used in the definition of a function 2016-08-11 17:10:15 -07:00
rachel-fenichel
5e787afe8e Merge pull request #539 from rachel-fenichel/feature/procedure_variables
Create variables from the procedure definition mutator
2016-08-11 16:39:07 -07:00
Rachel Fenichel
c7a5944ea3 Create variables from procedure definitions 2016-08-11 14:59:11 -07:00
rachel-fenichel
dd0e88b28b Merge pull request #537 from picklesrus/develop-dispose-injectiondiv
Fix #536 by changing workspace's dispose method to remove the injectD…
2016-08-11 11:26:11 -07:00
Katelyn Mann
bbd57a9a16 Fix #536 by changing workspace's dispose method to remove the injectDiv wrapper of the
svg. The wrapper div was introduced in #512.
2016-08-11 11:00:02 -07:00
Sean Lip
3a1d9cdec1 Prevent the tabbable area from being restricted to the toolbox and workspace. 2016-08-10 18:30:16 -07:00
rachel-fenichel
3019269f93 Merge pull request #526 from rachel-fenichel/feature/variable_management_deletion
Ask user for confirmation when deleting multiple uses of a variable.
2016-08-10 16:42:04 -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
rachel-fenichel
99362955ab Merge pull request #531 from rachel-fenichel/bugfix/toolbox_separator
Parse separators in xml in always-open flyouts
2016-08-10 12:28:26 -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
Rachel Fenichel
dc02dfb8ff Separators specified in toolbox XML should replace, not add to, previous gaps. 2016-08-09 17:51:50 -07:00
Sean Lip
93af9c59b3 Add functionality for playing audio files. 2016-08-09 17:29:53 -07:00