Workiva/wf-uicomponents — pull request #104 by timmccall-wf (2014-10-24 21:48:33+00:00)
Title: Swipe with Instantaneous Velocity

Problem
-------

Hammer's default swipe gesture calculates velocity over the entire duration of an interaction, from first touch to last. This can lead to both false positives and negatives; for example, when dragging very quickly then pausing before releasing, or when dragging slowly over a small range and then flicking a finger.

Solution
--------

Create a custom swipe gesture that compares only the deltas between the last two move events.

Unit Tests
----------

Added.

How To +10/QA
-------------

- Travis should pass.
- `grunt serve`
- Navigate to the ScrollList demo in Chrome.
- Open the dev tools and turn on device emulation to simulate touch events; after refreshing, ensure you are in flow mode, as this is easiest for visually verifying behavior.
- Attempt a false positive by dragging very fast, pausing, then releasing. _Should not trigger a swipe._
- Attempt a false negative by dragging slowly over a limited range, pausing, then flicking very fast and releasing. _Should trigger a swipe._
- Exercise on mobile device as well to verify that velocity matches expectations, touch and feel-wise. Also try various scroll and fit modes to make sure things are sane.

@robbecker-wf @todbachman-wf
FYI: @brianreed-wf