* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* feat: Added basic example test for Blockly Playground and Blockly Demo
* chore: move input and input types into new directory
* feat: define and export new input types
* feat: modify blocks to construct individual inputs
* chore: transition code to use actual type checks
* chore: fixup input type type
* chore: format
* chore: fixup PR comments
* chore: fix build
* fix: early return from updateDisabled if it is noop
* chore: trigger connect and disconnect before hiding
* chore: remove disconnectInternal
* fix: skip setting parent when disconnecting before connecting
* chore: fixup docs
* chore: remove erroneous test
* fix: add delay to context menu callback.
Improve INP by allowing the browser to do a paint (closing the context
menu) before we trigger callbacks. This improves the user experience
for expensive callbacks (e.g. collapsing, or updating disabled).
* fix: rendering bug
When disconnecting the last block in the stack, the block would not be
rerendered correctly (the top-start corner would not be reshaped)
* fix: connecting bug
The order for applying connections was changed so that connections were
applied and then the insertion marker was hidden. This caused an error
because hiding the insertion marker expected there to be a child block
when there was not.
* chore: remove setParent param from public API
* chore: tsdoc
* Reduce usage of obsolete .keyCode property.
* Rename private properties/methods which violate eslint rules.
* Use arrays of bound events rather than individual properties.
* Improve typing info.
* Also fix O(n^2) recursive performance issue in theme's getComponentStyle function.
* And replace String(...) with '${...}' (smaller, faster).
* .toString() is considered harmful.
* refactor: Remove uses of AnyDuringMigration from xml.ts.
* refactor: Remove uses of AnyDuringMigration from block_svg.ts.
* refactor: Remove uses of AnyDuringMigration from theme_manager.ts.
* refactor: Remove uses of AnyDuringMigration from names.ts.
* refactor: Remove uses of AnyDuringMigration from field_angle.ts.
* refactor: Remove some uses of AnyDuringMigration from block.ts.
* refactor: Make safename construction more readable.
* fix: Use a default size for block comments.
* fix: Clarify test of shadow block disposal.
* fix: Update assert in workspace_svg_test to use isDeadOrDying().
* feat: added `tests/typescript` to test supported TS examples
* fix: update the test name, description, and output
* chore: remove unused imports in `test_tasks.js`
* fix: wrap README line at 80 characters
* fix: implemented `different_user_input.ts` feedback
* fix: correct mistaken comments
* chore: rename `./eslintrc.json` to `./eslintrc.js`
* feat: added linting for tests/typescript
* chore: cleanup eslintrc lines over 80 characters
* fix: updated `.eslintrc.js` to provide an override for linting itself
* fix: updated tests to build to the `build` directory
* feat: updated `gulp format` to handle formatting `.eslintrc.js`
* fix: updated `.eslintrc.js` to align with both formatter and linter
* fix: updated config comment wording
* fix: removed quotes for valid identifiers
* Revert "fix: removed quotes for valid identifiers"
This reverts commit 03eff91aea1468e503bc79a90fb139914d3f39d2.
* chore(tests): Remove circular import loading issue kludge
Prior to PR #6818, circular imports resulted in the debug module
loader (in closure/goog/base.js) failing to record the
goog.module ID of most modules that were
involved in the cycle, and in particular of the Blockly.Xml
module. This had secondary fallout that resulted
in library blocks modules being loaded in the wrong order.
A kludge was introduced in PR #6703 that worked around this
problem by making sure that window.Blockly was set, allowing
the modules loaded out-of-order to still work.
Now that we have removed all remaining circular dependencies
there is no need for the kludge, since all module IDs are
properly recorded and modules are loaded in the correct order.
* chore(build): Remove exclude for non-existent core/blockly.js
There was a transitional period where we had both
core/blockly.ts and core/blockly.js, and wished to exclude
the latter from tsc's input, but the latter file was deleted
(and inadvertently restored, then re-deleted) some time ago.
* 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
This change had already been made (by PR #6475 amongst other) to
most of the tests, but there were a couple of stragglers that
still mentioned messages.js.
Fixes#6824.
* chore: Remove uses of AnyDuringMigration in workspace_comment_svg.ts.
* chore: Remove uses of AnyDuringMigration in toolbox.ts.
* chore: Remove uses of AnyDuringMigration in field_colour.ts.
* chore: Remove uses of AnyDuringMigration from field_image.ts.
* chore: Remove uses of AnyDuringMigration from workspace.ts.
* Update core/workspace_comment_svg.ts
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
* chore: Remove uses of AnyDuringMigration in collapsible_category.ts.
* chore: Revert unary - change to make clang-format happy.
* chore: Remove unnecessary quotes in toolbox.ts.
* Update core/workspace_comment_svg.ts
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
---------
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
* fix(tests): Fix errors in event tests
- Fix actual syntax errors in imports in event_marker_move_test.js
and event_selected.test.js, which were preventing those tests from
being run.
- Remove suite.only directives in those tests that would prevent
all the other tests from running.
* refactor(build): Improve buildDeps
- Run closure-make-deps only once, instead of separately for core/
and tests/.
- Specify a larger exec maxBuffer size, to ensure output and
diagnostics are not truncated.
- Change stderr filtering in buildDeps to filter out bounded
generics messages and blank lines.
- Attempt to suppress warnings in stderr output when
closure-make-deps returns a non-zero exit code.
Unfortunately, there seems to be a race condition which usually
the stderr argument to the exec callback not to contain the
complete output, so in that case print a helpful message.
- Have buildDeps just return a Promise instead of using a callback.
* fix(docs): Typo fix in JSDoc for log helper