Skip to content

Conversation

@microbit-matt-hillsdon
Copy link
Contributor

@microbit-matt-hillsdon microbit-matt-hillsdon commented May 22, 2025

  • Single statement block to match move. Perhaps both could do multi-block with uppercase.
  • Just call unplug like the drag strategy does.

This means the disconnected block ends up the current node. Previous (presumably accidental) behaviour was to select the connection in a way that can't normally be navigated to causing it to persist oddly.

You could make a case for move mode too but it's all tangled up with the insert/paste/heuristic discussion so not considering here.

Demo: https://simpler-disconnect.blockly-keyboard-experimentation.pages.dev/

- Single statement block to match move. Perhaps both could do multi-block with
  uppercase.
- Just call unplug like the drag strategy does.

This means the disconnected block ends up the current node. Previous
(presumably accidental) behaviour was to select the connection in a way that
can't normally be navigated to causing it to persist oddly.
@microbit-matt-hillsdon microbit-matt-hillsdon requested a review from a team as a code owner May 22, 2025 15:08
@microbit-matt-hillsdon microbit-matt-hillsdon requested review from cpcallen and removed request for a team May 22, 2025 15:08
const rootBlock = superiorConnection.getSourceBlock().getRootBlock();
rootBlock.bringToFront();
const healStack = !curNode.outputConnection?.isConnected();
Events.setGroup(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set the event group to false afterwards.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rachel-fenichel
Copy link
Collaborator

Overall I'm happy with this--matching existing behaviour means we use well-tested codepaths.

@rachel-fenichel rachel-fenichel merged commit 41994da into RaspberryPiFoundation:main May 22, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants