{"action":"created","comment":{"url":"https://api.github.com/repos/Skyscanner/backpack/pulls/comments/206196840","pull_request_review_id":141585333,"id":206196840,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjE5Njg0MA==","diff_hunk":"@@ -0,0 +1,87 @@\n+/*\n+ * Backpack - Skyscanner's Design System\n+ *\n+ * Copyright 2018 Skyscanner Ltd\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+/* @flow */\n+\n+class DataSource {\n+  listeners: Array<() => void>;\n+\n+  onDataChange: (callback: (updatedElements: Array<any>) => void) => boolean;\n+\n+  offDataChange: (callback: (updatedElements: Array<any>) => void) => boolean;\n+\n+  triggerListeners: (...args: Array<any>) => void;\n+\n+  constructor() {\n+    this.listeners = [];\n+  }\n+\n+  /* eslint-disable-next-line no-unused-vars, class-methods-use-this */\n+  fetchItems(index: number, nElements: number): Promise<Array<any>> {\n+    throw new Error('Not implemented');\n+  }\n+\n+  onDataChange(callback: () => void): boolean {\n+    if (this.listeners.indexOf(callback) === -1) {\n+      this.listeners.push(callback);\n+      return true;\n+    }\n+    return false;\n+  }\n+\n+  offDataChange(callback: () => void): boolean {","path":"packages/bpk-component-infinite-scroll/src/DataSource.js","position":47,"original_position":47,"commit_id":"804232a228e5cf48feb6f5ad6969d1ed5a6c9f23","original_commit_id":"804232a228e5cf48feb6f5ad6969d1ed5a6c9f23","user":{"login":"k0nserv","id":1333960,"node_id":"MDQ6VXNlcjEzMzM5NjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1333960?v=4","gravatar_id":"","url":"https://api.github.com/users/k0nserv","html_url":"https://github.com/k0nserv","followers_url":"https://api.github.com/users/k0nserv/followers","following_url":"https://api.github.com/users/k0nserv/following{/other_user}","gists_url":"https://api.github.com/users/k0nserv/gists{/gist_id}","starred_url":"https://api.github.com/users/k0nserv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k0nserv/subscriptions","organizations_url":"https://api.github.com/users/k0nserv/orgs","repos_url":"https://api.github.com/users/k0nserv/repos","events_url":"https://api.github.com/users/k0nserv/events{/privacy}","received_events_url":"https://api.github.com/users/k0nserv/received_events","type":"User","site_admin":false},"body":"`onDataChange` and `removeDataChangeListener` maybe?","created_at":"2018-07-30T15:23:35Z","updated_at":"2018-07-30T15:23:35Z","html_url":"https://github.com/Skyscanner/backpack/pull/964#discussion_r206196840","pull_request_url":"https://api.github.com/repos/Skyscanner/backpack/pulls/964","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Skyscanner/backpack/pulls/comments/206196840"},"html":{"href":"https://github.com/Skyscanner/backpack/pull/964#discussion_r206196840"},"pull_request":{"href":"https://api.github.com/repos/Skyscanner/backpack/pulls/964"}},"in_reply_to_id":206132020},"pull_request":{"url":"https://api.github.com/repos/Skyscanner/backpack/pulls/964","id":204088527,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MDg4NTI3","html_url":"https://github.com/Skyscanner/backpack/pull/964","diff_url":"https://github.com/Skyscanner/backpack/pull/964.diff","patch_url":"https://github.com/Skyscanner/backpack/pull/964.patch","issue_url":"https://api.github.com/repos/Skyscanner/backpack/issues/964","number":964,"state":"open","locked":false,"title":"New Infinite Scroll DataSource","user":{"login":"ShakMR","id":3437307,"node_id":"MDQ6VXNlcjM0MzczMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/3437307?v=4","gravatar_id":"","url":"https://api.github.com/users/ShakMR","html_url":"https://github.com/ShakMR","followers_url":"https://api.github.com/users/ShakMR/followers","following_url":"https://api.github.com/users/ShakMR/following{/other_user}","gists_url":"https://api.github.com/users/ShakMR/gists{/gist_id}","starred_url":"https://api.github.com/users/ShakMR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShakMR/subscriptions","organizations_url":"https://api.github.com/users/ShakMR/orgs","repos_url":"https://api.github.com/users/ShakMR/repos","events_url":"https://api.github.com/users/ShakMR/events{/privacy}","received_events_url":"https://api.github.com/users/ShakMR/received_events","type":"User","site_admin":false},"body":"This adds a DataSource class for infinite scroll, so we can trigger updates on the infinite list when data changes.","created_at":"2018-07-26T09:56:13Z","updated_at":"2018-07-30T15:23:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34c2d1295cc9b57c3389c1382e02d78c318d1c92","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Skyscanner/backpack/pulls/964/commits","review_comments_url":"https://api.github.com/repos/Skyscanner/backpack/pulls/964/comments","review_comment_url":"https://api.github.com/repos/Skyscanner/backpack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Skyscanner/backpack/issues/964/comments","statuses_url":"https://api.github.com/repos/Skyscanner/backpack/statuses/804232a228e5cf48feb6f5ad6969d1ed5a6c9f23","head":{"label":"ShakMR:InfiniteScrollDataSource","ref":"InfiniteScrollDataSource","sha":"804232a228e5cf48feb6f5ad6969d1ed5a6c9f23","user":{"login":"ShakMR","id":3437307,"node_id":"MDQ6VXNlcjM0MzczMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/3437307?v=4","gravatar_id":"","url":"https://api.github.com/users/ShakMR","html_url":"https://github.com/ShakMR","followers_url":"https://api.github.com/users/ShakMR/followers","following_url":"https://api.github.com/users/ShakMR/following{/other_user}","gists_url":"https://api.github.com/users/ShakMR/gists{/gist_id}","starred_url":"https://api.github.com/users/ShakMR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShakMR/subscriptions","organizations_url":"https://api.github.com/users/ShakMR/orgs","repos_url":"https://api.github.com/users/ShakMR/repos","events_url":"https://api.github.com/users/ShakMR/events{/privacy}","received_events_url":"https://api.github.com/users/ShakMR/received_events","type":"User","site_admin":false},"repo":{"id":133487201,"node_id":"MDEwOlJlcG9zaXRvcnkxMzM0ODcyMDE=","name":"backpack","full_name":"ShakMR/backpack","owner":{"login":"ShakMR","id":3437307,"node_id":"MDQ6VXNlcjM0MzczMDc=","avatar_url":"https://avatars1.githubusercontent.com/u/3437307?v=4","gravatar_id":"","url":"https://api.github.com/users/ShakMR","html_url":"https://github.com/ShakMR","followers_url":"https://api.github.com/users/ShakMR/followers","following_url":"https://api.github.com/users/ShakMR/following{/other_user}","gists_url":"https://api.github.com/users/ShakMR/gists{/gist_id}","starred_url":"https://api.github.com/users/ShakMR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShakMR/subscriptions","organizations_url":"https://api.github.com/users/ShakMR/orgs","repos_url":"https://api.github.com/users/ShakMR/repos","events_url":"https://api.github.com/users/ShakMR/events{/privacy}","received_events_url":"https://api.github.com/users/ShakMR/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ShakMR/backpack","description":"Backpack Design System","fork":true,"url":"https://api.github.com/repos/ShakMR/backpack","forks_url":"https://api.github.com/repos/ShakMR/backpack/forks","keys_url":"https://api.github.com/repos/ShakMR/backpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ShakMR/backpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ShakMR/backpack/teams","hooks_url":"https://api.github.com/repos/ShakMR/backpack/hooks","issue_events_url":"https://api.github.com/repos/ShakMR/backpack/issues/events{/number}","events_url":"https://api.github.com/repos/ShakMR/backpack/events","assignees_url":"https://api.github.com/repos/ShakMR/backpack/assignees{/user}","branches_url":"https://api.github.com/repos/ShakMR/backpack/branches{/branch}","tags_url":"https://api.github.com/repos/ShakMR/backpack/tags","blobs_url":"https://api.github.com/repos/ShakMR/backpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ShakMR/backpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ShakMR/backpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/ShakMR/backpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ShakMR/backpack/statuses/{sha}","languages_url":"https://api.github.com/repos/ShakMR/backpack/languages","stargazers_url":"https://api.github.com/repos/ShakMR/backpack/stargazers","contributors_url":"https://api.github.com/repos/ShakMR/backpack/contributors","subscribers_url":"https://api.github.com/repos/ShakMR/backpack/subscribers","subscription_url":"https://api.github.com/repos/ShakMR/backpack/subscription","commits_url":"https://api.github.com/repos/ShakMR/backpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/ShakMR/backpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/ShakMR/backpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/ShakMR/backpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/ShakMR/backpack/contents/{+path}","compare_url":"https://api.github.com/repos/ShakMR/backpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ShakMR/backpack/merges","archive_url":"https://api.github.com/repos/ShakMR/backpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ShakMR/backpack/downloads","issues_url":"https://api.github.com/repos/ShakMR/backpack/issues{/number}","pulls_url":"https://api.github.com/repos/ShakMR/backpack/pulls{/number}","milestones_url":"https://api.github.com/repos/ShakMR/backpack/milestones{/number}","notifications_url":"https://api.github.com/repos/ShakMR/backpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ShakMR/backpack/labels{/name}","releases_url":"https://api.github.com/repos/ShakMR/backpack/releases{/id}","deployments_url":"https://api.github.com/repos/ShakMR/backpack/deployments","created_at":"2018-05-15T08:45:20Z","updated_at":"2018-05-15T08:45:29Z","pushed_at":"2018-07-27T15:26:30Z","git_url":"git://github.com/ShakMR/backpack.git","ssh_url":"git@github.com:ShakMR/backpack.git","clone_url":"https://github.com/ShakMR/backpack.git","svn_url":"https://github.com/ShakMR/backpack","homepage":"https://backpack.github.io","size":78481,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Skyscanner:master","ref":"master","sha":"71fe25a32329875b15e4f2b49c28fbd15bfa82bc","user":{"login":"Skyscanner","id":522811,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyMjgxMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/522811?v=4","gravatar_id":"","url":"https://api.github.com/users/Skyscanner","html_url":"https://github.com/Skyscanner","followers_url":"https://api.github.com/users/Skyscanner/followers","following_url":"https://api.github.com/users/Skyscanner/following{/other_user}","gists_url":"https://api.github.com/users/Skyscanner/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyscanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyscanner/subscriptions","organizations_url":"https://api.github.com/users/Skyscanner/orgs","repos_url":"https://api.github.com/users/Skyscanner/repos","events_url":"https://api.github.com/users/Skyscanner/events{/privacy}","received_events_url":"https://api.github.com/users/Skyscanner/received_events","type":"Organization","site_admin":false},"repo":{"id":85820377,"node_id":"MDEwOlJlcG9zaXRvcnk4NTgyMDM3Nw==","name":"backpack","full_name":"Skyscanner/backpack","owner":{"login":"Skyscanner","id":522811,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyMjgxMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/522811?v=4","gravatar_id":"","url":"https://api.github.com/users/Skyscanner","html_url":"https://github.com/Skyscanner","followers_url":"https://api.github.com/users/Skyscanner/followers","following_url":"https://api.github.com/users/Skyscanner/following{/other_user}","gists_url":"https://api.github.com/users/Skyscanner/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyscanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyscanner/subscriptions","organizations_url":"https://api.github.com/users/Skyscanner/orgs","repos_url":"https://api.github.com/users/Skyscanner/repos","events_url":"https://api.github.com/users/Skyscanner/events{/privacy}","received_events_url":"https://api.github.com/users/Skyscanner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Skyscanner/backpack","description":"Backpack Design System","fork":false,"url":"https://api.github.com/repos/Skyscanner/backpack","forks_url":"https://api.github.com/repos/Skyscanner/backpack/forks","keys_url":"https://api.github.com/repos/Skyscanner/backpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skyscanner/backpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skyscanner/backpack/teams","hooks_url":"https://api.github.com/repos/Skyscanner/backpack/hooks","issue_events_url":"https://api.github.com/repos/Skyscanner/backpack/issues/events{/number}","events_url":"https://api.github.com/repos/Skyscanner/backpack/events","assignees_url":"https://api.github.com/repos/Skyscanner/backpack/assignees{/user}","branches_url":"https://api.github.com/repos/Skyscanner/backpack/branches{/branch}","tags_url":"https://api.github.com/repos/Skyscanner/backpack/tags","blobs_url":"https://api.github.com/repos/Skyscanner/backpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skyscanner/backpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skyscanner/backpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skyscanner/backpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skyscanner/backpack/statuses/{sha}","languages_url":"https://api.github.com/repos/Skyscanner/backpack/languages","stargazers_url":"https://api.github.com/repos/Skyscanner/backpack/stargazers","contributors_url":"https://api.github.com/repos/Skyscanner/backpack/contributors","subscribers_url":"https://api.github.com/repos/Skyscanner/backpack/subscribers","subscription_url":"https://api.github.com/repos/Skyscanner/backpack/subscription","commits_url":"https://api.github.com/repos/Skyscanner/backpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skyscanner/backpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skyscanner/backpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skyscanner/backpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skyscanner/backpack/contents/{+path}","compare_url":"https://api.github.com/repos/Skyscanner/backpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skyscanner/backpack/merges","archive_url":"https://api.github.com/repos/Skyscanner/backpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skyscanner/backpack/downloads","issues_url":"https://api.github.com/repos/Skyscanner/backpack/issues{/number}","pulls_url":"https://api.github.com/repos/Skyscanner/backpack/pulls{/number}","milestones_url":"https://api.github.com/repos/Skyscanner/backpack/milestones{/number}","notifications_url":"https://api.github.com/repos/Skyscanner/backpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skyscanner/backpack/labels{/name}","releases_url":"https://api.github.com/repos/Skyscanner/backpack/releases{/id}","deployments_url":"https://api.github.com/repos/Skyscanner/backpack/deployments","created_at":"2017-03-22T11:34:41Z","updated_at":"2018-07-30T15:22:39Z","pushed_at":"2018-07-30T15:22:36Z","git_url":"git://github.com/Skyscanner/backpack.git","ssh_url":"git@github.com:Skyscanner/backpack.git","clone_url":"https://github.com/Skyscanner/backpack.git","svn_url":"https://github.com/Skyscanner/backpack","homepage":"https://backpack.github.io","size":78587,"stargazers_count":183,"watchers_count":183,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":62,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":62,"open_issues":10,"watchers":183,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Skyscanner/backpack/pulls/964"},"html":{"href":"https://github.com/Skyscanner/backpack/pull/964"},"issue":{"href":"https://api.github.com/repos/Skyscanner/backpack/issues/964"},"comments":{"href":"https://api.github.com/repos/Skyscanner/backpack/issues/964/comments"},"review_comments":{"href":"https://api.github.com/repos/Skyscanner/backpack/pulls/964/comments"},"review_comment":{"href":"https://api.github.com/repos/Skyscanner/backpack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Skyscanner/backpack/pulls/964/commits"},"statuses":{"href":"https://api.github.com/repos/Skyscanner/backpack/statuses/804232a228e5cf48feb6f5ad6969d1ed5a6c9f23"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"k0nserv"}}