Skip to content

Conversation

@rachel-fenichel
Copy link
Collaborator

Fixes #373.

Adds a drag strategy class and the appropriate patching and unpatching at beginning and end of drag.

The new class extends core's BlockDragStrategy. Populating it with useful functions is tracked in #364.

Part of #363

Tested by:

Doing keyboard drags that end in an Esc
Doing keyboard drags that end in an Enter
Doing mouse drags after the fact to confirm that mouse dragging still works

@rachel-fenichel rachel-fenichel requested a review from a team as a code owner April 2, 2025 19:11
@rachel-fenichel rachel-fenichel requested review from RoboErikG and maribethb and removed request for a team and RoboErikG April 2, 2025 19:11
Copy link
Contributor

@RoboErikG RoboErikG left a comment

Choose a reason for hiding this comment

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

Looks fine, just a question on MoveInfo types which isn't directly part of this change.

@rachel-fenichel rachel-fenichel merged commit bac96c1 into RaspberryPiFoundation:main Apr 2, 2025
2 checks passed
@rachel-fenichel rachel-fenichel deleted the fix-373 branch April 2, 2025 19:50
* The block's base drag strategy, which will be overridden during
* keyboard drags and reset at the end of the drag.
*/
private oldDragStrategy: IDragStrategy | null = null;
Copy link
Collaborator

@cpcallen cpcallen Jun 6, 2025

Choose a reason for hiding this comment

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

This should be on MoveInfo because Mover can handle multiple simultaneous moves on different workspaces.

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.

Modify block's drag strategy for constrained dragging

4 participants