Commit Graph

46 Commits

Author SHA1 Message Date
John Nesky
f246adbd26 feat: Parse newlines in JSON message as row separators. (#6944)
* feat: Parse message newlines as endOfRow dummies.

* Fix the multilineinput field test.

* Addressing PR feedback.

* Addressing PR feedback.

* Newline parsing now uses a new custom input.

* npm run format

* Added input_end_row to block factory.

* Addres feedback, fix endrow after external value.
2023-08-11 12:41:49 -07:00
Christopher Allen
52a0d525d7 chore(build): Remove build products from the Blockly repository (#6475)
* feat(build): Make build tasks invoke their prerequisites

  - Divide gulp targets into three kinds: main sequence,
    manually invokable, and script-only.  The first two categories
    automatically invoke their prerequisites.
  - Give (most of) the affected gulp targets shorter and more memorable
    names that could become their npm script names in future.

* feat(build): Make package tasks invoke their prerequisites

  Have the package task invoke the cleanBuildDir (as well as
  cleanPackageDir) and build tasks.  Remove the checkBuildDir
  task as it is now redundant since a fresh build is done every
  time.

* feat(build): Make git tasks invoke their prerequisites

* feat(build): Make cleanup, license [sic] tasks invoke their prerequisites

  Turns out they don't have any, so this commit just classifies
  their gulp targets according to the established scheme.

* feat(build): Make appengine tasks invoke their prerequisites

  In this case prepareDeployDir will eventually depend on package
  but does not for now.

* feat(build): Have npm scripts run npm ci first where applicable

  Have any npm script that have external effects (e.g. publishing an
  npm package, pushing a new version to appengine, or updating GitHub
  Pages) start by running npm ci to ensure that all dependencies are
  up-to-date with respect to package-lock.json.

  (This is done by npm and not a gulp script because gulp itself
  might need updating.  So might npm, but that is less likely to
  make any difference to what gets published/pushed.)

* chore(build): have tests use package target

  Have the tests just run the package target (with debug flags)
  since that runs the the build target automatically.

* feat(tests): Write Closure Compiler output directly to dist/

  Since they are already UMD-wrapped, have Closure Compiler write
  output chunks directly to RELEASE_DIR, i.e. dist/.

* chore(tests): Use freshly-build files in compressed mode.

  Use the freshly-built build/*_compresssed.js files when bootstrapping
  in compressed mode, rather than using the checked-in files in the
  repository root.

  This helps ensure that compressed and uncompressed mode will be
  testing (as closely as possible) the same code.

  Obsoletes #6218 (though the issues discussed there have not actually
  yet been addressed in this branch).

* chore(build): Write intermediate langfiles to build/msg

  Write the results of create_messages.py to build/msg instead of
  build/msg/js.

* fix(build): Use build/msg/en.js instead of msg/messages.js in tests

  This has no direct effect but fixes a long-standing misdesign
  where we are testing against the input to, rather than the output
  of, the language file processing pipeline.

* feat(demos): Use freshly-built files

  Use the freshly-built dist/*_compresssed.js and build/msg/* files
  rather than using the checked-in files in the repository root.

  This helps ensure that these demos are using the most recent
  version of Blockly (even in the develop branch).

* fix(build): Update appengine deployment to include built files

  Modify the prepareDemos task as follows:

  - Use the git index instead of HEAD, so that most local changes
    will be applied (without copying whatever .gitignored cruft
    might be in the local directory).
  - Run clean and build and then copy build/msg and
    dist/*_compressed.js* to the deploy directory.

  This fixes the problem created by the previous commit, wherein the
  demos relied on built files that were not being deployed to
  appengine.

* fix(build): Update GitHub Pages deployment to include built files

  Modify the updateGithubPages task to run clean and build and
  then git add build/msg dist/*_compressed.js*, so that they will
  be included in the deployed pages.

  This fixes the problem created by the previous^2 commit,
  wherein the demos relied on built files that were not being
  deployed to GitHub Pages.

* chore(build): Remove build products from repository

  Remove *_compressed.js* and msg/js/* from the blockly repository.
  Also remove the now-obsolete checkinBuilt gulp task.

* chore(build): Apply relevant changes to test_tasks.js

  Apply changes made to run_all_tests.sh and check_metadata.sh to
  the corresponding parts of their JS replacements in
  test_tasks.js.

* chore(build): Make updates suggested in PR #6475

  - Remove `clean:builddir` and `clean:releasedir` - `clean`
    is sufficient.
  - Remove duplicate `require` from `appengine_tasks.js`.

* feat(build): Use shorter npm script names

  Since scripts that run build tasks now automatically run their
  prerequisite tasks, the previous naming scheme of task `build`
  running all the `build:subtask`s no longe really makes very
  much sense.

  Additionally, following a chat discussion, there seems to be a
  rough consensus to use "messages" to refer to the .json input
  files, and "langfiles" to the generated .js output files.

  Consequently, simplify npm script names by renaming as follows:

  - "generate:langfiles" -> "messages"
  - "build:langfiles" -> "langfiles"
  - "build:js" -> "tsc"
  - "build:deps" -> "deps"
  - "build:compiled" -> "minify"
  - "build:compressed": delete this synonym for "build:compiled",

  ("minify" was chosen as agnostic to Closure Compiler vs. WebPack.)

* chores(build): Add deprecation notice for old scripts

  To reduce potential confusion/frustration, restore the previous
  npm scripts but have them display a deprecation notice instead
  (note that npm prints the script contents before running it, so
  echo is not needed).

* docs(build): Add comments distinguishing 'messages' from 'langfiles'
2022-11-03 13:15:10 +00:00
Thomas Wehr
852e48a74b fix: update prettify url (#6459) 2022-09-30 07:56:08 -07:00
ChrisJaunes
e8ea2e9902 fix: Fixed the label closure on demo/blockfactory (#5833)
* fix: Fixed the label closure on demo/blockfactory

* fix: remove </input> on demo/blockfactory
2021-12-21 08:49:35 -08:00
Neil Fraser
c929b3015b chore: Convert == to === and != to !== where possible. (#5599) 2021-10-15 09:17:04 -07:00
Rachel Fenichel
1fd7622cf0 Add privacy policy to demos that use storage 2020-08-05 19:43:28 -07:00
Sam El-Husseini
888e348c69 Clean out the date field (#3876) 2020-05-06 09:42:24 -07:00
Neil Fraser
ae24b544f3 Fix injection vulnerability in Block Factories.
Fixes issue #756.
2019-08-02 11:00:40 -07:00
Neil Fraser
52b6ce18a5 Fix unit tests 2019-07-08 13:29:43 -07:00
Neil Fraser
ef28773a52 Enable selection of “no colour” on categories.
Near complete rewrite of colour picker for Blockly Factory.
* Drop IE6 support.
* Flip picker as needed so it doesn’t go offscreen.
* Add support for no colour.
* Factor CSS out of JS.
* Provide palette of our standard colours.
2019-06-26 13:55:55 -07:00
Neil Fraser
7e048f2e09 Remove last Closure from Block Factory.
Improves UI, but is still pretty clunky.  For example there’s still not way to choose “no colour”.
Closes #668.
2019-06-26 13:55:55 -07:00
Beka Westberg
ce816b93bf Added field_label_serializable. (#2399) 2019-04-24 10:43:09 -07:00
Andrew n marshall
2aadfa6ac2 BlockFactory: Fixing incorrect <button> html (#1622)
Applies changes suggested in #1176, based off of develop.
2018-02-20 13:00:44 -08:00
Andrew n marshall
1956baa963 BlockFactory: Adding JSON/JavaScript import support (#1235)
Updates the BlockFactory main workspace based on the preview block generated from manual construction.

This is a continuation of PR #1216 by @JC-Orozco, rebased on latest develop branch. Bring it latest code up to Google styling and standards.
2017-08-17 12:40:58 -07:00
Andrew n marshall
abcc9b82a1 Adding BlocklyDevTools.Analytics (#1217)
Adding BlocklyDevTools.Analytics, an interface for integrating an analytics
library to track basic usage, including:
 * navigation.
 * saving, importing, and exporting.
 * warnings and errors.
2017-07-11 15:39:35 -07:00
Andrew n marshall
3840b3804f Replacing latest prettifier hosted in repo with latest version at rawgit CDN. (#1120) 2017-05-22 12:09:23 -07:00
Neil Fraser
5b033e2f7b Misc cleanup. 2016-11-05 00:15:39 -07:00
Neil Fraser
9fe29a9cc2 Block Factory: Add missing workspace options, fix reset button. 2016-10-17 17:32:14 -07:00
Neil Fraser
728284ab61 Disable options in readonly mode. (Block Factory) 2016-10-14 08:57:39 -07:00
Neil Fraser
a2e7481d04 Stop block exporter options from jumping around. 2016-10-14 08:29:48 -07:00
Neil Fraser
ea1d0d7d3a Add labels to Block Factory. 2016-10-14 07:47:23 -07:00
Neil Fraser
32d09de62f Make dropdown in Block Factory modal. 2016-10-14 05:39:10 -07:00
Neil Fraser
7550cb1e96 Fix loading of Block Factory in Firefox. 2016-10-14 02:20:25 -07:00
Neil Fraser
92e92cdeaf Fix race condition when loading. 2016-10-14 01:56:55 -07:00
Neil Fraser
ff48285a86 Block factory cleanup. Fix one-based list option. 2016-10-13 20:18:44 -07:00
picklesrus
7c2016284a Change label of block factory to blockly developer tools. Change the icon too. Also remove old, unneeded index.html file from workspacefactory directory. (#694) 2016-10-12 11:21:59 -07:00
picklesrus
c102734ccb Replace Block Factory with Blockly Factory. Save Block Factory in blockfactory_old for safety. (#691)
Keep icon.png and blocks.js back into blockfactory rather than pointing to blockfactory_old.
2016-10-11 11:25:07 -07:00
rachel-fenichel
ef6c99c465 Merge pull request #517 from quachtina96/prefer-json
Block Factory: set JSON to default language format for block definitions
2016-08-02 09:59:57 -07:00
quachtina96
ae8fedc496 set JSON to default language format for block definitions 2016-08-01 17:03:08 -07:00
Neil Fraser
efc2ca3d82 Add field_number to Block Factory. 2016-07-10 22:54:57 -07:00
Neil Fraser
2d696aa731 Normalize order of languages. 2016-04-08 22:56:42 -07:00
Neil Fraser
05fc1ad91b Add workspace.clearUndo 2016-03-25 19:03:18 -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
55a94a14f0 Add naked variable to generator test. 2016-03-09 11:51:57 -08:00
Neil Fraser
774a76f275 Allowing manual code editing in Block Factory. 2015-06-30 22:51:06 -07:00
Neil Fraser
9050e32954 Adding JsonInit method of creating blocks. 2015-06-08 15:54:18 -07:00
daarond
ced61e5c58 updating demos 2015-05-14 17:09:19 -05:00
Neil Fraser
17961f7f58 Support multiple Blockly instances. 2015-04-28 13:51:25 -07:00
Neil Fraser
29976c4c4d Remove outside border from Blockly (issue 92). 2015-04-07 20:27:26 -07:00
Neil Fraser
66fc235721 Comment out date picker (it increases compile size by 60%). 2015-02-25 01:06:10 -08:00
Neil Fraser
cbb7204c27 Internationalize date picker. 2015-02-04 22:57:45 -08:00
Neil Fraser
ae69c3fbcf Improve porformance of colour changes. 2015-01-08 16:06:05 -08:00
Neil Fraser
a8414a0ecb Remove unneeded HTML attributes (Google style guide). 2014-12-02 18:22:46 -08:00
Neil Fraser
8d53788810 Move Plane app to demos. 2014-11-18 22:21:00 -08:00
Neil Fraser
448be04e59 Add help button to Block Factory. 2014-10-29 23:38:02 -07:00
Neil Fraser
6909e38fc8 Move Block Factory from apps to demos. Add icons to demos. 2014-10-16 16:58:32 -07:00