* feat: add ability to click fields in flyouts
* feat: control if icons are clickable in flyouts
* fix: make default icons not clickable in flyout
* fix: use booleans like a real programmer
* fix: add basic autoclose toggling support
* fix: drag areas being incorrect
* fix: blocks getting bumped around when dragged into flyout area
* fix: respect always-open flyouts attached to toolboxes
* fix: flyout not hiding on ws click
* fix: have all flyouts filter for capacity
* chore: cleanup
* fix: view metrics not respecting flyout
* chore: fix change detectors
* fix: trashcan not firing close event on click
* add saveIds param and logic to save correctly
* remove whitespace
* add saveIds to recursive calls
* run format
* change name from addIds to saveIds
* add saveIds test
* change blockId on false saveIds to undefined
* chore: delete dead code
* chore: moves location updating into the block
* chore: change dragging to use update component locations
* fix: field widgets not being moved when blocks are editted
* chore: remove unnecessary resizeEditor_ calls
* chore: format
* chore: fix build
* fix: tests
* chore: PR comments
* chore: format
Make two changes to the forBlock dictionary on CodeGenerator
objects:
- Change the type of the second argument to the special 'this'
type (was CodeGenerator), so that e.g. JS block generator
functions can call JavascriptGenerator.prototype.getAdjusted
(not defined on CodeGenerator).
- Change the way forBlock is declared from using an index
signature to using the Record<> template type. The two
should be equivalent but for some reason the former provokes
type errors when used with the 'this' type.
Additionally, deprecate the now-unused (but exported)
BlockGenerator type alias.
Technically the change of signaure is a breaking chnage, but
it is unlikely to affect any developers in practice, since
any block generator function (Block, CodeGenerator) => ...
can be substituted in for (Block, C extends CodeGenerator) =>
..., so any existing generator functions can still be added
to any CodeGenerator or subclass instance's .forBlock. The
only situation in which this would be breaking is if a
developer was obtaining block generator functions
FROM a subclass instance's .forBlock dictionary and assuming
they were (Block CodeGenerator) => ...
* fix: recreate dropdown div
* fix: recreate tooltip div
* fix: recreate widget div
* fix: Stop using global variables and use getDiv()
* Revert "fix: Stop using global variables and use getDiv()"
This reverts commit 322c4d884b.
* fix: reset widget div
* add fire event to comment change
* change variable names to make readable
* add oldtext field to commenticon
* remove debugger
* remove oldtext field
* add firing block change event to setText
* add fire to setText
* fix: setCommentText fire block change when icon removed
* remove whitespace
* NOT PASSING TESTS: fix block test fails
* fix: remove duplicate events so tests pass
* fix: remove whitespace
* fix: run format
* refactor: add early returns to onTextChange for readability
* remove console.log
* disable events temporarily when setText called in setCommentText
* refactor: move fire event to original position
* fix: run format
* fix: move fire event so it happpens after events are enabled and disabled
On the desktop, widgetDispose_ will call onFinishEditing_ on close.
This was missing in the mobile counterpart, so any cleanups in onFinishEditing_ would not be called.
Also update the message string comment while we are touching this code.
* Setting style property to make CSP less grumpy.
"Content-Security-Policy: The page’s settings blocked the loading of a resource at inline (“style-src”)."
The 'style' property should be set as an object, not as a string, according to CSP rules.
Back-ported from Blockly Games.
* feat: add getVariableName and getProcedureName to CodeGenerator
* feat: make nameDB_ public
* feat: update block code generators to use new APIs
* chore: fix build
* chore: remove unused imports
* fix(build): Restore erroneously-deleted filter function
This was deleted in PR #7406 as it was mainly being used to
filter core/ vs. test/mocha/ deps into separate deps files -
but it turns out also to be used for filtering error
messages too. Oops.
* refactor(tests): Migrate advanced compilation test to ES Modules
* refactor(build): Migrate main.js to TypeScript
This turns out to be pretty straight forward, even if it would
cause crashing if one actually tried to import this module
instead of just feeding it to Closure Compiler.
* chore(build): Remove goog.declareModuleId calls
Replace goog.declareModuleId calls with a comment recording the
former module ID for posterity (or at least until we decide
how to reformat the renamings file.
* chore(tests): Delete closure/goog/*
For the moment we still need something to serve as base.js for
the benefit of closure-make-deps, so we keep a vestigial
base.js around, containing only the @provideGoog declaration.
* refactor(build): Remove vestigial base.js
By changing slightly the command line arguments to
closure-make-deps and closure-calculate-chunks the need to have
any base.js is eliminated.
* chore: Typo fix for PR #7415
* refactor(tests): Use shims instead of bootstrap to load Blockly
- Modify tests/generators/index.html to import the test shims
instead of using bootstrap.js to load Blockly.
- Modify test/generators/webdriver.js to have it wait for the
workspace to exist before calling loadSelected(). There was
previously a race which index.html had been winning, but
now webdriver.js is winning (and the tests failing because
there is no workspace yet when start() is called.
* chore(tests): Delete bootstrap.js etc.
- Delete bootstrap.js, bootstrap_helper.js, and bootstrap_done.mjs.
- Remove remaining references to bootstrap.js
* refactor(build): Remove deps npm script
buildDeps is now only needed by buildCompiled, not ever for
runnning in uncompressed mode, so:
- Remove the deps gulp task (and the deps npm script.
- Have the minify task run buildJavaScript and buildDeps directly.
Additionally, the buildAdvanceCompilationTest target hasn't
needed deps.js for some time (if ever), so skip having it run
buildDeps entirely.
* refactor(build): Repatriate DEPS_FILE to build_tasks.js
Since this is no longer used anywhere else it doesn't need to
live in common.js.
* fix(scripts): Remove vestigial references to deps.mocha.js
* docs(tests): Add additional explanatory note
* chore: work on cleaning up mutator tests
* chore: remove need for dragBlockSelector
* chore: add helpers to clean up tests
* chore: add issue link in TODO
* chore: format and add docs for new helpers
* Revert "chore: remove need for dragBlockSelector"
This reverts commit dfec88a6aa.
* chore: fixup connect helper