* chore: make inline docs for events informative
* Notifies the developer -> Notifies listeners
* chore: cleanup from PR comments
* chore: final PR fixes
* chore: format
Doing npm start in a clean checkout loads a broken playground,
because the deps script does not run buildLangfiles.
To fix this (and also to ensure that compressed playground loading
also works, even though uncompressed is the default), have the
start script run the build script rather than just deps.
* fix(node): Don't use global variables for jsdom injection
Introduce a (hopefully generally applicable) mechanism for
injecting dependencies into modules, specifically in this case
to inject required bits of JSDOM's Window and Document
implementations into core/utils/xml.js when running in
node.js or other environments lacking a DOM.
The injectDependencies function uses an options object to
facilitate optionally injecting multiple named dependencies
at the same time.
Rename the xmlDocument local variable back to document (was
renamed in #5461) so that the name used in this module
corresponds to the usual global variable it replaces.
Change the injection in scripts/package/node/core.js to use
injectDependencies instead of setXmlDocument + global variables;
also eliminate apparently-unnecessary creation of a special
Document instance, using the default one supplied by jsdom
instead.
Fixes#6725.
* deprecate(xml): Deprecate getXmlDocument and setXmlDocument
Mark getXmlDocument and setXmlDocument as @deprecated, with
suitable calls to deprecation.warn().
There are no remaining callers to either function within core -
setXmlDocument was only used by the node.js wrapper, and and
apparently getXmlDocument was never used AFAICT - and we do not
anticipate that either were used by external developers.
* fix: Corrections for comments on PR #6764.
* fix: undoing pasting procedure callers that create defs
* chore: move createDefs_ to the mixin that calls it
This reverts commit 6f4eab2f0884fa108a9ba15ee2db7a3414517a23.
* chore: replace `AnyDuringMigration` for field value functions
* chore: removed unnecessary `KeyboardEvent` comments and `AnyDuringMigration` casts
* chore: cleaned up `doValueUpdate_` and `doClassValidation_` in `Field` subclasses
* fix: updated `FieldValidator` to allow returning `undefined` and restructured `setValue`
* fix: implemented initial `core/field_checkbox.ts` feedback
* fix: updated `Field` to accept `U` and `undefined` and reverted subclass constructor handling of the input value
* fix: reverted `getVars` to returning `string[]` and added related comment
* chore: removed unnecessary comment
* fix: updated `processValidation_` to no longer allow returning `undefined`
* fix: removed `Un` type alias for `undefined`
* chore: removed unnecessary string cast in `core/field_colour.ts`
* fix: updated `doClassValidation_` not to expect `null` since it will never come up in `setValue`
* fix: updated `doClassValidation_` to only allow `undefined` when the new value exists
* Updated `FieldValidator` type to expect `newValue` to exist
* cleanup: updated `picker` from type `Element` to type `HTMLElement`
* fix: updated `doValueInvalid_` type info in `core/field_input.ts` to handle `string` and `undefined`
* fix: reverted `getValue` in `core/field_checkbox.ts` to previous logic
* fix: updated the `Field` constructor to allow `value` to be optional
* chore: consolidated `Validation` with `FieldValidator` and `doClassValidation_`
* fix: reverted generic param `U` while handling diverging user input is being discussed
* fix: updated `doClassValidation_` return comment to work for TSDoc
* fix: misc keyboard event function tweaks
* chore(tests): Enable testing on node.js v18.x on GitHub CI
* chore(tests): Remove outdated calls to test:prepare npm script
The calls to `npm run test:prepare` in `tests/scripts/setup_*_env.sh`
should have been removed along with that npm script in PR #4906.
* chore(deps): Fix alphabetisation in package.json
* chore: add test for reconnecting procedure input blocks
* feat: add caller blocks responding to updates
* chore: format
* chore: add test for deserializing callers before defs
* chore: format
* feat: procedure blocks have models
* feat: add updating the name of the model
* feat: add procedure defs updating the model enabled state
* feat: add procedure blocks updating parameters in the model
* fix: add disposing of the procedure model
* chore: updates test to check for identity of parameters
* chore: move statement handling into setStatement
* fix: make parameter IDs consistent
* chore: un-only tests
* chore: fixup tests
* chore: revert validator to use Procedures.rename
* chore: cleanup typo
* chore: sketch out necessary test cases
* chore: add tests for updating the data models
* chore: outline more response tests
* chore: add tests for updating procedure def blocks based on models
* chore: add tests for updating procedure callers based on procedure model updates
* chore: add tests for renaming procedures
* chore: add tests for adding procedure parameters
* chore: add tests for renaming procedure parameters
* chore: add tests for reordering procedure parameters
* chore: add tests for enabling and disabling procedures
* chore: add tests for deleting procedure def
* chore: fixup tests that we accidentally broke
* chore: format
* docs(icon): Better description for Icon.prototype.setVisible
Also tweak description of getBlock.
* docs(blocks): Fix typo in description of BlockDefinition
* chore(tests): Factor out common goog:chromeOptions
* chore(build): Minor style fixes
No visible change for regular case. But if there's thousands of blocks in the trash, the visual feedback that something's happening is better. Otherwise the user clicks, and that click will cause some random block to be spawned out of the trash.
Previously we had code that would, in uncompiled mode, make sure
that javascriptGenerator etc. were set to the corresponding module
exports object (by fetching it with goog.module.get), but in
compressed mode we made no effort to set (e.g.) javascriptGenerator
to Blockly.JavaScript, which is where that export actually appears
in the namespace tree when loading the chunk via a <script> tag.
This commit introduces two new configuration options to bootstrap.js
(preconfigured with defaults that should work in most cases) mapping
global variable names to their corresponding module identifiers, and
modifies the code in bootstrap_helper.js to set global variables
appropriately in both uncompressed and compressed modes.
For the most part spellcheckers ignore numbers so this isn't an issue. But (for example) 'Infinity' is an English word that's hardcoded into Blockly, and other languages may spellcheck it as wrong.