{"action":"created","comment":{"url":"https://api.github.com/repos/vega/voyager/pulls/comments/126468492","pull_request_review_id":48954496,"id":126468492,"diff_hunk":"@@ -0,0 +1,125 @@\n+import {FieldQuery} from 'compassql/build/src/query/encoding';\n+import {Schema} from 'compassql/build/src/schema';\n+import * as React from 'react';\n+import * as CSSModules from 'react-css-modules';\n+import {ConnectDropTarget, DropTarget, DropTargetCollector, DropTargetSpec} from 'react-dnd';\n+import {isOneOfFilter, isRangeFilter, OneOfFilter, RangeFilter} from 'vega-lite/build/src/filter';\n+import {FILTER_ADD, FILTER_REMOVE, FilterAction} from '../../actions/filter';\n+import {DraggableType} from '../../constants';\n+import {ShelfFieldDef} from '../../models/shelf/encoding';\n+import {DraggedFieldIdentifier} from '../field';\n+import * as styles from './filter-shelf.scss';\n+import {OneOfFilterShelf} from './one-of-filter-shelf';\n+import {RangeFilterShelf} from './range-filter-shelf';\n+\n+/**\n+ * Props for react-dnd of FilterShelf\n+ */\n+export interface FilterShelfDropTargetProps {\n+  connectDropTarget: ConnectDropTarget;\n+\n+  isOver: boolean;\n+\n+  item: Object;\n+}\n+\n+export interface FilterShelfPropsBase {\n+  filters: Array<RangeFilter | OneOfFilter>;\n+  fieldDefs: ShelfFieldDef[];\n+  schema: Schema;\n+  handleAction?: (action: FilterAction) => void;\n+}\n+\n+interface FilterShelfProps extends FilterShelfDropTargetProps, FilterShelfPropsBase {};\n+\n+class FilterShelfBase extends React.Component<FilterShelfProps, {}> {\n+\n+  public render() {\n+    const {filters, connectDropTarget} = this.props;\n+    let index = -1;\n+    const filterShelves = filters.map(filter => {\n+      index++;\n+      return this.renderFilterPane(filter, index);\n+    });\n+    return connectDropTarget(\n+      <div>\n+        {filterShelves}\n+        {this.fieldPlaceholder()}\n+      </div>\n+    );\n+  }\n+\n+  protected filterRemove(index: number) {\n+    const {handleAction} = this.props;\n+    handleAction({\n+      type: FILTER_REMOVE,\n+      payload: {\n+        index: index","path":"src/components/encoding-pane/filter-shelf.tsx","position":57,"original_position":57,"commit_id":"c75b3a73daa34e08d87e0c77b447557106dabf2c","original_commit_id":"c75b3a73daa34e08d87e0c77b447557106dabf2c","user":{"login":"kanitw","id":111269,"avatar_url":"https://avatars2.githubusercontent.com/u/111269?v=3","gravatar_id":"","url":"https://api.github.com/users/kanitw","html_url":"https://github.com/kanitw","followers_url":"https://api.github.com/users/kanitw/followers","following_url":"https://api.github.com/users/kanitw/following{/other_user}","gists_url":"https://api.github.com/users/kanitw/gists{/gist_id}","starred_url":"https://api.github.com/users/kanitw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanitw/subscriptions","organizations_url":"https://api.github.com/users/kanitw/orgs","repos_url":"https://api.github.com/users/kanitw/repos","events_url":"https://api.github.com/users/kanitw/events{/privacy}","received_events_url":"https://api.github.com/users/kanitw/received_events","type":"User","site_admin":false},"body":"`{index}`","created_at":"2017-07-10T16:13:51Z","updated_at":"2017-07-10T16:23:46Z","html_url":"https://github.com/vega/voyager/pull/419#discussion_r126468492","pull_request_url":"https://api.github.com/repos/vega/voyager/pulls/419","_links":{"self":{"href":"https://api.github.com/repos/vega/voyager/pulls/comments/126468492"},"html":{"href":"https://github.com/vega/voyager/pull/419#discussion_r126468492"},"pull_request":{"href":"https://api.github.com/repos/vega/voyager/pulls/419"}}},"pull_request":{"url":"https://api.github.com/repos/vega/voyager/pulls/419","id":129424167,"html_url":"https://github.com/vega/voyager/pull/419","diff_url":"https://github.com/vega/voyager/pull/419.diff","patch_url":"https://github.com/vega/voyager/pull/419.patch","issue_url":"https://api.github.com/repos/vega/voyager/issues/419","number":419,"state":"open","locked":false,"title":"filter for nominal","user":{"login":"starry97","id":19985016,"avatar_url":"https://avatars2.githubusercontent.com/u/19985016?v=3","gravatar_id":"","url":"https://api.github.com/users/starry97","html_url":"https://github.com/starry97","followers_url":"https://api.github.com/users/starry97/followers","following_url":"https://api.github.com/users/starry97/following{/other_user}","gists_url":"https://api.github.com/users/starry97/gists{/gist_id}","starred_url":"https://api.github.com/users/starry97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starry97/subscriptions","organizations_url":"https://api.github.com/users/starry97/orgs","repos_url":"https://api.github.com/users/starry97/repos","events_url":"https://api.github.com/users/starry97/events{/privacy}","received_events_url":"https://api.github.com/users/starry97/received_events","type":"User","site_admin":false},"body":"1. support drag and drop\r\n2. added oneOfFilter UI\r\n\r\npart of #373","created_at":"2017-07-07T15:01:19Z","updated_at":"2017-07-10T16:23:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afeec248ed13a078abbf29cc5fb511a1af26c73c","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/vega/voyager/pulls/419/commits","review_comments_url":"https://api.github.com/repos/vega/voyager/pulls/419/comments","review_comment_url":"https://api.github.com/repos/vega/voyager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vega/voyager/issues/419/comments","statuses_url":"https://api.github.com/repos/vega/voyager/statuses/c75b3a73daa34e08d87e0c77b447557106dabf2c","head":{"label":"vega:cyn/filter-ui","ref":"cyn/filter-ui","sha":"c75b3a73daa34e08d87e0c77b447557106dabf2c","user":{"login":"vega","id":11796929,"avatar_url":"https://avatars0.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"repo":{"id":29434046,"name":"voyager","full_name":"vega/voyager","owner":{"login":"vega","id":11796929,"avatar_url":"https://avatars0.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vega/voyager","description":"Recommendation-Powered Visualization Tool for Data Exploration","fork":false,"url":"https://api.github.com/repos/vega/voyager","forks_url":"https://api.github.com/repos/vega/voyager/forks","keys_url":"https://api.github.com/repos/vega/voyager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vega/voyager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vega/voyager/teams","hooks_url":"https://api.github.com/repos/vega/voyager/hooks","issue_events_url":"https://api.github.com/repos/vega/voyager/issues/events{/number}","events_url":"https://api.github.com/repos/vega/voyager/events","assignees_url":"https://api.github.com/repos/vega/voyager/assignees{/user}","branches_url":"https://api.github.com/repos/vega/voyager/branches{/branch}","tags_url":"https://api.github.com/repos/vega/voyager/tags","blobs_url":"https://api.github.com/repos/vega/voyager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vega/voyager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vega/voyager/git/refs{/sha}","trees_url":"https://api.github.com/repos/vega/voyager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vega/voyager/statuses/{sha}","languages_url":"https://api.github.com/repos/vega/voyager/languages","stargazers_url":"https://api.github.com/repos/vega/voyager/stargazers","contributors_url":"https://api.github.com/repos/vega/voyager/contributors","subscribers_url":"https://api.github.com/repos/vega/voyager/subscribers","subscription_url":"https://api.github.com/repos/vega/voyager/subscription","commits_url":"https://api.github.com/repos/vega/voyager/commits{/sha}","git_commits_url":"https://api.github.com/repos/vega/voyager/git/commits{/sha}","comments_url":"https://api.github.com/repos/vega/voyager/comments{/number}","issue_comment_url":"https://api.github.com/repos/vega/voyager/issues/comments{/number}","contents_url":"https://api.github.com/repos/vega/voyager/contents/{+path}","compare_url":"https://api.github.com/repos/vega/voyager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vega/voyager/merges","archive_url":"https://api.github.com/repos/vega/voyager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vega/voyager/downloads","issues_url":"https://api.github.com/repos/vega/voyager/issues{/number}","pulls_url":"https://api.github.com/repos/vega/voyager/pulls{/number}","milestones_url":"https://api.github.com/repos/vega/voyager/milestones{/number}","notifications_url":"https://api.github.com/repos/vega/voyager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vega/voyager/labels{/name}","releases_url":"https://api.github.com/repos/vega/voyager/releases{/id}","deployments_url":"https://api.github.com/repos/vega/voyager/deployments","created_at":"2015-01-18T17:28:01Z","updated_at":"2017-07-10T09:13:48Z","pushed_at":"2017-07-07T21:25:31Z","git_url":"git://github.com/vega/voyager.git","ssh_url":"git@github.com:vega/voyager.git","clone_url":"https://github.com/vega/voyager.git","svn_url":"https://github.com/vega/voyager","homepage":"http://vega.github.io/voyager2","size":25462,"stargazers_count":295,"watchers_count":295,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":45,"mirror_url":null,"open_issues_count":50,"forks":45,"open_issues":50,"watchers":295,"default_branch":"master"}},"base":{"label":"vega:cyn/filter","ref":"cyn/filter","sha":"f4bf30d801dcbcad3a05d4bf90edc294c80a6448","user":{"login":"vega","id":11796929,"avatar_url":"https://avatars0.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"repo":{"id":29434046,"name":"voyager","full_name":"vega/voyager","owner":{"login":"vega","id":11796929,"avatar_url":"https://avatars0.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vega/voyager","description":"Recommendation-Powered Visualization Tool for Data Exploration","fork":false,"url":"https://api.github.com/repos/vega/voyager","forks_url":"https://api.github.com/repos/vega/voyager/forks","keys_url":"https://api.github.com/repos/vega/voyager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vega/voyager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vega/voyager/teams","hooks_url":"https://api.github.com/repos/vega/voyager/hooks","issue_events_url":"https://api.github.com/repos/vega/voyager/issues/events{/number}","events_url":"https://api.github.com/repos/vega/voyager/events","assignees_url":"https://api.github.com/repos/vega/voyager/assignees{/user}","branches_url":"https://api.github.com/repos/vega/voyager/branches{/branch}","tags_url":"https://api.github.com/repos/vega/voyager/tags","blobs_url":"https://api.github.com/repos/vega/voyager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vega/voyager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vega/voyager/git/refs{/sha}","trees_url":"https://api.github.com/repos/vega/voyager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vega/voyager/statuses/{sha}","languages_url":"https://api.github.com/repos/vega/voyager/languages","stargazers_url":"https://api.github.com/repos/vega/voyager/stargazers","contributors_url":"https://api.github.com/repos/vega/voyager/contributors","subscribers_url":"https://api.github.com/repos/vega/voyager/subscribers","subscription_url":"https://api.github.com/repos/vega/voyager/subscription","commits_url":"https://api.github.com/repos/vega/voyager/commits{/sha}","git_commits_url":"https://api.github.com/repos/vega/voyager/git/commits{/sha}","comments_url":"https://api.github.com/repos/vega/voyager/comments{/number}","issue_comment_url":"https://api.github.com/repos/vega/voyager/issues/comments{/number}","contents_url":"https://api.github.com/repos/vega/voyager/contents/{+path}","compare_url":"https://api.github.com/repos/vega/voyager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vega/voyager/merges","archive_url":"https://api.github.com/repos/vega/voyager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vega/voyager/downloads","issues_url":"https://api.github.com/repos/vega/voyager/issues{/number}","pulls_url":"https://api.github.com/repos/vega/voyager/pulls{/number}","milestones_url":"https://api.github.com/repos/vega/voyager/milestones{/number}","notifications_url":"https://api.github.com/repos/vega/voyager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vega/voyager/labels{/name}","releases_url":"https://api.github.com/repos/vega/voyager/releases{/id}","deployments_url":"https://api.github.com/repos/vega/voyager/deployments","created_at":"2015-01-18T17:28:01Z","updated_at":"2017-07-10T09:13:48Z","pushed_at":"2017-07-07T21:25:31Z","git_url":"git://github.com/vega/voyager.git","ssh_url":"git@github.com:vega/voyager.git","clone_url":"https://github.com/vega/voyager.git","svn_url":"https://github.com/vega/voyager","homepage":"http://vega.github.io/voyager2","size":25462,"stargazers_count":295,"watchers_count":295,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":45,"mirror_url":null,"open_issues_count":50,"forks":45,"open_issues":50,"watchers":295,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vega/voyager/pulls/419"},"html":{"href":"https://github.com/vega/voyager/pull/419"},"issue":{"href":"https://api.github.com/repos/vega/voyager/issues/419"},"comments":{"href":"https://api.github.com/repos/vega/voyager/issues/419/comments"},"review_comments":{"href":"https://api.github.com/repos/vega/voyager/pulls/419/comments"},"review_comment":{"href":"https://api.github.com/repos/vega/voyager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vega/voyager/pulls/419/commits"},"statuses":{"href":"https://api.github.com/repos/vega/voyager/statuses/c75b3a73daa34e08d87e0c77b447557106dabf2c"}}}}
{"actor":{"display_login":"kanitw"}}