-
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: remove retired "update cursorstyle over toolbox" #6116
fix: remove retired "update cursorstyle over toolbox" #6116
Conversation
@maribethb It looks like the block dragger is included in the registry (meaning we expect people to create custom subclasses?) And this function is protected, so does that make removing it technically a breaking change? |
Just wanted to give you an update on this @tweini @maribethb is out of office this week, so it will be next week before I have info for you on this =) |
Sorry I missed this before I went OOO! Yeah, I guess this would technically be a breaking change - if someone registers their own block dragger class and calls this method which will no longer exist. That seems exceedingly unlikely to me, but we're already going to be doing another major release so there is no harm in throwing this up in the breaking changes section of the release notes. So @tweini could you change the PR title to use the prefix as a side note we should go through and change some of these methods from |
Hi, got time for some investigations, because it seemed too hypothetical to me, that this is a breaking change: The ability to register an own block dragger class given by this PR: The cursor related code was added to toolbox.js with this PR one day later: So the code which will be removed by my PR was unreachable since then. When someone would have overwritten this method, he would have noticed it doesn't work and he will have moved the changes to the new spot. So bear with me. But there is a big difference between a hypothetical and a minimal chance. Or another perspective is, that the code deletion was simply forgotten by #4896 and nobody will have noticed it. Please don't get me wrong. Stability and Reliability as a goal of Blockly Team is absolutely honorable. But tagging this as a braking change is way too over engineered. There will be harm in throwing this up in the breaking change section. Everybody who reads this wastes his time for an information which too hypothetical. It's like writing "Look up" because of falling pianos. |
I definitely get where you're coming from wrt not wanting this to be a breaking change. However I still think we should mark it as one - Let's say someone registers their own block dragger and they decide that they want to trigger the toolbox delete style in certain scenarios custom to their application, so in the block dragger they call this method which conveniently already exists for them, called I do understand the cognitive load there is when reading release notes for breaking changes, so that's why I want to add a section to the PR description to make it clear who has to care about this or not. We have similar other changes where it's only under a specific circumstance that a change would break anyone, but we still want to err on the side of caution. |
I'm going to go ahead and close this one. If you're still interested in working on it, feel free to reopen! |
The basics
npm run format
andnpm run lint
The details
The Toolbox has been refactored and extends DeleteArea. As a consequence, the cursor update has been moved to the Toolbox:
blockly/core/toolbox/toolbox.js
Line 665 in 24704e0
And there is an incorrect comment in IStyleable, as it refers to Toolbox, but it should refer more generally to "an object".
The latter change is somehow tangled to this issue, so it makes sense to bundle it here.
Resolves
Unused code causes irritation. (I was irritated, so I took action to do this PR)
Proposed Changes
There was old code which has been removed.
There are no known references
Behavior Before Change
Behavior After Change
No change. The "isDeletable()" check has been implemented in toolbox.js with "wouldDelete()", so no indication of lost functionality.
Reason for Changes
Test Coverage
Manually tested. Cursor changes when block is dragged over toolbox.
Documentation
No doc needed, change is trivial.
Additional Information
Blockly Team is awesome 🤩