-
Notifications
You must be signed in to change notification settings - Fork 3.8k
feat!: change gestures to look at selected when dragging #7991
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
feat!: change gestures to look at selected when dragging #7991
Conversation
core/block_svg.ts
Outdated
| return this.style.colourTertiary; | ||
| } | ||
|
|
||
| // TODO: Before merging, is it better to just remove these or to leave them |
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.
Actually we have to leave these so that the BlockSvg conforms to the ISelectable interface.
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.
Since you have to keep it, please add a description of the breaking change to the PR description (as I understanding, that block.select() and block.unselect() no longer fire events or update the workspace's selected value--they just update the block itself--and that devs need to call common.select to get the old behaviour.
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.
I'm gonna go through and update the PR descriptions in bulk before the release.
ba804c4 to
3163dc6
Compare
core/block_svg.ts
Outdated
| return this.style.colourTertiary; | ||
| } | ||
|
|
||
| // TODO: Before merging, is it better to just remove these or to leave them |
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.
Since you have to keep it, please add a description of the breaking change to the PR description (as I understanding, that block.select() and block.unselect() no longer fire events or update the workspace's selected value--they just update the block itself--and that devs need to call common.select to get the old behaviour.
…Foundation#7991) * feat: change gestures to look at selected when dragging * chore: fix tests * chore: format * chore: PR comments
* Change BlockSvg.select to Blockly.common.setSelected RaspberryPiFoundation/blockly#7991 * Enable Highlight Procedure * Change method name to conform with current Blockly and App Inventor
The basics
The details
Resolves
Fixes N/A
Proposed Changes + reasons
Makes it so the gesture class looks at whatever is selected when it starts a drag. This will allow the multi select plugin to provide its own draggable for when multiple things are selected.
Test Coverage
Manually tested and everything seems to be working! But this could definitely use some hammering.
Documentation
N/A
Additional Information
N/A
Breaking changes / To fix
This reverses the responsibility of the
Blockly.common.setSelectedand thesomeElement.selectmethods. If you were callingselectorunselectyou should instead callBlockly.common.setSelected(some element)andBlockly.common.setSelected(null)respectively.