Commit Graph

1220 Commits

Author SHA1 Message Date
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
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
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
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
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
Rachel Fenichel
3998ecec3a Parse separators in xml in always-open flyouts 2016-08-09 16:34:59 -07:00
rachel-fenichel
5aa3add06c Merge pull request #528 from drigz/test/domToWorkspace
Add a test for domToWorkspace
2016-08-09 11:11:53 -07:00
Rodrigo Queiro
ef55c29d52 Add a test for domToWorkspace
This would have caught a recent
[Scratch Blocks regression](https://github.com/LLK/scratch-blocks/pull/557)
where domToWorkspace failed unless given a WorkspaceSvg instance.
2016-08-09 15:50:34 +02:00
Sean Lip
7edbaf9ee2 Announce top-of-list, bottom-of-list, and current location in response to up/down/tab/shift-tab keypresses, where appropriate. 2016-08-05 17:52:02 -07:00
Sean Lip
afe3c63cab Do not intercept keystrokes that include Alt/Ctrl. 2016-08-05 17:26:23 -07:00
Sean Lip
78ae42b267 After marking a spot or copying a block in the workspace, move the active desc to the parent. 2016-08-05 17:20:41 -07:00
Sean Lip
f7b0c1b5e6 Move action menu below the block description. Edit the aria label to improve discoverability of the submenu. 2016-08-04 19:28:36 -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
Sean Lip
e4b01dee44 Remove block input list breakdowns from the toolbox. 2016-08-04 16:45:25 -07:00
Neil Fraser
875ffad42c Fix selection bug on bumps caused by mutator actions. 2016-08-03 18:33:18 -07:00
Neil Fraser
d6d8b8eb97 Remove obsolete webkit CSS prefixes. 2016-08-03 18:33:18 -07:00
Neil Fraser
2be214ca74 Remove apparently unneeded scrub on procedures. 2016-08-03 18:33:18 -07:00
Sean Lip
d362c73a04 Allow a placeholder for empty fields to be specified when generating block descriptions. (#509)
* Allow a placeholder for empty fields to be specified when generating block descriptions.

* Correctly handle recursive block stringification.
2016-08-03 17:47:34 -07:00
Sean Lip
69c887c998 Use a shorter name for the toolbox category aria labels. 2016-08-03 14:57:45 -07:00
Sean Lip
9f22701a42 Remove disabled blocks from the accessible blockly demo. 2016-08-03 14:56:13 -07:00
Sean Lip
5268ca94b9 Use more descriptive ARIA labels for toolbox categories. 2016-08-02 18:06:55 -07:00
rachel-fenichel
a263e29abd Merge pull request #519 from evd2014/develop
Make Blockly.WorkspaceSvg.cleanUp public
2016-08-02 17:21:59 -07:00
Emma Dauterman
831a14e1e4 Made Blockly.WorkspaceSvg.cleanUp public 2016-08-02 17:18:12 -07:00
Sean Lip
baf8bc49fd Do a DFS to find the first available input field or button when the user presses the Enter key. 2016-08-02 16:43:27 -07:00
Sean Lip
caccf3fcf7 Use the correct closure when executing block actions. 2016-08-02 15:57:12 -07:00
rachel-fenichel
0765d9cbd6 Merge pull request #482 from svbatalov/toolbox-hscroll-patch-event
Scroll toolbox with LEFT/RIGHT in horizontalLayout
2016-08-02 12:44:16 -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
Sean Lip
75a842b884 Refactor common functionality. Focus on new blocks immediately after they are created. Fix active descendant for tricky cases where moving a block to a marked spot splits the existing tree. 2016-08-01 19:20:20 -07:00
Sean Lip
2312a2d716 Improve screenreader focus behaviour when copying or moving blocks to a marked field. 2016-08-01 18:00:53 -07:00