Commit Graph

2328 Commits

Author SHA1 Message Date
Tim Dawborn
39731c6ddc Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg

* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
2017-01-27 09:19:58 -08:00
Rachel Fenichel
20d0730558 Merge pull request #877 from groklearning/bugfix-876
Remove IE/Edge-breaking use of Array.prototype.includes
2017-01-26 22:11:26 -08:00
Tim Dawborn
d55d9cbd9f Attempt to work around the IE/Edge bug where getComputedTextLength() throws an exception when the SVG node is not visible. This workaround forces a re-render, which in turn, forces a re-calculation of the node width once a block is inserted into the workspace SVG. This workaround is only executed on IE and Edge. See https://groups.google.com/forum/#!topic/blockly/T8IR4t4xAIY for the initial discussion of this issue. 2017-01-27 15:15:09 +11:00
Tim Dawborn
14ee069543 Remove use of Array.prototype.includes which is not implemented in IE or Edge < 14. Fixes google/blockly#876. 2017-01-27 13:51:18 +11:00
Andrew n marshall
10108cc697 jsdoc corrections (#874) 2017-01-26 17:33:55 -08:00
Rachel Fenichel
c005353189 annotation updates 2017-01-26 16:40:43 -08:00
Rachel Fenichel
3742788557 annotation updates 2017-01-26 16:37:35 -08:00
Rachel Fenichel
30a63e31dd Merge pull request #863 from rachel-fenichel/feature/custom_category
Enable custom flyout categories.
2017-01-26 15:43:47 -08:00
Andrew n marshall
624afeee94 Blockly.Extensions.buildTooltipForDropdown(..): Deferred validation. (#870)
Defer tooltip message string check until after load, when all Blockly.Msg should be loaded.
Avoids validation in headless mode, due to lack of document.readyState.
2017-01-26 15:12:32 -08:00
Andrew n marshall
5891288d60 .getOptions_() to .getOptions() (#869)
Fixes #867.
2017-01-26 09:52:00 -08:00
Niklas Laxström
bf813e3266 Localisation updates from https://translatewiki.net. 2017-01-26 10:51:19 +01:00
Tim Dawborn
e16058e95a Update the set of reserved words in Python to reflect the current state of Python (2.7 and 3.6). (#861) 2017-01-25 15:02:49 -08:00
Rachel Fenichel
0062658cfa Add some safety 2017-01-25 14:49:46 -08:00
Rachel Fenichel
4872a6ad7f Enable custom flyout categories. 2017-01-23 17:21:48 -08:00
Rachel Fenichel
a0b5aeb8d9 Merge pull request #862 from AnmAtAnm/math-blocks
Correcting math_change color
2017-01-23 17:05:24 -08:00
Andrew n marshall
709295a689 Correcting math_change color 2017-01-23 17:03:05 -08:00
Rachel Fenichel
9f564fba35 Merge pull request #859 from google/feature/readme_forum_ref
Update README.md
2017-01-23 15:27:33 -08:00
Rachel Fenichel
b8a465e739 Update README.md
Add a link to our forum.
2017-01-23 15:23:05 -08:00
Rachel Fenichel
7d6ed731c4 Merge pull request #853 from rachel-fenichel/rebuild_master_1_20
Rebuild master 1 20
2017-01-23 14:46:50 -08:00
Andrew n marshall
0da5dda1f0 Fixing JSON support for images in dropdowns. Adding tests. (#851)
Fixes #848.
2017-01-23 13:39:14 -08:00
Andrew n marshall
7b0275cd70 Porting math.js blocks to JSON (#846)
Moving all `math.js` definitions into a single JSON array, complete with i18n syntax for all messages, dropdowns, and tooltips.

Adding Blockly.Extensions.buildTooltipForDropdown(..) to facilitate the creation and error-checking of tooltips that update based on the value of a dropdown.

Now warn on raw string in JSON 'extensions'.
2017-01-23 10:23:55 -08:00
Niklas Laxström
ef0567cd3a Localisation updates from https://translatewiki.net. 2017-01-23 13:01:31 +01:00
Tim Dawborn
46316c7cea Add a block to reverse a list (#844) 2017-01-21 10:48:42 -08:00
Rachel Fenichel
40d1eeba03 rebuild 2017-01-20 22:09:44 -08:00
Rachel Fenichel
ec027baa5e Temporary fix for broken text field validation. 2017-01-20 22:07:04 -08:00
Rachel Fenichel
f6168e1364 Merge pull request #840 from rachel-fenichel/bugfix/procedure_rename
Use setValue in fieldTextInput so that procedure renaming works
2017-01-20 22:04:16 -08:00
CoryDCode
ed0bec07a2 Fixing combo boxes getting out-of-sync with NVDA.
Combo boxes need to be special cased like text input. Also, Escape is
a reserved button in NVDA, so I added Enter as a way to "submit and
move up a level" in addition to escape, so these boxes can be edited
while NVDA is on.
2017-01-20 16:16:51 -08:00
Tim Dawborn
34750bccd8 New blocks text_count, text_replace, and text_reverse (#830)
Includes generators for all languages and units tests on those generators.
2017-01-20 16:08:27 -08:00
Andrew n marshall
fb0f1b05dd Unit tests for JSON block definitions (just the start) (#850)
* Beginnings of a JSON block definition unit test set.
 * Dispose of unit test workspaces and blocks in finally blocks.
 * Clarify JSON error message by echoing arg notation.
2017-01-20 14:18:33 -08:00
Sean Lip
fceba91c6c Clean up workspace.component.js. When moving a block from one place to another, move all blocks after it too, and adjust the active descs accordingly. 2017-01-19 17:12:15 -08:00
Rachel Fenichel
1655850d60 Merge pull request #841 from rachel-fenichel/bugfix/long_stop_bind_event
Use bindEvent_ instead of bindEventWithChecks_ for longStop
2017-01-19 10:29:15 -08:00
Rachel Fenichel
7413413069 Use bindEvent_ instead of bindEventWithChecks_ for longStop 2017-01-18 18:14:30 -08:00
Rachel Fenichel
752c35e2e2 Merge pull request #827 from google/excludes
Reduce number of Closure files in App Engine upload.
2017-01-18 17:47:06 -08:00
Sean Lip
59b074d19f Further cleanup and removal of unnecessary functions. Pull some strings out for i18n. 2017-01-18 17:45:15 -08:00
Rachel Fenichel
915f097480 Use setValue in fieldTextInput so that procedure renaming works 2017-01-18 17:08:40 -08:00
Sean Lip
d2bfd134b6 Rewrite tree.service.js.
- Remove unnecessary code and functions.
- Add documentation where needed.
- Fix a bug arising when a block on the workspace is attached to an existing link.
2017-01-18 16:56:16 -08:00
Andrew n marshall
78dc5ed9c2 JSON definitions for colour blocks (#838)
Replaces old colour block definitions with a Blockly.defineBlocksWithJsonArray(..) call. Generator unit tests continue to load and pass, signifying compatibility with prior block definitions.

Replaces extension 'math_number_tooltip' with the reusable 'parent_tooltip_when_inline' extension, also used by colour_picker. Includes tests.
2017-01-18 13:48:46 -08:00
picklesrus
8aa8b1b3ba Add ability to add a class to a scrollbar so that different types of … (#837)
* Add ability to add a class to a scrollbar so that different types of scrollbars can
be distinguished from each other. You used to be able to do this by looking at the parent
element but now all the scrollbars are siblings in the dom.

Also, use this new class to fix #816 so that layering of the flyout and workspace scrollbars
are done correctly.
2017-01-18 13:02:08 -08:00
Andrew n marshall
a47bd93f4c Adding extensions for JSON support of dynamic blocks. (#834)
Adding support for extensions, functions that can assist with loading blocks, much like init functions, but that can be referenced from JSON definitions. This allows JSON definitions to define dynamic blocks such as onchange handlers and mutators.

Rewrote math_number as an example pure JSON block.
2017-01-18 12:45:39 -08:00
Andrew n marshall
bf16f11dbd Replace single quotes with double. (#836)
Fixes commits in #832.
2017-01-18 09:24:29 -08:00
Sean Lip
767ce2ab8e Refactor and simplify field-segment.component.js. 2017-01-17 17:21:32 -08:00
Sean Lip
9d8adaba91 Remove debug info. 2017-01-17 15:53:13 -08:00
Sean Lip
5ed6b7a48d Remove unnecessary check when attaching a new block to a marked connection. 2017-01-17 15:52:04 -08:00
Andrew n marshall
211d973054 FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value.  The constructor value parameter is now optional. Includes tests.
2017-01-17 15:39:59 -08:00
Sean Lip
08a141aa21 Minor refactoring of the modal code (add comments, guard against invalid keystrokes, etc.). 2017-01-17 15:19:12 -08:00
Sean Lip
4bef8cc329 Rename workspace-tree to workspace-block. 2017-01-17 13:32:33 -08:00
Sean Lip
ed0c9868c6 Fix bug in audioService where attached event callbacks were not being cleared properly. 2017-01-17 11:48:01 -08:00
Neil Fraser
59f408592a Replace 'const' with 'var'.
This unbreaks IE10 and advanced compiled apps such as Blockly Games.
2017-01-16 20:35:28 -08:00
Rachel Fenichel
48df04eb72 Merge pull request #800 from groklearning/add-allInputsFilled-methods
Adds `allInputsFilled` methods to Block and Workspace.
2017-01-16 15:33:21 -08:00
Neil Fraser
90b63f49cb Python false is False. Issue #828. 2017-01-16 09:33:02 -08:00