• Sinan Sahin's avatar
    [Messages] Add horizontal swipe-to-dismiss gesture · 6d9a9e8e
    Sinan Sahin authored
    This CL adds support for horizontal swipe-to-dismiss gestures, adds
    fling support and updates the existing motion specs. It also adds unit
    tests for the mediator.
    
    Flings currently don't affect the speed of the resulting animations as
    it turned out to be complicated to implement.
    
    There are several cases that are handled in this CL:
    - No fling:
      - If the message is within the dismiss threshold, vertical or
        horizontal, the message is animated back to the idle position, i.e.
        center.
      - If it's outside the threshold, the message is dismissed by being
        animated to out of screen.
    - Fling:
      - If the message is flung toward the center from outside the dismiss
        threshold, it is animated to the idle position.
      - If it's flung from within the threshold to the outside, the message
        is dismissed with animation.
      - If it's flung toward out of screen from outside the dismiss
        threshold, the message is dismissed with animation.
    
    Bug: 1157213
    Change-Id: I82cfac7111e5ada8687be74a90162784a1e7c992
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2602706
    Commit-Queue: Sinan Sahin <sinansahin@google.com>
    Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
    Reviewed-by: default avatarTheresa  <twellington@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#843290}
    6d9a9e8e
BUILD.gn 5.54 KB