{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/4181","labels_url":"https://api.github.com/repos/atom/electron/issues/4181/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/4181/comments","events_url":"https://api.github.com/repos/atom/electron/issues/4181/events","html_url":"https://github.com/atom/electron/pull/4181","id":127979769,"number":4181,"title":"Extend NativeWindow to track touch-based scroll events on OS X","user":{"login":"bengotow","id":1037212,"avatar_url":"https://avatars.githubusercontent.com/u/1037212?v=3","gravatar_id":"","url":"https://api.github.com/users/bengotow","html_url":"https://github.com/bengotow","followers_url":"https://api.github.com/users/bengotow/followers","following_url":"https://api.github.com/users/bengotow/following{/other_user}","gists_url":"https://api.github.com/users/bengotow/gists{/gist_id}","starred_url":"https://api.github.com/users/bengotow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengotow/subscriptions","organizations_url":"https://api.github.com/users/bengotow/orgs","repos_url":"https://api.github.com/users/bengotow/repos","events_url":"https://api.github.com/users/bengotow/events{/privacy}","received_events_url":"https://api.github.com/users/bengotow/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-01-21T17:41:06Z","updated_at":"2016-01-29T19:54:04Z","closed_at":"2016-01-25T06:47:54Z","pull_request":{"url":"https://api.github.com/repos/atom/electron/pulls/4181","html_url":"https://github.com/atom/electron/pull/4181","diff_url":"https://github.com/atom/electron/pull/4181.diff","patch_url":"https://github.com/atom/electron/pull/4181.patch"},"body":"In N1, we want to implement the famous \"swipe to archive\" action on threads in the user's inbox. Chrome exposes `scroll` and `wheel` events, but these aren't sufficient to implement the interaction because the element needs to \"snap\" when the user lifts their fingers from the trackpad, not when they / we stop receiving `wheel` / `scroll` events. These events may stop before the user lifts their fingers, or continue after the user has lifted their fingers if they had enough momentum for the gesture to continue.\r\n\r\nThis exposes BrowserWindow `scroll-touch-down` and `scroll-touch-up`, which fire immediately when the user touches two fingers to the trackpad, and again when the user lifts their fingers. Combined with the existing wheel event should allow for \"swipe-to-archive\" and other similar interactions.\r\n\r\nNote: This is only implemented on Mac OS X and the events don't fire unless you're using a trackpad!\r\n\r\nRelated: #1486, #2683, https://github.com/nylas/N1/issues/541"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/176939611","html_url":"https://github.com/atom/electron/pull/4181#issuecomment-176939611","issue_url":"https://api.github.com/repos/atom/electron/issues/4181","id":176939611,"user":{"login":"bengotow","id":1037212,"avatar_url":"https://avatars.githubusercontent.com/u/1037212?v=3","gravatar_id":"","url":"https://api.github.com/users/bengotow","html_url":"https://github.com/bengotow","followers_url":"https://api.github.com/users/bengotow/followers","following_url":"https://api.github.com/users/bengotow/following{/other_user}","gists_url":"https://api.github.com/users/bengotow/gists{/gist_id}","starred_url":"https://api.github.com/users/bengotow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengotow/subscriptions","organizations_url":"https://api.github.com/users/bengotow/orgs","repos_url":"https://api.github.com/users/bengotow/repos","events_url":"https://api.github.com/users/bengotow/events{/privacy}","received_events_url":"https://api.github.com/users/bengotow/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T19:54:04Z","updated_at":"2016-01-29T19:54:04Z","body":"Hey @OlsonDev — these new events are BrowserWindow events, not DOM events, so they follow the conventions of that class. Hopefully we can push them down into the DOM at some point in the future if it's useful."}}