* 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.
* chore: change goog.module to goog.declareModuleId
* chore: change test helper exports to esmod exports
* chore: change test helpers to use esmodule imports
* chore: convert imports of test helpers to esmodule imports
* chore: convert other imports in tests to esm imports
* fix: make imports use built files
* chore: add blockly imports to a bunch of tests
* fix: reference Blockly.Blocks instead of Blocks'
* fix: properly import generators
* chore: fix lint
* chore: cleanup from rebase
* chore: cleanup from rebase
* chore: fix blocks tests
* fix: Fix errors under strict compilation.
* fix: Fix tests that referenced properties converted to data attributes.
* fix: Incorporate feedback on resolving compiler errors.
* refactor: Revert changes to skew and translate attributes.
* refactor: Introduce LegacyContextMenuOption type to correspond to documented fields.
* refactor: Introduce PathLeftShape and PathDownShape vs casting to PuzzleTab/Notch.
* chore: Added nullability modifiers to type annotations.
* refactor: Export FlyoutItem directly.
* chore: clang-format renderers/zelos/drawer.js.
* fix: move core test helpers into new directory
* fix: add test helpers to core and convert to goog modules
* fix: change tests to use local helpers
* fix: change local tests to use chai asserts
* fix: skip field tests in serializer b/c test blocks are unavailable
* fix: rename some helper files
* fix: rename some helper modules
* fix: split block helpers into code gen and serialization
* fix: split block defs into new helper file
* fix: split warning helpers into new file
* fix: split user input helpers into new file
* fix: split event helpers into a new file
* fix: split variable helper into new file
* fix: move remaining test helpers to new setup-teardown file
* fix: rename setup and teardown module
* fix: cleanup from rebase
* fix: undo accidental rename
* fix: lint?
* fix: bad toolbox definitions namespace
* fix: fixup warning helpers
* fix: remove inclusion of dev-tools in mocha tests
* move to modules, but break mocha
* fix: run mocha as a module
* fix: lint
* Upgrade field angle to use new serialization
* Upgrade field checkbox to use new serialization
* Upgrade field colour to use new serialization
* Upgrade field dropdown to use new serialization
* Upgrade serializable label field to use new serialization
* Upgrade field multiline input to use new serialization
* Upgrade field number to use new serialization
* Upgrade field text input to use new serialization
* Upgrade variable field to use new serialization
* Fix type casts
* Feedback from PR
* Switch to use getValue()
* Use goog.module in mocha tests
* Fix compiler warnings
* Make test helpers a module
* Name test modules Blockly.test.*
This is to be more consistent with how non-test modules are named.
Also remove top-level goog.require of TestHelpers (now
Blockly.test.helpers) since requiring a side-effect-less module does
nothing.
* Convert block_test.js and comment_test.js to goog.module syntax
* Address PR comments
* Goog modulify tests
* Goog modulify toolbox helpers
* Fixes imports and moves common tests from workspace_test.js to a helper file.
* Update test deps after rebase
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
* Update logic for field default values.
* Fix bugs
* Use contant for default value.
* Fix FieldColour
* Update field number tests.
* Update field angle test.
* Minor update.
* Update field checkbox test.
* Undo enabling logging
* Remove only.
* Update field colour test.
* Update invalid test cases for field colour
* Update field label tests
* Update field textinput test.
* Minor cleanup
* Make lint happy.
null was being converted to 0 by Number() when it should cause the
default value to be set instead. This updates FieldNumber and
FieldAngle to handle nulls correctly. Also update jsdoc.
Fixes#3177
* 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.
Number() is a bit less forgiving than parseFloat() and is more likely to generate NaN rather than some random number. An audit of each case shows nowhere that parseFloat()’s features are needed.
Null is explicitly disallowed in most field constructors. Thus the random results of passing null are undefined and may change. These changes should not be tested against.
Exceptions: Variable and serializable lable fields acually do take null.
This commit is due to the upcoming parseInt->Number commit which happens to change how null behaves.
Also added missing ‘empty’ test for checkboxes.
* Added field value tests.
* Fixed field image src param.
* Fixed falsy values with label fields.
* Fixed falsy values with text input fields.
* Fixed some angle field tests.
* Fixed other text input when editing tests.
* Fixed colour tests.
* Cleaned up some number and variable field tests.
* Added angle field > 360 degrees tests.
* Fixed variable validator tests.
* Split setValue tests into sub-suites.
* Fixed angle >360 tests
* Changed var declarations to property declarations.