{"action":"created","comment":{"url":"https://api.github.com/repos/smile-io/ember-polaris/pulls/comments/238950190","pull_request_review_id":181613807,"id":238950190,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODk1MDE5MA==","diff_hunk":"@@ -0,0 +1,328 @@\n+import Component from '@ember/component';\n+import { inject as service } from '@ember/service';\n+import { computed, get } from '@ember/object';\n+import layout from '../../templates/components/polaris-resource-list/filter-control';\n+import { FilterType } from '@smile-io/ember-polaris/components/polaris-resource-list/filter-control/filter-value-selector';\n+\n+export default Component.extend({\n+  tagName: '',\n+\n+  layout,\n+\n+  context: service('polaris-resource-list/context'),\n+\n+  /**\n+   * @property searchValue\n+   * @type {String}\n+   * @default null\n+   * @public\n+   */\n+  searchValue: null,\n+\n+  /**\n+   * @property appliedFilters\n+   * @type {Object[]}\n+   * @default null\n+   * @public\n+   */\n+  appliedFilters: null,\n+\n+  /**\n+   * @property additionalAction\n+   * @type {Object}\n+   * @default null\n+   * @public\n+   */\n+  additionalAction: null,\n+\n+  /**\n+   * @property focused\n+   * @type {Boolean}\n+   * @default false\n+   * @public\n+   */\n+  focused: false,\n+\n+  /**\n+   * @property filters\n+   * @type {Object[]}\n+   * @default null\n+   * @public\n+   */\n+  filters: null,\n+\n+  /**\n+   * @property onSearchBlur\n+   * @type {Function}\n+   * @default noop\n+   * @public\n+   */\n+  onSearchBlur() {},\n+\n+  /**\n+   * @property onSearchChange\n+   * @type {Function}\n+   * @default noop\n+   * @public\n+   */\n+  onSearchChange() {},\n+\n+  /**\n+   * @property onFiltersChange\n+   * @type {Function}\n+   * @default noop\n+   * @public\n+   */\n+  onFiltersChange() {},\n+\n+  /**\n+   * Button details for `additionalAction`. This is here\n+   * instead of in the template because handlebars\n+   * always evaluates both branches of an `if`-statement\n+   * so will try creating an action from `additionalAction.onAction`\n+   * even if it doesn't exist, which leads to an error.\n+   *\n+   * @property additionalActionButton\n+   * @type {Object}\n+   * @private\n+   */\n+  additionalActionButton: computed(\n+    'additionalAction.{text,accessibilityLabel,url,external,destructive,icon,loading,onAction}',\n+    'context.selectMode',\n+    function() {\n+      let { additionalAction, context } = this.getProperties(\n+        'additionalAction',\n+        'context'\n+      );\n+      if (!additionalAction) {\n+        return null;\n+      }\n+\n+      let props = Object.assign({}, additionalAction, {\n+        disabled: context.get('selectMode'),\n+      });\n+\n+      // Rename onAction to onClick.\n+      props.onClick = props.onAction;\n+      delete props.onAction;\n+\n+      return {\n+        componentName: 'polaris-button',\n+        props,\n+      };\n+    }\n+  ).readOnly(),\n+\n+  /**\n+   * List of appliedFilters in a format\n+   * for rendering in the template\n+   *\n+   * @property appliedFiltersForRender\n+   * @type {Object[]}\n+   * @private\n+   */\n+  appliedFiltersForRender: computed('appliedFilters.[]', function() {\n+    let appliedFilters = this.get('appliedFilters') || [];\n+    return appliedFilters.map((appliedFilter) => {\n+      let appliedFilterForRender = JSON.parse(JSON.stringify(appliedFilter));","path":"addon/components/polaris-resource-list/filter-control.js","position":127,"original_position":127,"commit_id":"0f0e865b071d0cfc9d6f794588ba962232280ccb","original_commit_id":"0f0e865b071d0cfc9d6f794588ba962232280ccb","user":{"login":"andrewpye","id":5737342,"node_id":"MDQ6VXNlcjU3MzczNDI=","avatar_url":"https://avatars3.githubusercontent.com/u/5737342?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewpye","html_url":"https://github.com/andrewpye","followers_url":"https://api.github.com/users/andrewpye/followers","following_url":"https://api.github.com/users/andrewpye/following{/other_user}","gists_url":"https://api.github.com/users/andrewpye/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewpye/subscriptions","organizations_url":"https://api.github.com/users/andrewpye/orgs","repos_url":"https://api.github.com/users/andrewpye/repos","events_url":"https://api.github.com/users/andrewpye/events{/privacy}","received_events_url":"https://api.github.com/users/andrewpye/received_events","type":"User","site_admin":false},"body":"We can only hope 🙏 😛 ","created_at":"2018-12-05T07:06:21Z","updated_at":"2018-12-05T07:06:21Z","html_url":"https://github.com/smile-io/ember-polaris/pull/261#discussion_r238950190","pull_request_url":"https://api.github.com/repos/smile-io/ember-polaris/pulls/261","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/smile-io/ember-polaris/pulls/comments/238950190"},"html":{"href":"https://github.com/smile-io/ember-polaris/pull/261#discussion_r238950190"},"pull_request":{"href":"https://api.github.com/repos/smile-io/ember-polaris/pulls/261"}},"in_reply_to_id":238680807},"pull_request":{"url":"https://api.github.com/repos/smile-io/ember-polaris/pulls/261","id":235805947,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1ODA1OTQ3","html_url":"https://github.com/smile-io/ember-polaris/pull/261","diff_url":"https://github.com/smile-io/ember-polaris/pull/261.diff","patch_url":"https://github.com/smile-io/ember-polaris/pull/261.patch","issue_url":"https://api.github.com/repos/smile-io/ember-polaris/issues/261","number":261,"state":"open","locked":false,"title":"Add resource list filter control","user":{"login":"andrewpye","id":5737342,"node_id":"MDQ6VXNlcjU3MzczNDI=","avatar_url":"https://avatars3.githubusercontent.com/u/5737342?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewpye","html_url":"https://github.com/andrewpye","followers_url":"https://api.github.com/users/andrewpye/followers","following_url":"https://api.github.com/users/andrewpye/following{/other_user}","gists_url":"https://api.github.com/users/andrewpye/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewpye/subscriptions","organizations_url":"https://api.github.com/users/andrewpye/orgs","repos_url":"https://api.github.com/users/andrewpye/repos","events_url":"https://api.github.com/users/andrewpye/events{/privacy}","received_events_url":"https://api.github.com/users/andrewpye/received_events","type":"User","site_admin":false},"body":"Adds an implementation of the React [`ResourceList/FilterControl`](https://github.com/Shopify/polaris-react/tree/master/src/components/ResourceList/components/FilterControl) component.","created_at":"2018-12-04T13:20:36Z","updated_at":"2018-12-05T07:06:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2364551f73d161a1704522637feb52c2208dca1b","assignee":{"login":"andrewpye","id":5737342,"node_id":"MDQ6VXNlcjU3MzczNDI=","avatar_url":"https://avatars3.githubusercontent.com/u/5737342?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewpye","html_url":"https://github.com/andrewpye","followers_url":"https://api.github.com/users/andrewpye/followers","following_url":"https://api.github.com/users/andrewpye/following{/other_user}","gists_url":"https://api.github.com/users/andrewpye/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewpye/subscriptions","organizations_url":"https://api.github.com/users/andrewpye/orgs","repos_url":"https://api.github.com/users/andrewpye/repos","events_url":"https://api.github.com/users/andrewpye/events{/privacy}","received_events_url":"https://api.github.com/users/andrewpye/received_events","type":"User","site_admin":false},"assignees":[{"login":"andrewpye","id":5737342,"node_id":"MDQ6VXNlcjU3MzczNDI=","avatar_url":"https://avatars3.githubusercontent.com/u/5737342?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewpye","html_url":"https://github.com/andrewpye","followers_url":"https://api.github.com/users/andrewpye/followers","following_url":"https://api.github.com/users/andrewpye/following{/other_user}","gists_url":"https://api.github.com/users/andrewpye/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewpye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewpye/subscriptions","organizations_url":"https://api.github.com/users/andrewpye/orgs","repos_url":"https://api.github.com/users/andrewpye/repos","events_url":"https://api.github.com/users/andrewpye/events{/privacy}","received_events_url":"https://api.github.com/users/andrewpye/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/smile-io/ember-polaris/pulls/261/commits","review_comments_url":"https://api.github.com/repos/smile-io/ember-polaris/pulls/261/comments","review_comment_url":"https://api.github.com/repos/smile-io/ember-polaris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smile-io/ember-polaris/issues/261/comments","statuses_url":"https://api.github.com/repos/smile-io/ember-polaris/statuses/0f0e865b071d0cfc9d6f794588ba962232280ccb","head":{"label":"smile-io:add-resource-list-component--filter-control","ref":"add-resource-list-component--filter-control","sha":"0f0e865b071d0cfc9d6f794588ba962232280ccb","user":{"login":"smile-io","id":6344842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNDQ4NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6344842?v=4","gravatar_id":"","url":"https://api.github.com/users/smile-io","html_url":"https://github.com/smile-io","followers_url":"https://api.github.com/users/smile-io/followers","following_url":"https://api.github.com/users/smile-io/following{/other_user}","gists_url":"https://api.github.com/users/smile-io/gists{/gist_id}","starred_url":"https://api.github.com/users/smile-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smile-io/subscriptions","organizations_url":"https://api.github.com/users/smile-io/orgs","repos_url":"https://api.github.com/users/smile-io/repos","events_url":"https://api.github.com/users/smile-io/events{/privacy}","received_events_url":"https://api.github.com/users/smile-io/received_events","type":"Organization","site_admin":false},"repo":{"id":91059441,"node_id":"MDEwOlJlcG9zaXRvcnk5MTA1OTQ0MQ==","name":"ember-polaris","full_name":"smile-io/ember-polaris","private":false,"owner":{"login":"smile-io","id":6344842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNDQ4NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6344842?v=4","gravatar_id":"","url":"https://api.github.com/users/smile-io","html_url":"https://github.com/smile-io","followers_url":"https://api.github.com/users/smile-io/followers","following_url":"https://api.github.com/users/smile-io/following{/other_user}","gists_url":"https://api.github.com/users/smile-io/gists{/gist_id}","starred_url":"https://api.github.com/users/smile-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smile-io/subscriptions","organizations_url":"https://api.github.com/users/smile-io/orgs","repos_url":"https://api.github.com/users/smile-io/repos","events_url":"https://api.github.com/users/smile-io/events{/privacy}","received_events_url":"https://api.github.com/users/smile-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/smile-io/ember-polaris","description":"An Ember addon for Shopify's Polaris design system","fork":false,"url":"https://api.github.com/repos/smile-io/ember-polaris","forks_url":"https://api.github.com/repos/smile-io/ember-polaris/forks","keys_url":"https://api.github.com/repos/smile-io/ember-polaris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smile-io/ember-polaris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smile-io/ember-polaris/teams","hooks_url":"https://api.github.com/repos/smile-io/ember-polaris/hooks","issue_events_url":"https://api.github.com/repos/smile-io/ember-polaris/issues/events{/number}","events_url":"https://api.github.com/repos/smile-io/ember-polaris/events","assignees_url":"https://api.github.com/repos/smile-io/ember-polaris/assignees{/user}","branches_url":"https://api.github.com/repos/smile-io/ember-polaris/branches{/branch}","tags_url":"https://api.github.com/repos/smile-io/ember-polaris/tags","blobs_url":"https://api.github.com/repos/smile-io/ember-polaris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smile-io/ember-polaris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smile-io/ember-polaris/git/refs{/sha}","trees_url":"https://api.github.com/repos/smile-io/ember-polaris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smile-io/ember-polaris/statuses/{sha}","languages_url":"https://api.github.com/repos/smile-io/ember-polaris/languages","stargazers_url":"https://api.github.com/repos/smile-io/ember-polaris/stargazers","contributors_url":"https://api.github.com/repos/smile-io/ember-polaris/contributors","subscribers_url":"https://api.github.com/repos/smile-io/ember-polaris/subscribers","subscription_url":"https://api.github.com/repos/smile-io/ember-polaris/subscription","commits_url":"https://api.github.com/repos/smile-io/ember-polaris/commits{/sha}","git_commits_url":"https://api.github.com/repos/smile-io/ember-polaris/git/commits{/sha}","comments_url":"https://api.github.com/repos/smile-io/ember-polaris/comments{/number}","issue_comment_url":"https://api.github.com/repos/smile-io/ember-polaris/issues/comments{/number}","contents_url":"https://api.github.com/repos/smile-io/ember-polaris/contents/{+path}","compare_url":"https://api.github.com/repos/smile-io/ember-polaris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smile-io/ember-polaris/merges","archive_url":"https://api.github.com/repos/smile-io/ember-polaris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smile-io/ember-polaris/downloads","issues_url":"https://api.github.com/repos/smile-io/ember-polaris/issues{/number}","pulls_url":"https://api.github.com/repos/smile-io/ember-polaris/pulls{/number}","milestones_url":"https://api.github.com/repos/smile-io/ember-polaris/milestones{/number}","notifications_url":"https://api.github.com/repos/smile-io/ember-polaris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smile-io/ember-polaris/labels{/name}","releases_url":"https://api.github.com/repos/smile-io/ember-polaris/releases{/id}","deployments_url":"https://api.github.com/repos/smile-io/ember-polaris/deployments","created_at":"2017-05-12T06:36:10Z","updated_at":"2018-11-28T12:22:22Z","pushed_at":"2018-12-04T14:55:18Z","git_url":"git://github.com/smile-io/ember-polaris.git","ssh_url":"git@github.com:smile-io/ember-polaris.git","clone_url":"https://github.com/smile-io/ember-polaris.git","svn_url":"https://github.com/smile-io/ember-polaris","homepage":"https://polaris.shopify.com/","size":2144,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":14,"watchers":47,"default_branch":"master"}},"base":{"label":"smile-io:add-resource-list-component","ref":"add-resource-list-component","sha":"5f2b190d396317475c03e71d50667d35c78dd39e","user":{"login":"smile-io","id":6344842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNDQ4NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6344842?v=4","gravatar_id":"","url":"https://api.github.com/users/smile-io","html_url":"https://github.com/smile-io","followers_url":"https://api.github.com/users/smile-io/followers","following_url":"https://api.github.com/users/smile-io/following{/other_user}","gists_url":"https://api.github.com/users/smile-io/gists{/gist_id}","starred_url":"https://api.github.com/users/smile-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smile-io/subscriptions","organizations_url":"https://api.github.com/users/smile-io/orgs","repos_url":"https://api.github.com/users/smile-io/repos","events_url":"https://api.github.com/users/smile-io/events{/privacy}","received_events_url":"https://api.github.com/users/smile-io/received_events","type":"Organization","site_admin":false},"repo":{"id":91059441,"node_id":"MDEwOlJlcG9zaXRvcnk5MTA1OTQ0MQ==","name":"ember-polaris","full_name":"smile-io/ember-polaris","private":false,"owner":{"login":"smile-io","id":6344842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNDQ4NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/6344842?v=4","gravatar_id":"","url":"https://api.github.com/users/smile-io","html_url":"https://github.com/smile-io","followers_url":"https://api.github.com/users/smile-io/followers","following_url":"https://api.github.com/users/smile-io/following{/other_user}","gists_url":"https://api.github.com/users/smile-io/gists{/gist_id}","starred_url":"https://api.github.com/users/smile-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smile-io/subscriptions","organizations_url":"https://api.github.com/users/smile-io/orgs","repos_url":"https://api.github.com/users/smile-io/repos","events_url":"https://api.github.com/users/smile-io/events{/privacy}","received_events_url":"https://api.github.com/users/smile-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/smile-io/ember-polaris","description":"An Ember addon for Shopify's Polaris design system","fork":false,"url":"https://api.github.com/repos/smile-io/ember-polaris","forks_url":"https://api.github.com/repos/smile-io/ember-polaris/forks","keys_url":"https://api.github.com/repos/smile-io/ember-polaris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smile-io/ember-polaris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smile-io/ember-polaris/teams","hooks_url":"https://api.github.com/repos/smile-io/ember-polaris/hooks","issue_events_url":"https://api.github.com/repos/smile-io/ember-polaris/issues/events{/number}","events_url":"https://api.github.com/repos/smile-io/ember-polaris/events","assignees_url":"https://api.github.com/repos/smile-io/ember-polaris/assignees{/user}","branches_url":"https://api.github.com/repos/smile-io/ember-polaris/branches{/branch}","tags_url":"https://api.github.com/repos/smile-io/ember-polaris/tags","blobs_url":"https://api.github.com/repos/smile-io/ember-polaris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smile-io/ember-polaris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smile-io/ember-polaris/git/refs{/sha}","trees_url":"https://api.github.com/repos/smile-io/ember-polaris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smile-io/ember-polaris/statuses/{sha}","languages_url":"https://api.github.com/repos/smile-io/ember-polaris/languages","stargazers_url":"https://api.github.com/repos/smile-io/ember-polaris/stargazers","contributors_url":"https://api.github.com/repos/smile-io/ember-polaris/contributors","subscribers_url":"https://api.github.com/repos/smile-io/ember-polaris/subscribers","subscription_url":"https://api.github.com/repos/smile-io/ember-polaris/subscription","commits_url":"https://api.github.com/repos/smile-io/ember-polaris/commits{/sha}","git_commits_url":"https://api.github.com/repos/smile-io/ember-polaris/git/commits{/sha}","comments_url":"https://api.github.com/repos/smile-io/ember-polaris/comments{/number}","issue_comment_url":"https://api.github.com/repos/smile-io/ember-polaris/issues/comments{/number}","contents_url":"https://api.github.com/repos/smile-io/ember-polaris/contents/{+path}","compare_url":"https://api.github.com/repos/smile-io/ember-polaris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smile-io/ember-polaris/merges","archive_url":"https://api.github.com/repos/smile-io/ember-polaris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smile-io/ember-polaris/downloads","issues_url":"https://api.github.com/repos/smile-io/ember-polaris/issues{/number}","pulls_url":"https://api.github.com/repos/smile-io/ember-polaris/pulls{/number}","milestones_url":"https://api.github.com/repos/smile-io/ember-polaris/milestones{/number}","notifications_url":"https://api.github.com/repos/smile-io/ember-polaris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smile-io/ember-polaris/labels{/name}","releases_url":"https://api.github.com/repos/smile-io/ember-polaris/releases{/id}","deployments_url":"https://api.github.com/repos/smile-io/ember-polaris/deployments","created_at":"2017-05-12T06:36:10Z","updated_at":"2018-11-28T12:22:22Z","pushed_at":"2018-12-04T14:55:18Z","git_url":"git://github.com/smile-io/ember-polaris.git","ssh_url":"git@github.com:smile-io/ember-polaris.git","clone_url":"https://github.com/smile-io/ember-polaris.git","svn_url":"https://github.com/smile-io/ember-polaris","homepage":"https://polaris.shopify.com/","size":2144,"stargazers_count":47,"watchers_count":47,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":14,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/smile-io/ember-polaris/pulls/261"},"html":{"href":"https://github.com/smile-io/ember-polaris/pull/261"},"issue":{"href":"https://api.github.com/repos/smile-io/ember-polaris/issues/261"},"comments":{"href":"https://api.github.com/repos/smile-io/ember-polaris/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/smile-io/ember-polaris/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/smile-io/ember-polaris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smile-io/ember-polaris/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/smile-io/ember-polaris/statuses/0f0e865b071d0cfc9d6f794588ba962232280ccb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"andrewpye"}}