Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
npm run format
andnpm run lint
The details
Resolves
Fixes #7036
Proposed Changes
Adds an abstract
Icon
class.Reason for Changes
To facilitate code reuse between the built-in icon classes.
Test Coverage
N/A
Documentation
N/A
Additional Information
I think I will probably want the abstract class to implement
hasBubble
once the bubble code is reorganized! but I'm going to wait until then to fix it =)All existing icons still extend the old icon abstract class.
Dependent on #7054
Breaking changes / updating / upgrading
This change is unlikely to affect you unless you are monkey patching Blockly to support custom icons. In this case, we recommend checking out the docs for using custom icons, and bringing your implementation back to mainline based on those =)
If you were using the
Blockly.Icon
class it is now located atBlockly.icons.Icon
. The blockly migration script can automatically perform this rename for you.