* refactor(events): Use "export ... from" where applicable
* refactor(events): Introduce EventType enum
Introduce an enum for the event .type values. We can't actually
use it as the type of the .type property on Abstract events,
because we want to allow developers to add their own custom
event types inheriting from this type, but at least this way we
can be reasonably sure that all of our own event subclasses have
distinct .type values—plus consistent use of enum syntax
(EventType.TYPE_NAME) is probably good for readability overall.
Put it in a separate module from the rest of events/utils.ts
because it would be helpful if event utils could use
event instanceof SomeEventType
for type narrowing but but at the moment most events are in
modules that depend on events/utils.ts for their .type
constant, and although circular ESM dependencies should work
in principle there are various restrictions and this
particular circularity causes issues at the moment.
A few of the event classes also depend on utils.ts for fire()
or other functions, which will be harder to deal with, but at
least this commit is win in terms of reducing the complexity
of our dependencies, making most of the Abstract event subclass
module dependent on type.ts, which has no imports, rather than
on utils.ts which has multiple imports.
* chore(deps): Add pretter-plugin-organize-imports
* chore: Remove insignificant blank lines in import sections
Since prettier-plugin-organize-imports sorts imports within
sections separated by blank lines, but preserves the section
divisions, remove any blank lines that are not dividing imports
into meaningful sections.
Do not remove blank lines separating side-effect-only imports
from main imports.
* chore: Remove unneded eslint-disable directives
* chore: Organise imports
* docs(block): Improve documentation for well-known block methods
Improve the JSDocs for the declarations of well-known block
methods:
- getDeveloperVariables
- compose
- decompose
- saveConnections
* docs(blocks): Improve block comments
Fix JSDoc formatting in both core/block.ts and blocks/*, as well as
making various other minor improvments.
* chore(blocks): Remove one unexported const
* feat: Invalid Blocks
* Rename the new json property from invalid to invalidReasons.
* Merged isValid into isEnabled.
* Minor fixes.
* More minor fixes.
* Reverting some stuff that didn't need to change.
* Addressing PR feedback.
* Update the BlockInfo interface to match State.
* Make BlockChange.disabledReason private.
* 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
* 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
* 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.
* fix: input exports
* chore: fix build
* chore: attempt to fix build
* chore: attempt to fix build
* chore: create new align enum to replace old one
* chore: format
* fix: Tweak renamings entries
It appears that the goal is to map:
Blockly.Input.Align -> Blockly.inputs.Align
Blockly.Align -> Blockly.inputs.Align
Blockly.ALIGN_* -> Blockly.inputs.Align.*
I believe this commit achieves that in a more minimal (and correct)
way—but if I have misunderstood the intention then this will not
be a useful correction.
---------
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
* feat: add basic mutator icon
* feat: add actual mutation behavior to icon
* chore: add bumping blocks back into the bubble
* fix: add updating block styles
* feat: add static methods to mutator icon
* chore: delete old mutator code
* fix: use the new mutator icon
* chore: docs and format
* chore: my own comments
* chore: first pass at PR comments
* chore: make type strings internal
* chore: add todo
* chore: format
* chore: move properties to module level
* chore: fix using in demos
* chore: move Mutator to icons.MutatorIcon
* chore: move reconnect to connection
* chore: move findParentWs to workspace
* chore: properly override and call super
* chore: remove bubbleIsVisible check
* chore: change imports to import type
* chore: use elvis operator
* chore: update renamings
* chore: reduce changes to js block files
* 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
* feat: Add 'reason' field to move event
There are many types of move. This addition allows one to detect what the reason for each move is.
* Clang formatting.
And unsaved editor tabs.
* Change reason string to array.
* fix: Don't clober event group when renaming vars
Also audit all existing event group commands and tweak a few of them where I think there's a potential issue.
* 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().