Skip to content

Replace shaker and cancel drag-and-drop with rapid scribble gesture #3423

@raineorshine

Description

@raineorshine

Replace the shaker with a more accurate method of detecting a rapid scribble gesture.

The premise of Shaker is probably bad. Is assumes that frequency of longPressActionCreator is a good proxy for rapid user movement. That may be true under some circumstances, and may have been true at some point in time, but clearly is not a reliable method now. Moving slowly at the boundaries of drop targets will also trigger many longPressActionCreator calls.

Originally posted by @raineorshine in #3273

Steps to Reproduce

- a
- b
- c
- d
- e
- f
- g

Drag a and move the pointer rapidly back and forth in a scribble motion.

Current Behavior

It is too difficult to cancel the gesture.

Expected Behavior

Drag-and-drop should be cancelled with a rapid scribble movement. The balance needs to be achieved to avoid false negatives and false positives. Too fast, and it's hard to activate. Too slow, and the user will accidentally cancel the gesture just from moving around the pointer as they drag the thought.

False positives (cancelling the drag-and-drop) are a more punishing outcome than false negatives (not cancelling it), so set the threshold high and avoid any cancellations that do not feel right. It should cancel only in response to an unambiguous scratching motion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorRefactor without changing behavior

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions