{"action":"created","comment":{"url":"https://api.github.com/repos/orbiting/republik-frontend/pulls/comments/213559748","pull_request_review_id":150417604,"id":213559748,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzU1OTc0OA==","diff_hunk":"@@ -0,0 +1,177 @@\n+// Based on github.com/sconstantinides/react-pullable\n+// License MIT\n+// Author Stelios Constantinides <sconstantinides@gmail.com>\n+\n+import React, { Fragment } from 'react'\n+import PropTypes from 'prop-types'\n+import { css } from 'glamor'\n+import { InlineSpinner, colors } from '@project-r/styleguide'\n+\n+import DownIcon from 'react-icons/lib/md/arrow-downward'\n+\n+const styles = {\n+  container: css({\n+    backgroundColor: colors.secondaryBg,\n+    display: 'flex',\n+    overflow: 'hidden',\n+    justifyContent: 'center',\n+    pointerEvents: 'none',\n+    alignItems: 'center'\n+  })\n+}\n+\n+const Container = props => (\n+  <div\n+    {...styles.container}\n+    {...(props.shouldReset ? css({\n+      transition: `height ${props.resetDuration}ms ${props.resetEase}`\n+    }) : undefined)}\n+    style={{\n+      height: props.height\n+    }}>\n+    {props.children}\n+  </div>\n+)\n+\n+class Pullable extends React.Component {\n+  constructor (props) {\n+    super(props)\n+\n+    this.state = {\n+      status: 'ready',\n+      height: 0\n+    }\n+\n+    this.clearTouchStatus = () => {\n+      this.pullStartY = null\n+      this.pullMoveY = null\n+      this.dist = 0\n+      this.distResisted = 0\n+      this.ignoreTouches = false\n+    }\n+    this.clearTouchStatus()\n+\n+    this.onTouchStart = (e) => {\n+      if (this.props.disabled || this.ignoreTouches) return\n+\n+      if (this.state.status === 'ready' && this.props.shouldPullToRefresh()) {\n+        this.pullStartY = e.touches[0].screenY\n+      } else {\n+        this.pullStartY = null\n+      }\n+    }\n+\n+    this.onTouchMove = (e) => {\n+      if (this.props.disabled || this.ignoreTouches || this.pullStartY === null) return\n+\n+      this.pullMoveY = e.touches[0].screenY\n+      this.dist = this.pullMoveY - this.pullStartY\n+\n+      if (this.dist > 0) {\n+        e.preventDefault()\n+\n+        this.distResisted = Math.min(this.dist / this.props.resistance, this.props.distThreshold)\n+\n+        this.setState({\n+          status: 'pulling',\n+          height: this.distResisted\n+        }, () => {\n+          if (this.distResisted === this.props.distThreshold) this.refresh()\n+        })\n+      }\n+    }\n+\n+    this.onTouchEnd = (e) => {\n+      if (this.props.disabled || this.ignoreTouches) return\n+\n+      if (this.state.status === 'pulling') {\n+        this.ignoreTouches = true\n+        this.setState({ status: 'pullAborted', height: 0 }, () => {\n+          this.reset(this.props.resetDuration)\n+        })\n+      } else {\n+        this.reset()\n+      }\n+    }\n+\n+    this.refresh = () => {\n+      this.ignoreTouches = true\n+      this.setState({ status: 'refreshing' }, () => {\n+        this.props.onRefresh()\n+\n+        this.refreshCompletedTimeout = setTimeout(() => {\n+          this.setState({ status: 'refreshCompleted', height: 0 }, () => {\n+            this.reset(this.props.resetDuration)\n+          })\n+        }, this.props.refreshDuration)\n+      })\n+    }\n+\n+    this.reset = (delay = 0) => {\n+      this.resetTimeout = setTimeout(() => {\n+        this.clearTouchStatus()\n+        this.setState({ status: 'ready' })\n+      }, delay)\n+    }\n+  }\n+\n+  componentDidMount () {\n+    window.addEventListener('touchstart', this.onTouchStart)\n+    window.addEventListener('touchmove', this.onTouchMove, { passive: false })\n+    window.addEventListener('touchend', this.onTouchEnd)\n+  }\n+\n+  componentWillUnmount () {\n+    window.removeEventListener('touchstart', this.onTouchStart)\n+    window.removeEventListener('touchmove', this.onTouchMove, { passive: false })\n+    window.removeEventListener('touchend', this.onTouchEnd)\n+\n+    clearTimeout(this.refreshCompletedTimeout)\n+    clearTimeout(this.resetTimeout)\n+  }\n+\n+  render () {\n+    const { status, height } = this.state\n+    const shouldSpin = status === 'refreshing' || status === 'refreshCompleted'\n+    const shouldReset = status === 'pullAborted' || status === 'refreshCompleted'\n+\n+    return (\n+      <Fragment>\n+        <Container\n+          height={height}\n+          resetDuration={this.props.resetDuration}\n+          resetEase={this.props.resetEase}\n+          shouldReset={shouldReset}\n+        >\n+          {shouldSpin\n+            ? <InlineSpinner size={32} />\n+            : <DownIcon size={32} />}\n+        </Container>\n+        {this.props.children}\n+      </Fragment>\n+    )\n+  }\n+}\n+\n+Pullable.defaultProps = {\n+  distThreshold: 72,","path":"components/Frame/Pullable.js","position":157,"original_position":157,"commit_id":"09f43efc3d168edb0b915d76b0cc71008151f540","original_commit_id":"09f43efc3d168edb0b915d76b0cc71008151f540","user":{"login":"patrickvenetz","id":331800,"node_id":"MDQ6VXNlcjMzMTgwMA==","avatar_url":"https://avatars0.githubusercontent.com/u/331800?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickvenetz","html_url":"https://github.com/patrickvenetz","followers_url":"https://api.github.com/users/patrickvenetz/followers","following_url":"https://api.github.com/users/patrickvenetz/following{/other_user}","gists_url":"https://api.github.com/users/patrickvenetz/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickvenetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickvenetz/subscriptions","organizations_url":"https://api.github.com/users/patrickvenetz/orgs","repos_url":"https://api.github.com/users/patrickvenetz/repos","events_url":"https://api.github.com/users/patrickvenetz/events{/privacy}","received_events_url":"https://api.github.com/users/patrickvenetz/received_events","type":"User","site_admin":false},"body":"Comment: Again wondering where these numbers come from, and if they could instead be derived from something? Is it like your best judgment or gut feeling?","created_at":"2018-08-29T06:36:12Z","updated_at":"2018-08-29T06:44:58Z","html_url":"https://github.com/orbiting/republik-frontend/pull/175#discussion_r213559748","pull_request_url":"https://api.github.com/repos/orbiting/republik-frontend/pulls/175","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/orbiting/republik-frontend/pulls/comments/213559748"},"html":{"href":"https://github.com/orbiting/republik-frontend/pull/175#discussion_r213559748"},"pull_request":{"href":"https://api.github.com/repos/orbiting/republik-frontend/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/orbiting/republik-frontend/pulls/175","id":211503627,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExNTAzNjI3","html_url":"https://github.com/orbiting/republik-frontend/pull/175","diff_url":"https://github.com/orbiting/republik-frontend/pull/175.diff","patch_url":"https://github.com/orbiting/republik-frontend/pull/175.patch","issue_url":"https://api.github.com/repos/orbiting/republik-frontend/issues/175","number":175,"state":"open","locked":false,"title":"App Round Two","user":{"login":"tpreusse","id":410211,"node_id":"MDQ6VXNlcjQxMDIxMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/410211?v=4","gravatar_id":"","url":"https://api.github.com/users/tpreusse","html_url":"https://github.com/tpreusse","followers_url":"https://api.github.com/users/tpreusse/followers","following_url":"https://api.github.com/users/tpreusse/following{/other_user}","gists_url":"https://api.github.com/users/tpreusse/gists{/gist_id}","starred_url":"https://api.github.com/users/tpreusse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tpreusse/subscriptions","organizations_url":"https://api.github.com/users/tpreusse/orgs","repos_url":"https://api.github.com/users/tpreusse/repos","events_url":"https://api.github.com/users/tpreusse/events{/privacy}","received_events_url":"https://api.github.com/users/tpreusse/received_events","type":"User","site_admin":false},"body":"Changes\r\n- pull to refresh in web view\r\n- web header on notification page\r\n  - similar look to main frame header when Republik header\r\n  - close icon in native app\r\n- fix piwik tracking in app","created_at":"2018-08-28T17:43:36Z","updated_at":"2018-08-29T06:44:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc9ee1dc03af718fe5a9898243bf7ef3e8d7fcd3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/orbiting/republik-frontend/pulls/175/commits","review_comments_url":"https://api.github.com/repos/orbiting/republik-frontend/pulls/175/comments","review_comment_url":"https://api.github.com/repos/orbiting/republik-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/orbiting/republik-frontend/issues/175/comments","statuses_url":"https://api.github.com/repos/orbiting/republik-frontend/statuses/09f43efc3d168edb0b915d76b0cc71008151f540","head":{"label":"orbiting:app-round-two","ref":"app-round-two","sha":"09f43efc3d168edb0b915d76b0cc71008151f540","user":{"login":"orbiting","id":26253823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjUzODIz","avatar_url":"https://avatars1.githubusercontent.com/u/26253823?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiting","html_url":"https://github.com/orbiting","followers_url":"https://api.github.com/users/orbiting/followers","following_url":"https://api.github.com/users/orbiting/following{/other_user}","gists_url":"https://api.github.com/users/orbiting/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiting/subscriptions","organizations_url":"https://api.github.com/users/orbiting/orgs","repos_url":"https://api.github.com/users/orbiting/repos","events_url":"https://api.github.com/users/orbiting/events{/privacy}","received_events_url":"https://api.github.com/users/orbiting/received_events","type":"Organization","site_admin":false},"repo":{"id":105517506,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU1MTc1MDY=","name":"republik-frontend","full_name":"orbiting/republik-frontend","owner":{"login":"orbiting","id":26253823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjUzODIz","avatar_url":"https://avatars1.githubusercontent.com/u/26253823?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiting","html_url":"https://github.com/orbiting","followers_url":"https://api.github.com/users/orbiting/followers","following_url":"https://api.github.com/users/orbiting/following{/other_user}","gists_url":"https://api.github.com/users/orbiting/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiting/subscriptions","organizations_url":"https://api.github.com/users/orbiting/orgs","repos_url":"https://api.github.com/users/orbiting/repos","events_url":"https://api.github.com/users/orbiting/events{/privacy}","received_events_url":"https://api.github.com/users/orbiting/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orbiting/republik-frontend","description":"The front end of the online magazine Republik.","fork":false,"url":"https://api.github.com/repos/orbiting/republik-frontend","forks_url":"https://api.github.com/repos/orbiting/republik-frontend/forks","keys_url":"https://api.github.com/repos/orbiting/republik-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orbiting/republik-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orbiting/republik-frontend/teams","hooks_url":"https://api.github.com/repos/orbiting/republik-frontend/hooks","issue_events_url":"https://api.github.com/repos/orbiting/republik-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/orbiting/republik-frontend/events","assignees_url":"https://api.github.com/repos/orbiting/republik-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/orbiting/republik-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/orbiting/republik-frontend/tags","blobs_url":"https://api.github.com/repos/orbiting/republik-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orbiting/republik-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orbiting/republik-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/orbiting/republik-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orbiting/republik-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/orbiting/republik-frontend/languages","stargazers_url":"https://api.github.com/repos/orbiting/republik-frontend/stargazers","contributors_url":"https://api.github.com/repos/orbiting/republik-frontend/contributors","subscribers_url":"https://api.github.com/repos/orbiting/republik-frontend/subscribers","subscription_url":"https://api.github.com/repos/orbiting/republik-frontend/subscription","commits_url":"https://api.github.com/repos/orbiting/republik-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/orbiting/republik-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/orbiting/republik-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/orbiting/republik-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/orbiting/republik-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/orbiting/republik-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orbiting/republik-frontend/merges","archive_url":"https://api.github.com/repos/orbiting/republik-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orbiting/republik-frontend/downloads","issues_url":"https://api.github.com/repos/orbiting/republik-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/orbiting/republik-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/orbiting/republik-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/orbiting/republik-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orbiting/republik-frontend/labels{/name}","releases_url":"https://api.github.com/repos/orbiting/republik-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/orbiting/republik-frontend/deployments","created_at":"2017-10-02T09:23:09Z","updated_at":"2018-08-28T11:10:23Z","pushed_at":"2018-08-28T23:56:06Z","git_url":"git://github.com/orbiting/republik-frontend.git","ssh_url":"git@github.com:orbiting/republik-frontend.git","clone_url":"https://github.com/orbiting/republik-frontend.git","svn_url":"https://github.com/orbiting/republik-frontend","homepage":"https://www.republik.ch/","size":74037,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":3,"open_issues":13,"watchers":19,"default_branch":"master"}},"base":{"label":"orbiting:master","ref":"master","sha":"deaa61f5d7b595839f014afcefe790648227fdf6","user":{"login":"orbiting","id":26253823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjUzODIz","avatar_url":"https://avatars1.githubusercontent.com/u/26253823?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiting","html_url":"https://github.com/orbiting","followers_url":"https://api.github.com/users/orbiting/followers","following_url":"https://api.github.com/users/orbiting/following{/other_user}","gists_url":"https://api.github.com/users/orbiting/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiting/subscriptions","organizations_url":"https://api.github.com/users/orbiting/orgs","repos_url":"https://api.github.com/users/orbiting/repos","events_url":"https://api.github.com/users/orbiting/events{/privacy}","received_events_url":"https://api.github.com/users/orbiting/received_events","type":"Organization","site_admin":false},"repo":{"id":105517506,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU1MTc1MDY=","name":"republik-frontend","full_name":"orbiting/republik-frontend","owner":{"login":"orbiting","id":26253823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MjUzODIz","avatar_url":"https://avatars1.githubusercontent.com/u/26253823?v=4","gravatar_id":"","url":"https://api.github.com/users/orbiting","html_url":"https://github.com/orbiting","followers_url":"https://api.github.com/users/orbiting/followers","following_url":"https://api.github.com/users/orbiting/following{/other_user}","gists_url":"https://api.github.com/users/orbiting/gists{/gist_id}","starred_url":"https://api.github.com/users/orbiting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbiting/subscriptions","organizations_url":"https://api.github.com/users/orbiting/orgs","repos_url":"https://api.github.com/users/orbiting/repos","events_url":"https://api.github.com/users/orbiting/events{/privacy}","received_events_url":"https://api.github.com/users/orbiting/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/orbiting/republik-frontend","description":"The front end of the online magazine Republik.","fork":false,"url":"https://api.github.com/repos/orbiting/republik-frontend","forks_url":"https://api.github.com/repos/orbiting/republik-frontend/forks","keys_url":"https://api.github.com/repos/orbiting/republik-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/orbiting/republik-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/orbiting/republik-frontend/teams","hooks_url":"https://api.github.com/repos/orbiting/republik-frontend/hooks","issue_events_url":"https://api.github.com/repos/orbiting/republik-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/orbiting/republik-frontend/events","assignees_url":"https://api.github.com/repos/orbiting/republik-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/orbiting/republik-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/orbiting/republik-frontend/tags","blobs_url":"https://api.github.com/repos/orbiting/republik-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/orbiting/republik-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/orbiting/republik-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/orbiting/republik-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/orbiting/republik-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/orbiting/republik-frontend/languages","stargazers_url":"https://api.github.com/repos/orbiting/republik-frontend/stargazers","contributors_url":"https://api.github.com/repos/orbiting/republik-frontend/contributors","subscribers_url":"https://api.github.com/repos/orbiting/republik-frontend/subscribers","subscription_url":"https://api.github.com/repos/orbiting/republik-frontend/subscription","commits_url":"https://api.github.com/repos/orbiting/republik-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/orbiting/republik-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/orbiting/republik-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/orbiting/republik-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/orbiting/republik-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/orbiting/republik-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/orbiting/republik-frontend/merges","archive_url":"https://api.github.com/repos/orbiting/republik-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/orbiting/republik-frontend/downloads","issues_url":"https://api.github.com/repos/orbiting/republik-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/orbiting/republik-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/orbiting/republik-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/orbiting/republik-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/orbiting/republik-frontend/labels{/name}","releases_url":"https://api.github.com/repos/orbiting/republik-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/orbiting/republik-frontend/deployments","created_at":"2017-10-02T09:23:09Z","updated_at":"2018-08-28T11:10:23Z","pushed_at":"2018-08-28T23:56:06Z","git_url":"git://github.com/orbiting/republik-frontend.git","ssh_url":"git@github.com:orbiting/republik-frontend.git","clone_url":"https://github.com/orbiting/republik-frontend.git","svn_url":"https://github.com/orbiting/republik-frontend","homepage":"https://www.republik.ch/","size":74037,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":3,"open_issues":13,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/orbiting/republik-frontend/pulls/175"},"html":{"href":"https://github.com/orbiting/republik-frontend/pull/175"},"issue":{"href":"https://api.github.com/repos/orbiting/republik-frontend/issues/175"},"comments":{"href":"https://api.github.com/repos/orbiting/republik-frontend/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/orbiting/republik-frontend/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/orbiting/republik-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/orbiting/republik-frontend/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/orbiting/republik-frontend/statuses/09f43efc3d168edb0b915d76b0cc71008151f540"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"patrickvenetz"}}