Commit Graph

62 Commits

Author SHA1 Message Date
Neil Fraser
c929b3015b chore: Convert == to === and != to !== where possible. (#5599) 2021-10-15 09:17:04 -07:00
Neil Fraser
7ac1e27cd6 Add Croatian to Code demo (#5583)
Contributed courtesy of Lidija Kralj.
2021-10-14 23:45:04 -07:00
kozbial
6fc90213a6 Merge branch 'develop' into merge-develop-to-goog_module 2021-09-21 16:04:33 -07:00
Beka Westberg
ee221520a9 fix: update code demo to include JSON (#5444)
* fix: update code demo to include JSON

* fix: do property renames

* fix: change XML to place holder

* fix: PR comments
2021-09-20 13:08:35 -07:00
Aaron Dodson
ce8e7921a2 Move alert/confirm/prompt to a new file, dialog.js (#5457)
* Migrate prompt/alert/confirm to dedicated module

* Update core/blockly.js to pass through calls to prompt/alert/confirm to core/dialog.js

* Update calls to Blockly.prompt/alert/confirm to dialog.prompt/alert/confirm

* Fix typo and errant redeclaration of Blockly.prompt

* Clarify JSDoc on customizing Blockly.dialog.alert/confirm/prompt
2021-09-14 08:19:53 -07:00
Neil Fraser
2325c66d69 Fix double execution in Code demo (#5152)
* Fix double execution in Code demo

PR #5037  fixed double execution of the run button on mobile.  But the link button and other events still suffer from double execution.  This PR moves the fix from the run button to the central bind function so that it applies universally.

* Pass the event to the user function

Not used but good to have.
2021-07-21 19:17:00 -07:00
hpnrep6
926b14b15e Fix code in code demo executing twice on mobile (#5037)
* Prevent code from executing twice on touchscreens
2021-07-20 16:48:30 -07:00
hpnrep6
13b0442f75 Fix code in code demo executing twice on mobile (#5037)
* Prevent code from executing twice on touchscreens
2021-07-16 10:42:09 -07: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
Zufeng
07b31489b5 Allow code demo to shrink more (#3345)
If the width goes below a certain threshold,
some tabs are replaced with a single tab with a select menu.
2019-12-11 13:53:37 -08:00
Sam El-Husseini
2ac4149d98 Misc compiler warnings. (#3172)
* Fix misc compiler warnings. Use ws.getToolbox() instead of ws.toolbox_
2019-10-07 11:06:56 -07: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
74f908d77f Fix escaping issue in Code demo.
Resolves #1002
2019-06-12 10:59:33 -07:00
Neil Fraser
ba18ae2159 Add STATEMENT_SUFFIX
Also remove need to manually indent INFINITE_LOOP_TRAP.  This is a breaking change for Python users of this property.  However, very few users of this property exist, given that the existing code breaks if the block ID has a $ in it (also fixed in this PR).
2019-05-14 17:19:31 -07:00
Rachel Fenichel
6092e4c517 Calls to getAllBlocks should pass a value for _ordered_ 2018-09-13 16:06:19 -07:00
Neil Fraser
4cb4b42f8d Use named properties on Msg. 2018-04-27 11:50:51 -07:00
Andrew n marshall
cf1c69686d In Code demo, give warning if a generator function is missing. (#1585)
Refactored renderContent() to use new attemptCodeGeneration()
function, reducing code duplication.
attemptCodeGeneration() now calls checkAllGeneratorFunctionsDefined()
before running the generator.
2018-02-08 13:01:33 -08:00
Neil Fraser
eb61152ac2 Add {{Optional}} to help URLs. (#1413)
* Add {{Optional}} to help URLs.
Fixes issue #898.

* Leakage from Blockly Games?

* Propagate msg-Blockly -> msg-blockly change back to messages.js
As made by wikitranslate in 69b10dba79
2018-01-05 15:20:42 -08:00
Andrew n marshall
ef14f0f306 Adding code removed in #1028 to fix regression #1386. (#1389)
Modifications to avoid matching %{key} notation.
2017-10-25 12:27:11 -07:00
Neil Fraser
43423f268e Fix code demo in IE if Blockly is compiled harder.
Closure should not be used except within core.
2017-10-24 17:31:38 -07:00
Rachel Fenichel
703d96bede Add Kabyle locale to code demo (#1342) 2017-09-26 15:41:53 -07:00
Andrew n marshall
10ad450176 Forgot update code demo (#1121) 2017-05-22 12:34:22 -07:00
Rachel Fenichel
db26c4c541 use goog.string.startswith instead of string.startswith (#1065) 2017-04-25 14:12:21 -07:00
vicng
ae2aaa2159 - Allows use of Blockly's messaging format for category name, colour,… (#1028)
...in toolbox XML.
- Updated code editor demo to use this message format
- Re-built blockly_compressed.js
2017-04-07 15:32:50 -07:00
Rachel Fenichel
17258990fd fix missing semicolon 2016-12-05 16:11:59 -08:00
Neil Fraser
4f08f2536f Replace category colour pallet with correctly calculated colours. 2016-10-23 01:05:13 -07:00
Hasso Tepper
b94dff049e Add Estonian translations to the code and plane demos (#505) 2016-07-26 17:20:54 -07:00
Neil Fraser
685288836f Use simpler message interpolation in Code demo. 2016-06-22 13:01:37 -07:00
picklesrus
213469a479 Change the blockly workspace resizing strategy. (#386)
* 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 #307.

* Add @package to workspace resizeContents.
2016-06-03 16:11:55 -07:00
Rachel Fenichel
e0cda58701 fix variable naming in createnewblock. 2016-05-11 15:15:12 -07:00
Neil Fraser
49fff433e3 Merge pull request #234 from pjkui/patch-1
fixed a translation error
2016-04-14 16:50:16 -07:00
Neil Fraser
4e42a1b78e Swap order of arguments on domToWorkspace. 2016-04-04 18:31:41 -07: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
Quinn Pan
296eab7b99 fixed a translate error
change "簡體中文" to "简体中文"
2016-01-13 17:21:57 +08:00
Neil Fraser
80f36f0629 Clean up for demo apps. 2016-01-08 13:58:18 -08:00
Neil Fraser
19c71573b7 Update messages.
Remove unused PROCEDURES_CALLNORETURN_CALL.  Add
PROCEDURES_DEFNORETURN_COMMENT and PROCEDURES_IFRETURN_HELPURL.
2015-12-17 15:34:23 -08:00
Neil Fraser
fa279b91ce Add option to delete all blocks on workspace. 2015-12-02 22:10:09 -08:00
Neil Fraser
d717546cdc Adding Tamil to Code demo. 2015-12-01 12:45:29 -08:00
Neil Fraser
dcd463b550 Add 'startScale' and remove 'enabled' options on zoom. 2015-10-21 13:25:02 -07:00
Prof Gra
d489c132db Typo: evironment -> environment. 2015-10-03 22:56:10 +02:00
Neil Fraser
0c3dad0e1c Resize Code demo before injection to eliminate loading reflow. 2015-09-14 15:23:42 -07:00
Neil Fraser
5085ebfb24 Revert "Adding தமிழ்."
This reverts commit 02d75ca60b.
2015-08-19 18:03:47 -07:00
Neil Fraser
02d75ca60b Adding தமிழ். 2015-08-19 17:51:15 -07:00
Neil Fraser
5b7fec7092 Add zooming feature.
By carloslfu.
2015-08-19 17:21:05 -07:00
Neil Fraser
e0f90e6e33 Adding more type documentation. 2015-07-13 15:03:22 -07:00
Neil Fraser
9c1e8588ba Merge pull request #101 from daarond/master
PHP Generator Support
2015-06-04 15:06:26 -07:00
Neil Fraser
e8ab929b6a Fix visibility changes with toolbox. 2015-05-22 17:08:59 -07:00
Carlos Galarza
8314929e2d Remove resolved firefox bug comment 2015-05-22 17:08:35 -05:00
daarond
f240b6dcda Merge branch 'master' of https://github.com/google/blockly 2015-05-21 11:45:15 -05:00
Neil Fraser
6fdab711b2 Fix several RTL bugs. 2015-05-19 12:02:49 -07:00