Skip to content

Touch: tap slop has never been verified on a device #5

Description

@isenbek

Pinch and pan are verified on real hardware. Tap slop is not.

That distinction matters because both of the verified gestures were broken,
and neither could have been caught headlessly:

  • A pinch wrote its state with one spelling and read it with another, so the
    first move after a second finger landed computed mid.x - undefined. NaN went
    into the camera and stuck, because NaN survives every comparison
    (Math.max(lo, NaN) is NaN). The die vanished permanently on the first pinch.
  • screenToDie inverted the wrong axis, so vertical panning ran backwards and
    zoom drifted away from the cursor instead of anchoring to it.

Both now have regression tests. The lesson is the part worth keeping: a
headless check cannot reach a second contact point, and cannot tell you a
direction feels wrong.

What is unverified

Tap slop is 12px for touch and 4px for mouse — a finger always moves a little,
and a tap that registers as a drag never selects anything. Whether 12px is right
on a real device is a judgement nobody has made with a real finger.

Affects the die view, the schematic workbench and its study view.

How to check

On a phone and a tablet: tap nodes in the die view and pills in the workbench,
including deliberately sloppy taps. A tap that selects nothing, or a drag that
selects something, is the failure. Ask for a device before believing touch works.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions