Skip to content

fix: Improve initial block placement#9903

Merged
gonfunko merged 3 commits into
v13from
new-position
May 21, 2026
Merged

fix: Improve initial block placement#9903
gonfunko merged 3 commits into
v13from
new-position

Conversation

@gonfunko
Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Fixes #9878

Proposed Changes

This PR improves the placement of newly-inserted blocks when using keyboard navigation. It's a near-exact backport of the logic from the keyboard-experimentation repo, with the adjustment of increasing the bounds of existing blocks to avoid placing the new block within snapping range. Generally new blocks will be placed wherever free space is available while scanning across the workspace row by row.

@gonfunko gonfunko requested a review from a team as a code owner May 19, 2026 20:54
@gonfunko gonfunko requested a review from mikeharv May 19, 2026 20:54
@gonfunko gonfunko changed the title New position fix: Improve initial block placement May 19, 2026
@github-actions github-actions Bot added the PR: fix Fixes a bug label May 19, 2026
Comment thread packages/blockly/core/dragging/block_drag_strategy.ts
Comment thread packages/blockly/core/dragging/block_drag_strategy.ts Outdated
@gonfunko gonfunko requested a review from mikeharv May 21, 2026 15:59
@gonfunko gonfunko merged commit e66dac5 into v13 May 21, 2026
5 checks passed
@gonfunko gonfunko deleted the new-position branch May 21, 2026 16:03
@microbit-robert
Copy link
Copy Markdown
Collaborator

@gonfunko I think this has negative impacts on dragging blocks from the flyout with the mouse.

@gonfunko
Copy link
Copy Markdown
Contributor Author

Ah good catch, working on a fix forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants