-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix!: refactor mutator icon #7115
Conversation
e9e2dd0
to
001505f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite finished reviewing all of mutator_icon.ts
, but thought I should send you my comments so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite finished reviewing all of mutator_icon.ts
, but thought I should send you my comments so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finished reviewing; had a few additional comments.
f53ae53
to
83a8c33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small nits which I will leave for you to resolve as you see fit.
55a89b0
to
9bc8e2d
Compare
2392771
to
70af1a5
Compare
The basics
npm run format
andnpm run lint
The details
Resolves
Fixes #7039
Proposed Changes
Refactors the mutator icon to conform to the
IIcon
interface.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.Mutator
class 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
updateBlockStyle
method 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
shouldIgnoreMutatorEvent
method 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.reconnect
method has been deprecated. UseConnection.prototype.reconnect
instead.The
findParentWs
method has been deprecated. UseWorkspace.prototype.getRootWorkspace
instead.Showing/hiding bubbles
The
setVisible
method has been renamed tosetBubbleVisible
for clarity. If you need to modify whether the bubble of the mutator icon is visible or not, you can do:The
setVisible
method will be removed in v11.