Commit graph

54 commits

Author SHA1 Message Date
Katelyn Mann
a5c9b7ef32 Add the rest of the generator infrastructure back into scratch-blocks. 2017-02-07 14:42:33 -08:00
Tim Mickel
f1aac859e3 Stripping old blocks code; moving blocks -> blocks_common, project-wide lint ()
* Remove unused Blockly blocks

* Remove unused text Blockly blocks; convert to JSON

* Move blocks/ -> blocks_common/

* Recompile for moved/removed blocks

* Remove spectools

* Project-wide lint

* Recompile August 30

* Pin package.json
2016-08-30 15:50:59 -04:00
Tim Mickel
218975f2ad Add a few Scratch 2.0 motion blocks ()
* Add a few motion blocks

* Add constants to blocks build path

* Add "go to X Y" block

* Recompile June 29
2016-06-29 20:47:16 -04:00
Tim Mickel
ca3275eaf0 Merge google/develop June 22 ()
* Localisation updates from https://translatewiki.net.

* test page that creates random blocks and randomly drags them around the page

* Localisation updates from https://translatewiki.net.

* add missing return in fake drag

* get rid of drag_tests file:

* Generated JS helper functions should be camelCase.

Complying with Google style guide.

* Localisation updates from https://translatewiki.net.

* Fix extra category error. Clean up code, rename variables, reduce line lengths, fix lint issues.

* Remove claim that good.string.quote should be used.

* Change the blockly workspace resizing strategy. ()

* Add a new method to be called when the contents of the workspace change and
the scrollbars need to be adjusted but the the chrome (trash, toolbox, etc)
are expected to stay in the same place.

Change a bunch of calls to svgResize to either be removed or call the new
method instead.  This is a nice performance win since the offsetHeight/Width
call in svgResize can be expensive, especially when called as often as we do -
there was some layout thrashing.

This also paves the way for moving calls to recordDeleteAreas
(which is also expensive) to a more cacheable spot than on every
mouse down/touch event.

of things (namely the scrollbars)

* Fix size of graph demo when it first loads by calling svgResize.
The graph starts with fixed width and was relying on a resize event
to fire (which I believe was removed in commit
217c681b86).

* Fix the resizing of the code demo.  The demo's tab min-width used to
match the toolbox's width was only being set on a resize event, but
commit 217c681b86 changed how that worked.

* Fix up some comments.

* Use specific workspaces rather than Blockly.getMainWorkspace().

* Make workspace required for resizeSvgContents and update
some calls to send real workspaces rather than ones that are
null.

Remove the private tag on terminateDrag_ because it is only
actually called from outside the BlockSvg object.

* Remove a rogue period.

* Recategorize BlockSvg.terminateDrag_ to @package instead of @private so that
other developers don't use it, but it still can be used by other Blockly classes.

* Add a TODO to fix issue .

* Add @package to workspace resizeContents.

* Routine recompile

* Fix unit tests.

* Fix inheritance on rendered connection.

Closure compiler on maximum compression breaks badly due to lack of
@extends attribute.

* Add toolbox location and toolbox mode options to playground.

* Increase commonality between playgrounds.

* Properly deal with shadow statement blocks in stacks.

* Localisation updates from https://translatewiki.net.

* Use a comment block for function comments in generated JS, Python and Dart.

* Fix typo in flyout.js ()

* Fix typo in flyout.js ()

* Line wrap comments in generated code.

* Remove reference to undefined variable ()

REASON_MUST_DISCONNECT was removed by a refactor in 2a1ffa1.

* Fix airstrike by grabbing the correct toolbox element. ()

Probably broken in 266e2ffa9a.

* Localisation updates from https://translatewiki.net.

* Fix issue  by calling resize from the keypress handler on text inputs. ()

* Remove shadow blocks from Accessible Blockly demo. Update README.

* Generate for loops on one line.

* Introduce a common translation pipe; remove local stringMap attributes. Fix variable name error in paste functions. Minor linting.

* Fix precedence on isIndex blocks.

* Add indexing setting for JavaScript Generation ()

Adding setting to allow for switching between zero and one based indexing for Blockly Blocks such that the generated code will use this flag to determine whether one based or zero based indexing should be used. One based indexing is enabled by default.

* Remove unused functions and dependencies.

* Remove the unnecessary construction of new services.

* Fix sort block in JS to satisfy tests.

* Trigger a contents resize in block's moveBy. ()

This fixes  but and it also fixes some other similar problems
with copy/paste and other users of moveBy.

* Consolidate the usages of the 'blockly-disabled' label.

* Fix error when undoing a shadow block replacement.  Issue .

* Unify setActiveDesc() and updateSelectedNode() in the TreeService. Move function calls made directly within the template to the correct hooks.

* Standardize naming of components.

* Prevent collisions between user functions and helper functions.

* Localisation updates from https://translatewiki.net.

* Fix . Attash the resize handler to the workspace so it can be removed ()

when workspace.dispose() is called.

* Change the TreeService to a singleton.

* Remove unneeded generated parens around function calls in indexOf blocks.

* Fix  by calling workspace's resize when the flyout reflows. ()

* Updating URLs to reflect new docs. ()

* Updating URLs to reflect new docs. Removing -blockly in URLs.

* Rebuilt.

* Routine recompile

* Prevent selected block from ending up underneath a bumped block.

* Fix undo on fields with validators with side effects.

* Don't fire change event on fields that haven't been named yet.

* Localisation updates from https://translatewiki.net.

* Fix tree focus issues.

* Fix remaining focus issues on block deletion.

* cache delete areas instead of recalculating them onMouseDown

* Cache screen CTM for performance improvement.

* Call svgResizeContents from block_svg's dipose so that deleting blocks ()

from the context menu (or anywhere really) causes the workspace to
recalculate its size.
Remove the call to svgResizeContents from onMouseUp's logic for
determining whether the block is being dropped in the trash
since it calls dispose.

One side effect of this is that when you delete multiple blocks
resize gets called for each of them and the scrollbars move during
the operation. This is most obviously seen by doing an airstrike
in the playground and then deleting all the blocks at once.

* Allow terminal blocks to replace other terminal blocks ()

* Allow terminal blocks to replace other terminal blocks

* Updated test to allow replacing terminal blocks

* Refactor how activeDescendant is set. Introduce helper functions to ensure that calls like pasteAbove() preserve the focus.

* Localisation updates from https://translatewiki.net.

* Remove unnecessary logging.

* Reduce unneeded parentheses in JS and Python.

* Start using field_number.

* Make it easy to disable unconnected blocks.

* Routine recompile.

* Check if matrix is null in mouseToSvg

* Remove js/ localizations pre-merge

* Fix change to block_render_svg

* Fix error in xml.js

* Playground merge

* Add simple toolboxes to playgrounds

* Fix flyout reference in events listener

* Move tokenizeIntepolation into Blockly.utils namespace.

* Use simpler message interpolation in Code demo.

* Create console stub for IE 9.

* Don't output blockId if not set (e.g., toolbox category event). ()

* Fix block in multi-playground

* Increase commonality between playgrounds.

# Conflicts:
#	tests/multi_playground.html
#	tests/playground.html

* Remove "show flyouts" button

* Recompile for merge June 22
2016-06-22 17:50:16 -04:00
Tim Mickel
ae6c715a22 Add compressed versions of Scratch blocks to build script () 2016-05-10 17:26:48 -04:00
Andrew Sliwinski
745720154d Update documentation for build script. Re GH-304 2016-05-03 19:06:29 -04:00
Andrew Sliwinski
0c4d175184 Remove all generators and update build.py 2016-05-03 14:49:17 -04:00
Tim Mickel
516cd05d82 Merge remote-tracking branch 'Google/develop' into feature/upstream-merge-march-11-2
# Conflicts:
#	blockly_compressed_vertical.js
#	blocks_compressed.js
#	build.py
#	core/connection.js
#	core/workspace.js
#	tests/playground.html
2016-03-11 13:18:14 -05:00
Rodrigo Queiro
a5d3f340e5 Add a Lua code generator
This is based on the JS generator, with a lot of inspiration from Ellen
Spertus's blockly-lua: https://github.com/espertus/blockly-lua

All unit tests pass with Lua 5.3.2.
2016-03-10 10:24:25 +01:00
Tim Mickel
7268046f17 Update build.py to include colours in blocks_compressed
Fixes 
2016-03-02 11:32:43 -05:00
Rachel Fenichel
6ee0744b5c Refactor block_svg to share code between horizontal and vertical versionss. 2016-02-24 10:19:59 -08:00
Ray Schamp
8b0b1dfda6 Update build.py to account for block_svg.js rename
And rebuild.

Thanks @rachel-fenichel
2016-02-18 17:38:57 -05:00
Ray Schamp
1a6dff7f42 Merge branch 'master' of github.com:google/blockly into merge/google-2016
# Conflicts:
#	blockly_compressed_vertical.js
#	blockly_uncompressed_vertical.js
#	blocks/text.js
#	blocks_compressed.js
#	core/block_svg.js
#	core/connection.js
#	core/field_textinput.js
#	core/flyout.js
#	core/toolbox.js
#	tests/playground.html
2016-02-18 13:29:25 -05:00
Rachel Fenichel
62fd8f0f7e Generate both horizontal and vertical versions of blockly; set up playgrounds for each. 2016-02-09 15:53:14 -08:00
Andrew Sliwinski
df8955089f WIP on horizontal block rendering 2016-01-27 14:12:37 -05:00
carlosperate
655f0368e3 Update build.py with more robust nodejs identification 2016-01-16 22:11:33 +00:00
Neil Fraser
d717546cdc Adding Tamil to Code demo. 2015-12-01 12:45:29 -08:00
Immortalin
00fa7e0b05 Remove google-closure-library support. 2015-11-15 13:22:43 +08:00
Immortalin
7cc0b42c49 fixed code order 2015-11-15 09:53:13 +08:00
Immortalin
9a69dff34b Fix typo 2015-11-14 22:40:14 +08:00
Immortalin
fae638c48b Fix indentation 2015-11-14 22:35:09 +08:00
Immortalin
5efe2dd71f fixed npm closure library issue 2015-11-14 22:23:40 +08:00
Blake Bourque
8977ebf46f Changes needed to make headless work. 2015-11-14 21:47:49 +08:00
Immortalin
f0e2c72db5 Fix potential error due to naming 2015-11-14 19:24:58 +08:00
Neil Fraser
00ba0acf40 Clean up build file from previous PR. 2015-11-13 21:11:24 -08:00
Immortalin
ad7ec48e70 Add support for google closure library
When the closure library is installed by npm, it is named "google-closure-library", however it is named "closure-library" in build.py. When both blockly and closure are installed by npm, they are in the same folder so theoretically theoretically blockly should be able to build. Formatting and indentation might be a bit off as I edited this using the github editor. 

This ```python
search_paths = calcdeps.ExpandDirectories(
      ["core", os.path.join(os.path.pardir, "closure-library")])
``` might need further revision to account for the additional naming. Maybe a try statement?
2015-11-11 21:28:44 +08:00
Neil Fraser
5538f70bc2 Remove unused files from blockly_uncompressed.js 2015-09-22 15:19:33 -07:00
Neil Fraser
37777828f4 Fix disconnect sound in FF. 2015-09-22 11:14:25 -07:00
Neil Fraser
7ecf7df1cb Don't leave blockly_uncompressed.js empty for a long period during build. 2015-09-21 16:12:21 -07:00
Neil Fraser
bd144f14ea Fix tooltip location when page is scrolled.
Also of note, Closure Compiler is no longer preserving licences.
2015-08-06 11:12:41 -07:00
Neil Fraser
edd3e3bf33 Lint corrections. 2015-06-17 13:05:24 -07:00
Neil Fraser
9050e32954 Adding JsonInit method of creating blocks. 2015-06-08 15:54:18 -07:00
Neil Fraser
b935dd8613 Fix DOMParser in node.js 2015-06-04 15:06:39 -07:00
Neil Fraser
9c1e8588ba Merge pull request from daarond/master
PHP Generator Support
2015-06-04 15:06:26 -07:00
Neil Fraser
8202ebf07d Dispose of toolbox when workspace is disposed. 2015-06-04 12:04:43 -07:00
daarond
b551afee72 post-compilation 2015-05-12 10:05:27 -05:00
Neil Fraser
a257e143c4 Add warning to build if not using Python 2. 2015-03-09 10:01:51 -07:00
Neil Fraser
1c39a638e3 Lint fixes. 2015-01-22 15:58:10 -08:00
Neil Fraser
26f956416d Improve error messages during build. 2014-12-12 12:34:28 -08:00
Neil Fraser
a8414a0ecb Remove unneeded HTML attributes (Google style guide). 2014-12-02 18:22:46 -08:00
Neil Fraser
49fa610f0b Improve Python compatibility of build file. 2014-11-06 17:16:41 -08:00
Neil Fraser
d99a04a6ed Detect old Closure directory and prompt to rename. 2014-10-30 11:14:31 -07:00
Neil Fraser
f5108ba043 Move closure-library-read-only to closure-library (due to the Closure project's move). 2014-10-29 22:51:12 -07:00
Neil Fraser
6539211104 Change official project URL. 2014-10-07 13:09:55 -07:00
Neil Fraser
8c252abae4 Updating wiki help URLs. 2014-09-19 22:14:51 -07:00
Neil Fraser
c44c629725 Point context help to GitHub from Google Code. 2014-09-18 16:52:00 -07:00
Neil Fraser
7122410373 Changing project location from Google Code to GitHub. 2014-09-08 15:18:02 -07:00
Neil Fraser
d998a1c8ec Update to latest version. 2014-09-08 14:26:52 -07:00
ellen.spertus
1f5f0abd94 Automatic commit Sat Feb 1 03:00:04 PST 2014 2014-02-01 03:00:04 -08:00
ellen.spertus
576850a577 Automatic commit Fri Jan 31 03:00:02 PST 2014 2014-01-31 03:00:02 -08:00