Commit Graph

38 Commits

Author SHA1 Message Date
Christopher Allen 16b6d4526a refactor: Rename Blockly.Blocks, migrate to named exports (#5515)
* Rename Blockly.Blocks to Blockly.blocks
  Because it does not export a type as its default export.

  Part of #5073.

* Name default export of Blockly.blocks Blocks.

  Use named exports in Blockly.blocks by giving the former default
  export the name Blocks.

  Part of #5153.

* Reexport Blockly.blocks from blockly.js

* Document the format of renamings.js better.
2021-09-24 19:12:03 +01:00
Neil Fraser 4e2f8e6e02 Use SPDX licences.
This is a followup to #3127.
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Neil Fraser b46a4fe286 Bring our license format up to date (#3127)
* Google changed from an Inc to an LLC.

This happened back in 2017 but we didn’t notice.  Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.

* Remove project description/titles from licenses

This is no longer part of Google’s header requirements.  Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).

* License no longer requires URL.

* Fix license regexps.
2019-10-02 14:46:56 -07:00
Neil Fraser 0add3a5e3e Add require statements to all block files. 2019-09-18 13:00:44 -07:00
Rachel Fenichel f717add5a5 Block annotations (#2997)
* Replace `@this Blockly.Block` with `@this {Blockly.Block}` in all block files.

* Fix 9 compiler warnings (JSC_USED_GLOBAL_THIS)
2019-09-11 17:50:52 -07:00
Neil Fraser 52b6ce18a5 Fix unit tests 2019-07-08 13:29:43 -07:00
Neil Fraser 25adb40e66 Prefix and suffix edge cases for flow statements.
Call suffix code on break/continue before executing the break/continue.
Call prefix code for enclosing loop before executing continue.
2019-05-14 17:19:31 -07:00
alschmiedt 4982c5c310 Changes names for block styles 2019-01-08 09:40:30 -08:00
alschmiedt d9c4608da8 Remove use of style variables in block definition 2018-12-20 10:09:47 -08:00
alschmiedt 034bcb00bb Replace setting colour to setting style in block definitions 2018-12-18 10:01:05 -08:00
alschmiedt 9a1d6684d0 Pulls from MakeCode fork the ability to rename and delete variables in flyout 2018-11-29 14:17:56 -08:00
Andrew n marshall 4860e34f51 Removing goog.* uses from blocks/*.js files (#1975)
* Removing goog.arrays.equals() in blocks/procedures.js, with minor refactor.
* Replacing goog.dom.createDom() in blocks/procedures.js, blocks/variables.js,  blocks/variables_dynamic.js, and blocks/loops.js.
2018-07-16 17:01:12 -07:00
Neil Fraser 4cb4b42f8d Use named properties on Msg. 2018-04-27 11:50:51 -07:00
Andrew n marshall ab8692652a Revert "Removing namespace declarations for deprecated and unused namespaces. (#1796)" (#1809)
This reverts commit 75459abfdd.
2018-04-20 08:08:11 -07:00
Andrew n marshall 75459abfdd Removing namespace declarations for deprecated and unused namespaces. (#1796)
These namespaces use to contain the original block hue constants,
but were deprecated (via comment, except for procedures) over a year
ago. With the removal of those constants, the declarations were
creating empty, unused objects.
2018-04-18 15:32:26 -07:00
Rachel Fenichel 23666664fa Fix context menus on blocks with variables 2018-04-12 16:56:07 -07:00
Andrew n marshall e9d8e00a55 Making all blocks use the MSG colour values. (#1749)
* Making all blocks use the MSG colour values.
 * Deprecating Blockly.Constants.Lists.HUE and similar constants.
 * Removing deprecated Blockly.Blocks.lists.HUE constants.
 * Allowing message references in the Block.setColour() parameter.
 * Adding checking of older constants, ensuring they are not overwritten.
2018-04-09 17:37:47 -07:00
Rachel Fenichel 6d83b9bc28 Add keyword-spacing rule to eslint 2018-03-19 13:10:29 -07:00
Neil Fraser 7413db1089 Code style 2018-01-05 15:56:20 -08:00
Tianwei Du 492462e1d4 Develop (#1481)
* variables_dynamic

* make test , and i18n

* Issue #1470

* Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_MUTATION
to make sure setCheck before event trigger

* Update built files from develop.

* fix copyright ,quotes , comments ,  and optimize some flow.

* quotes,change UI , change category custom name

* single setter , remove mutator , colour typo , typed variables create button message

* undo the indent edits.
2017-12-08 08:53:24 -08:00
Tom a6245f4c6e Compile messages with externs and demo with advanced optimizations (#1259)
* Revert "Fix synonyms when compiled. (#1248)"

This reverts commit f08afbb351.

* Revert "Compatibility for Closure Compiler. (#1240)" [fc8d4c9]

* Adding exports to all messages.

* Fixed missing dependency to Blockly.defineBlocksWithJsonArray()

* Adding a fully compiled demo draft (still simple optimizations).

* Demo optimizations switched to advanced and enabled exports (for Blockly.Msg).

* Message interpolation updated to use the exported (global) Blockly.Msg array.

* Adding some debug compilation options to the build script.

* Adding SVG externs.

* Fixed Blockly.inject's config array to work with compilation.

* Reverting all compiled code.

This fixes commit b307ba1151.
This fixes commit dec6910b67.

* Reverting all compiled code.

This fixes commit 824c806ec3.

* Removing old todo

* Merge commit 'fe96bec765f0eb58c5321101965100c2716760ed' into compile-messages-with-externs

* commit 'fe96bec765f0eb58c5321101965100c2716760ed':
  Fixes positional index for Czech translation (#1264)
  Missed one use of string instead of .property in extensions.js (#1262)
  Update extensions.js to be compatible with ADVANCED_OPTIMIZATIONS (#1253)
  Fix type tags and todo placement.
  Procedure block renames variable in mutator if there is a case change.

* Fixes based on review by @NeilFraser
- 80 cols
- using goog.global instead of window
- @export on the same line as messages

* BF: Moving the msg dependency earlier, since Blockly.Msg.en is filling the Blockly.Msg object, which is empty without Blockly.Msg.en (and the rest of the code is using it as Blockly.Msg).

* Updating some texts in the demo's html file to be more descriptive.

* Commenting the debug options in the build, to maximize the optimizations. They are not removed, to allow anybody to turn them on if needed (since they are not documented on the Closure Compiler's REST API pages).

* BF: fixed blocks_compressed.js compilation, as it now requires Blockly namespace to exist.

* SVG externs file updated based on the one in https://github.com/google/closure-compiler/blob/master/contrib/externs/svg.js (eliminating 2 warnings)
2017-08-08 11:16:49 -07:00
Robert Czechowski 5a7b7b3c5a Make variable add set/get block in context menu obey block limits 2017-02-16 15:03:50 +01:00
Rachel Fenichel 74ff24e323 JSONify variable blocks 2017-02-10 17:05:02 -08:00
picklesrus d215314ffd Revert "Convert createDom calls to createUntypedDom" 2016-07-20 15:21:45 -07:00
Rodrigo Queiro d9a3569706 Convert createDom calls to createUntypedDom (#481)
Unless they could be converted to use goog.dom.TagName, in which case do
that. createDom is going to require goog.dom.TagName member as the
tagName parameter. This change prepares for that.
2016-07-18 07:18:17 -07:00
Neil Fraser 4c542240e2 Provide default getVars and renameVar functions. Issue 265. 2016-02-27 12:28:32 -08:00
Neil Fraser e300931071 Allow multiple interpolation messages. Fix variable context menus. 2015-06-27 12:49:01 -07:00
Neil Fraser edd3e3bf33 Lint corrections. 2015-06-17 13:05:24 -07:00
Neil Fraser 059c2f1778 Add automatic mode for internal/external input layout. 2015-06-10 18:45:15 -07:00
Neil Fraser 9050e32954 Adding JsonInit method of creating blocks. 2015-06-08 15:54:18 -07:00
Neil Fraser ddcf1ac969 Factor out hues into constants. 2015-01-26 01:20:03 -08:00
Neil Fraser 6539211104 Change official project URL. 2014-10-07 13:09:55 -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 6ee38cdec3 Automatic commit Tue Jan 28 03:00:09 PST 2014 2014-01-28 03:00:09 -08:00
ellen.spertus 08f4022b38 Automatic commit Sat Jan 11 03:00:02 PST 2014 2014-01-11 03:00:02 -08:00
ellen.spertus ea211c5080 Manual commit 2013-12-20 16:25:26 -08:00
ellen.spertus a8acffd81c New initial commit with .svn directories and their contents ignored. 2013-10-30 14:46:03 -07:00