Commit Graph

1631 Commits

Author SHA1 Message Date
Tim Dawborn 69df716ef5 Fixes as per code review on PR. 2017-01-16 08:48:11 +11:00
Tim Dawborn f9e0552c11 Add an allInputsConnected method to Block and Workspace to test whether all trees in the block forest have their inputs filled. An optional argument controls whether or not shadow blocks are counted as being filled. Recommitting changes off develop instead of master as per discussion in PR #791. 2016-12-28 12:26:53 +11:00
Neil Fraser 06c2ebcba8 Merge pull request #795 from groklearning/python-string-quoting-repr
Change string quoting in Python codegen to match what `repr` does.
2016-12-21 22:03:54 -08:00
Tim Dawborn 48e58859fe Change the Python codegen for string quoting to match the behaviour of repr on a string in CPython. 2016-12-22 15:51:23 +11:00
picklesrus 6aee3ed2da Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. (#787) 2016-12-16 09:52:19 -08:00
Rachel Fenichel 6b39c7d646 Merge pull request #782 from rachel-fenichel/feature/flyout_disable_resize
Disable workspace resizing while loading the flyout from XML
2016-12-15 11:15:39 -08:00
picklesrus e1cd21842a Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.

* Address code review comments

* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
2016-12-15 11:02:49 -08:00
Rachel Fenichel f54f229bc2 Disable workspace resizing while loading the flyout from XML 2016-12-14 17:06:09 -08:00
picklesrus 5b6f1debeb Move the call to disable resize before placeNewBlock so that it is of… (#777)
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock.  This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
2016-12-14 14:57:32 -08:00
Rachel Fenichel 166278e0a5 Merge pull request #775 from rachel-fenichel/feature/generator_docstrings
Update generator comments
2016-12-12 14:13:09 -08:00
Rachel Fenichel 22b018321c update generator comments 2016-12-09 22:10:36 -08:00
Rachel Fenichel 33d6f72b29 Merge pull request #650 from trodi/generator-docs
Add Generator functions to prototype + JSDoc
2016-12-09 17:46:47 -08:00
picklesrus bdc5a02922 Fix #698 by adjusting the regex to not have \. Still not 100% sure w… (#700)
* Fix #698 by adjusting the regex to not have \.  Still not 100% sure why that was there.
Also replaces bad names on input.  There are probably more invalid names but this is
a start.
2016-12-09 17:19:17 -08:00
picklesrus ccbaa4664e remove overflow-y on the block exporter labels so scroll bars do not show upin firefox. Also fix up the styles on the labels so that they display better in firefox. (#699) 2016-12-09 16:34:33 -08:00
picklesrus a82bd49d7e Split the scrollbar and flyout out into their own SVG elements. They (#771)
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG.  This paves the way to make performance
improvements to workspace dragging.
2016-12-09 16:19:19 -08:00
Rachel Fenichel b5d0303905 Merge pull request #769 from drigz/fix-touchpad-scroll
Make zoom speed independent of event granularity
2016-12-09 15:33:51 -08:00
Rodrigo Queiro 8384f8fe05 Make zoom speed independent of event granularity
Before, touchpads would give "smoother" scrolling by delivering lots of
mousewheel events with small distance changes. Because the code only
looked at the sign of deltaY, ten 5px scrolls would zoom 10x more than
one 50px scroll.

This change makes zooming with a touchpad more like zooming with a
mousewheel. On my laptop, a full-scale zoom (fully out to fully in) was
about a 5mm finger movement before, and is now about 3cm.

Fixes #758.
2016-12-09 11:12:28 +01:00
Sean Lip 30a4a1930f Fix issue with aria-liveregion not speaking. Allow sufficient time for alert noise to play before speaking the notification. 2016-12-08 19:55:42 -08:00
Sean Lip 521909b2dd Add an aria-describedby to the 'create new block group...' button in the workspace to give more context. 2016-12-08 19:23:40 -08:00
Sean Lip 5960aa8461 Use Tab keys instead of arrow keys for dialog boxes. Set role=alertdialog and read out the header/text automatically. Ensure that Esc key actually closes dialogs and that all keystrokes are captured. 2016-12-08 18:27:17 -08:00
Rachel Fenichel da70ce4cdb Merge pull request #768 from rachel-fenichel/feature/block_factory_helpurl
Update block factory to make setting colour, helpurl, and tooltip easier
2016-12-08 14:57:19 -08:00
Rachel Fenichel 99c30007a7 Generate helpURL and tooltip for Javascript block definition 2016-12-08 14:41:40 -08:00
Rachel Fenichel 4871ff9fda Start getting helpurl and tooltip in 2016-12-08 14:26:53 -08:00
Rachel Fenichel 1d55e28610 Add colour block to the block factory base block initial state 2016-12-08 14:26:53 -08:00
Rachel Fenichel 25ca1bccff Merge pull request #767 from rachel-fenichel/feature/register_button_callbacks_on_workspace
Associate flyout button callbacks directly with workspaces
2016-12-08 14:11:18 -08:00
Rachel Fenichel 086fd720b2 Associate flyout button callbacks directly with workspaces 2016-12-08 13:05:19 -08:00
Neil Fraser 5b86b9792d Don't get Toolbox element unless needed. 2016-12-07 00:22:46 -08:00
Sean Lip 09980308ec Remove premature focus on buttons in modal dialogs, since this prevents readout of the dialog text. 2016-12-05 18:12:48 -08:00
Sean Lip 2a172c761c Standardize indentation. 2016-12-05 17:54:12 -08:00
Sean Lip 51f42ef5a3 Remove some functions from utilsService and consolidate code in workspace-tree.component.js. 2016-12-05 17:52:45 -08:00
Sean Lip 04785a2222 Clean up the sidebar file and remove unneeded code. 2016-12-05 17:39:03 -08:00
Sean Lip 7b7e62e3e2 When adding a new block group from the toolbox modal, only show blocks with no output connections. 2016-12-05 16:39:12 -08:00
Rachel Fenichel c9a6dcdfd9 Merge pull request #764 from rachel-fenichel/cleanup/semicolon
fix missing semicolon
2016-12-05 16:13:07 -08:00
Rachel Fenichel 17258990fd fix missing semicolon 2016-12-05 16:11:59 -08:00
Rachel Fenichel 885490b835 Merge pull request #761 from rachel-fenichel/feature/label_classes_2
Add classes to labels with web-style attribute in xml
2016-12-05 15:16:57 -08:00
Rachel Fenichel 729c442c31 lint 2016-12-05 15:14:02 -08:00
Neil Fraser 97644fdf04 Improve comments. 2016-12-03 06:34:18 -08:00
Rachel Fenichel 7f4efe4ebe createSvgElement is now in utils. fix two calls. 2016-12-02 14:12:34 -08:00
Rachel Fenichel 7b783dc30a change 'class' to 'web-style' 2016-12-02 14:08:50 -08:00
Rachel Fenichel 1bac79791e console.log -> console.warn 2016-12-02 14:04:02 -08:00
Rachel Fenichel ff87c76557 Don't make labels clickable 2016-12-02 14:03:49 -08:00
Rachel Fenichel effc1d5f1c Add ability to specify a css class for labels and buttons 2016-12-02 14:01:36 -08:00
Sean Lip e13ce31282 Change dropdowns to select fields instead of lists of buttons. 2016-12-01 14:56:09 -08:00
Neil Fraser 0b7da4b576 Merge pull request #754 from google/paternity
When user edits text in a field, set text, not value.
2016-11-30 17:59:03 -08:00
Sean Lip 10efda6d9c Refactor and simplify marked spot logic. 2016-11-30 16:45:06 -08:00
Sean Lip 4c30b91bc6 Remove clipboard functionality. 2016-11-30 15:31:19 -08:00
Sean Lip 69d4ebb6dd Improve styling of sidebar buttons. 2016-11-29 19:01:34 -08:00
Sean Lip 65bad28f61 Minor refactoring. Remove unused dependencies. 2016-11-29 18:50:31 -08:00
Sean Lip 4e623631dd Update config options for sidebar buttons. 2016-11-29 18:24:50 -08:00
Sean Lip b75925004c Do some refactoring and tidy-up. Pull some hardcoded strings out for i18n purposes; remove unused strings. 2016-11-28 18:57:44 -08:00