Commit Graph

75 Commits

Author SHA1 Message Date
Aaron Dodson
10e6df32ed fix: Allow cross origin requests for Blockly assets. (#9342) 2025-09-05 11:07:35 -07:00
Christopher Allen
2409123d66 refactor: Omit unused exception arguments from catch blocks (#8559)
Fixes #1770.
2024-09-03 15:27:40 +01:00
Neil Fraser
2ea9e21e6d chore: Clean up variable assignment. (#7962)
* chore: Clean up variable assignment.

* fix: variable now const as a result of prev commit
2024-03-26 19:13:52 +01:00
Neil Fraser
f2591dee89 chore: Bump Python from 3.7 to 3.12 (#7791)
3.7 is not supported from 31 January.  Failure to upgrade appears to result in the inability to push new versions.  3.12 is the latest available Python version for App Engine, and should last the longest.

Tested on DOM-Tutorials and Glockenspiel.  No issues there.
2024-01-18 19:30:00 +01:00
Neil Fraser
1f0f733a04 chore: Remove 'cgi' import from Python (#7479)
The cgi modue disappears in the next version of Python.  This PR adds an import of urllib.parse, but that's not a new dependency since cgi already imported it.
2023-09-13 09:04:18 -07:00
Neil Fraser
650e620e2b Prevent raw content being served from storage. (#7443)
TODO: Detailed description to be added once deployed.
2023-08-28 09:56:57 -07:00
Neil Fraser
826510f242 fix: Preemptively fix API change in NDB. (#7361)
Glockenspiel broke due to 'query' now being required within a client context.  This change fixed Glockenspiel.  Blockly samples doesn't appear to be broken yet, but Glokenspeil broke at midnight yesterday.

Similar change being made to Blockly Games.
2023-08-07 20:22:21 +02:00
Christopher Allen
167e26521c refactor: Remove last remaining circular import in core/ (#6818)
* refactor(xml): Move textToDom to core/utils/xml.ts

  This function being in core/xml.ts was the cause for the last
  remaining circular import in core/ (between variables.ts and
  xml.ts).

  Moving it to utils/xml.ts makes sense anyway, since there is
  nothing Blockly-specific about this function.

  Fixes #6817.

* fix(closure): Reenable goog.declareModuleId multiple-call check

  Reenable an assertion which check to make sure that
  goog.declareModuleId is not called more than once in a module
  (and which also catches circular imports amongst ES modules, which
  are not detected by closure-make-deps).

* chore(tests,demos): Augo-migrate use of textToDom

  Testing the migration file entry by auto-migrating all uses of
  Blockly.Xml.textToDom to Blockly.utils.xml.textToDom.

* chore(blocks): Manually migrate remaining use of textToDom

  Update the one remaining call to textToDom (in blocks/lists.ts)
  to the function's new location - also removing the last use of
  the Blockly.Xml / core/xml.ts) module from this file.

* docs(xml): Remove unneeded @alias per comments on PR #6818

* fix(imports): Remove unused import
2023-02-07 12:11:11 +00:00
Neil Fraser
b5eeaa352c docs: Add notice to use unpkg instead of demos. (#6667)
Logs show about a dozen orgs actively using Blockly instances that are hot-linked to blockly-demo.appspot.com

These files disappeared on 25 November 2022, breaking a bunch of people.  This alert should point developers in the right direction.
2022-12-04 20:30:36 +01:00
Neil Fraser
351a696e71 fix: Add redirects to old demos. (#6657) 2022-11-25 11:34:32 -08:00
Rachel Fenichel
7991c8aeb3 chore(demos): delete plane demo (#6064) 2022-04-05 16:38:28 -07:00
Rachel Fenichel
6c4a62f03c chore(demos): redirect some demos to gh-pages (#6045) 2022-04-01 14:57:10 -07:00
Neil Fraser
b66154fc5b Add feedback on expiry page. (#5648)
Blank pages are bad for confirming anything happened.
2021-10-28 10:10:31 -07:00
Neil Fraser
90b3f75d82 Remove @author tags (#5601)
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.

Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00
Neil Fraser
c929b3015b chore: Convert == to === and != to !== where possible. (#5599) 2021-10-15 09:17:04 -07:00
kozbial
2a62c06a92 Update script to use python3 command 2021-08-10 16:43:08 -07:00
Rachel Fenichel
2fcdd846be Remove deprecated build.py script 2021-06-24 16:58:28 -07:00
Maribeth Bottorff
8548b54221 Merge branch 'master' into rc_2021_3 2021-03-25 09:45:49 -07:00
Monica Kozbial
dc22b30849 Update demo deploy script and fix gcloudignore file (#4566) 2021-01-06 14:58:28 -08:00
Neil Fraser
edd475f37b Update Blockly Games URL. (#4557)
Currently there's a double-redirect (Blockly sends the user to appspot, Blockly Games then sends the user to its own domain).
2021-01-05 11:00:22 -08:00
Rachel Fenichel
05c37c52b9 Merge pull request #4191 from rachel-fenichel/data_expiration
Add expiration handler
2020-08-26 10:05:26 -07:00
Rachel Fenichel
62c922e9d6 Script to add timestamps, with instructions 2020-08-24 14:41:38 -07:00
Rachel Fenichel
b1442513a2 Review comments 2020-08-24 12:52:03 -07:00
Rachel Fenichel
441a135108 Fix naming" 2020-08-18 15:24:33 -07:00
Rachel Fenichel
030ad3e836 Add expiration handler 2020-08-18 15:22:33 -07:00
Rachel Fenichel
afdd558f0e Simplify 2020-07-31 14:57:52 -07:00
Rachel Fenichel
0d9d590e42 Add last accessed time to Xml model, and update it when getting from the db 2020-07-28 16:03:11 -07:00
Sam El-Husseini
25821c888d Move package to scripts/package (#4045) 2020-07-14 16:31:53 -07:00
Sam El-Husseini
55e6f8000e Move i18n scripts under scripts/ (#4044)
* Move i18n scripts under scripts/
2020-07-14 12:07:56 -07:00
Neil Fraser
2096fa5b15 Improve App Engine deployment (#3681)
Make the gcloudignore directives more specific by using a leading /.
Update instructions.
Remove guidance on creating compressed-only deploy
2020-02-27 11:54:44 -08: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
Monica Kozbial
3182b6ec66 Fix main.py redirect. (#3680) 2020-02-03 16:51:03 -08:00
Neil Fraser
7dad4c48f6 Delete unneeded code. 2020-02-03 16:50:59 -08:00
Neil Fraser
85641fd1fb ‘Upgrade’ from Python 2.7 to Python 3.7
Python is a non-issue.  But App Engine took the opportunity to change everything.
2020-02-03 16:50:54 -08:00
Abby
2c8fa91628 Bump appengine version number 2020-01-23 15:13:26 -08:00
Rachel Fenichel
cffb126f37 Update version numbers 2019-10-14 14:01:14 -06: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
Rachel Fenichel
3ca783485e Version bump 2019-07-22 10:39:52 -07:00
Rachel Fenichel
a4ff534b41 Update version number to 1.20190419.0 2019-04-19 11:37:10 -07:00
Neil Fraser
6b06f8eefc Listener functions are no longer wrapped opaquely. 2019-03-29 15:24:37 -07:00
ImgBotApp
583dfea6dd [ImgBot] optimizes images
*Total -- 61.18kb -> 44.41kb (27.42%)

/demos/headless/icon.png -- 4.26kb -> 1.80kb (57.72%)
/demos/interpreter/icon.png -- 3.13kb -> 1.71kb (45.13%)
/tests/media/g.png -- 1.14kb -> 0.66kb (42.17%)
/tests/media/50px.png -- 1.55kb -> 0.93kb (40.31%)
/demos/graph/icon.png -- 1.72kb -> 1.03kb (40.01%)
/tests/media/30px.png -- 1.10kb -> 0.67kb (39.4%)
/media/sprites.png -- 4.05kb -> 2.53kb (37.41%)
/tests/media/m.png -- 1.02kb -> 0.65kb (36.49%)
/tests/media/c.png -- 0.84kb -> 0.59kb (29.21%)
/tests/media/b.png -- 0.75kb -> 0.55kb (26.79%)
/demos/accessible/icon.png -- 1.38kb -> 1.01kb (26.69%)
/demos/generator/icon.png -- 3.52kb -> 2.61kb (25.64%)
/tests/media/a.png -- 0.76kb -> 0.57kb (25.45%)
/demos/fixed/icon.png -- 2.06kb -> 1.57kb (24.08%)
/tests/media/d.png -- 0.72kb -> 0.55kb (23.58%)
/demos/resizable/icon.png -- 3.18kb -> 2.47kb (22.27%)
/demos/toolbox/icon.png -- 2.76kb -> 2.16kb (21.83%)
/demos/rtl/icon.png -- 3.07kb -> 2.41kb (21.46%)
/tests/media/200px.png -- 2.11kb -> 1.67kb (21.06%)
/appengine/apple-touch-icon.png -- 3.93kb -> 3.15kb (19.78%)
/demos/code/icon.png -- 3.95kb -> 3.19kb (19.44%)
/demos/blockfactory_old/icon.png -- 4.34kb -> 3.55kb (18.17%)
/demos/maxBlocks/icon.png -- 1.96kb -> 1.61kb (17.87%)
/tests/media/k.png -- 0.60kb -> 0.50kb (16.18%)
/demos/plane/icon.png -- 3.32kb -> 2.80kb (15.63%)
/demos/storage/icon.png -- 3.19kb -> 2.71kb (14.99%)
/media/quote0.png -- 0.78kb -> 0.75kb (3.14%)
2018-09-23 13:31:54 -07:00
Neil Fraser
488539f636 Update storage.py to use ndb instead of db.
Back-ports from Blockly Games:
* db is old and busted, ndb is the new hotness (there’s no known
difference, just pointless API churn).
* Use SHA1 which is consistent, rather than Python’s hash() which has
started changing between executions.  This stops duplicate programs
from being stored.
* Restructure so that storage.py can be used as a library, with
xmlToKey and keyToXml being callable by external programs.
* Use print function compatible with Python 3.
2018-04-25 13:39:00 -07:00
Neil Fraser
35f7357878 Strip coordinates from storage of single block stacks.
When loading, place blocks with no coordinates at 10,10 instead of 0,0.
2018-04-05 14:04:06 -07:00
Neil Fraser
b296ffebd0 Stop storing IDs on every block in our datastore. 2018-03-27 13:56:01 -07:00
Neil Fraser
5efc148c4a Reduce number of Closure files in App Engine upload. 2017-01-15 19:52:34 -08:00
Andrew n marshall
592b2e1a51 Updating URLs to reflect new docs. (#418)
* Updating URLs to reflect new docs. Removing -blockly in URLs.

* Rebuilt.
2016-06-14 10:15:35 -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
Neil Fraser
e0f90e6e33 Adding more type documentation. 2015-07-13 15:03:22 -07:00
daarond
6809e9b49e Merge remote-tracking branch 'googleblockly/master'
Conflicts:
	blockly_uncompressed.js
2015-05-15 16:58:22 -05:00