fix!: refactor mutator icon#7115
Merged
BeksOmega merged 24 commits intoJun 2, 2023
Merged
Conversation
BeksOmega
commented
May 23, 2023
BeksOmega
commented
May 24, 2023
e9e2dd0 to
001505f
Compare
BeksOmega
commented
May 24, 2023
cpcallen
requested changes
May 25, 2023
cpcallen
left a comment
Collaborator
There was a problem hiding this comment.
Not quite finished reviewing all of mutator_icon.ts, but thought I should send you my comments so far.
cpcallen
requested changes
May 25, 2023
cpcallen
left a comment
Collaborator
There was a problem hiding this comment.
Not quite finished reviewing all of mutator_icon.ts, but thought I should send you my comments so far.
cpcallen
reviewed
May 26, 2023
cpcallen
left a comment
Collaborator
There was a problem hiding this comment.
Finished reviewing; had a few additional comments.
BeksOmega
commented
May 31, 2023
BeksOmega
commented
May 31, 2023
cpcallen
reviewed
Jun 1, 2023
f53ae53 to
83a8c33
Compare
cpcallen
approved these changes
Jun 1, 2023
cpcallen
left a comment
Collaborator
There was a problem hiding this comment.
Just a few small nits which I will leave for you to resolve as you see fit.
55a89b0 to
9bc8e2d
Compare
cpcallen
reviewed
Jun 2, 2023
2392771 to
70af1a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 formatandnpm run lintThe details
Resolves
Fixes #7039
Proposed Changes
Refactors the mutator icon to conform to the
IIconinterface.Reason for Changes
Code consistency :D
Test Coverage
Updated tests! Also manual testing :D
Documentation
N/A
Additional Information
Dependent on #7110
Breaking changes / updating / upgrading
The
Blockly.Mutatorclass has been renamed toBlockly.icons.MutatorIcon. If you use the blockly migration package, you can automatically rename this throughout your files by doing:Note that you are now required to pass the block the mutator icon will live on to the mutator icon's constructor.
Misc methods
The
updateBlockStylemethod is no longer available. Updating block styles is handled automatically, so you should be able to safely remove any references to this method. If removing this causes problems for your application, please file a bug report.The
shouldIgnoreMutatorEventmethod is no longer available. This method was originally intended for internal use, and should not have been public. If you were using this method, we recommend duplicating the code from here into your own application.Deprecations
The
Mutator.reconnectmethod has been deprecated. UseConnection.prototype.reconnectinstead.The
findParentWsmethod has been deprecated. UseWorkspace.prototype.getRootWorkspaceinstead.Showing/hiding bubbles
The
setVisiblemethod has been renamed tosetBubbleVisiblefor clarity. If you need to modify whether the bubble of the mutator icon is visible or not, you can do:The
setVisiblemethod will be removed in v11.