payload: {"action":"created","comment":{"url":"https://api.github.com/repos/elastic/kibana/pulls/comments/291368588","pull_request_review_id":246811816,"id":291368588,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5MTM2ODU4OA==","diff_hunk":"@@ -13,6 +13,7 @@ import { Datasource, DataType } from '..';\n import uuid from 'uuid';\n import { DatasourceDimensionPanelProps, DatasourceDataPanelProps } from '../types';\n import { getIndexPatterns } from './loader';\n+import { ChildDragDropProvider, DragDrop, DragContextState } from '../drag_drop';","path":"x-pack/plugins/lens/public/indexpattern_plugin/indexpattern.tsx","position":4,"original_position":4,"commit_id":"7fc9083a953513a69078df1bf4e1ee0b3814feeb","original_commit_id":"7fc9083a953513a69078df1bf4e1ee0b3814feeb","user":{"login":"wylieconlon","id":666475,"node_id":"MDQ6VXNlcjY2NjQ3NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/666475?v=4","gravatar_id":"","url":"https://api.github.com/users/wylieconlon","html_url":"https://github.com/wylieconlon","followers_url":"https://api.github.com/users/wylieconlon/followers","following_url":"https://api.github.com/users/wylieconlon/following{/other_user}","gists_url":"https://api.github.com/users/wylieconlon/gists{/gist_id}","starred_url":"https://api.github.com/users/wylieconlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wylieconlon/subscriptions","organizations_url":"https://api.github.com/users/wylieconlon/orgs","repos_url":"https://api.github.com/users/wylieconlon/repos","events_url":"https://api.github.com/users/wylieconlon/events{/privacy}","received_events_url":"https://api.github.com/users/wylieconlon/received_events","type":"User","site_admin":false},"body":"I would recommend creating a mock of the `drag_drop` library so that you can write a test like:\r\n\r\n```typescript\r\nimport { DragDrop } from '../drag_drop';\r\n\r\njest.mock('../drag_drop');\r\n\r\nit('should call setState on drop', () => {\r\n  wrapper.find(DragDrop).prop('onDrop')!({\r\n    operationId: 'droppedOperation',\r\n  });\r\n\r\n  expect(setState).toHaveBeenCalledWith({\r\n    ...state,\r\n    columns: {\r\n      ...state.columns,\r\n      newColumnId: expect.objectContaining({\r\n        operationId: 'droppedOperation',\r\n      }),\r\n    }\r\n  });\r\n});\r\n```","created_at":"2019-06-06T20:57:34Z","updated_at":"2019-06-06T20:57:34Z","html_url":"https://github.com/elastic/kibana/pull/37711#discussion_r291368588","pull_request_url":"https://api.github.com/repos/elastic/kibana/pulls/37711","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments/291368588"},"html":{"href":"https://github.com/elastic/kibana/pull/37711#discussion_r291368588"},"pull_request":{"href":"https://api.github.com/repos/elastic/kibana/pulls/37711"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/37711","id":284157832,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg0MTU3ODMy","html_url":"https://github.com/elastic/kibana/pull/37711","diff_url":"https://github.com/elastic/kibana/pull/37711.diff","patch_url":"https://github.com/elastic/kibana/pull/37711.patch","issue_url":"https://api.github.com/repos/elastic/kibana/issues/37711","number":37711,"state":"open","locked":false,"title":"[Lens] Lens/index pattern drag drop","user":{"login":"chrisdavies","id":833377,"node_id":"MDQ6VXNlcjgzMzM3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/833377?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisdavies","html_url":"https://github.com/chrisdavies","followers_url":"https://api.github.com/users/chrisdavies/followers","following_url":"https://api.github.com/users/chrisdavies/following{/other_user}","gists_url":"https://api.github.com/users/chrisdavies/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdavies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdavies/subscriptions","organizations_url":"https://api.github.com/users/chrisdavies/orgs","repos_url":"https://api.github.com/users/chrisdavies/repos","events_url":"https://api.github.com/users/chrisdavies/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdavies/received_events","type":"User","site_admin":false},"body":"Add basic drag / drop functionality to the index pattern datasource.\r\n\r\nThis doesn't yet support drag / drop for adding columns, split series, color, etc. Just for modifying an existing column.\r\n\r\nThe mechanism it uses is to find the first supported operation which uses the dragged field. This is a naive approach, and should be made more sophisticated in the future.","created_at":"2019-05-31T18:56:48Z","updated_at":"2019-06-06T20:57:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfacf49bbeb5ba402558cba0abcda4679048d8de","assignee":null,"assignees":[],"requested_reviewers":[{"login":"flash1293","id":1508364,"node_id":"MDQ6VXNlcjE1MDgzNjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1508364?v=4","gravatar_id":"","url":"https://api.github.com/users/flash1293","html_url":"https://github.com/flash1293","followers_url":"https://api.github.com/users/flash1293/followers","following_url":"https://api.github.com/users/flash1293/following{/other_user}","gists_url":"https://api.github.com/users/flash1293/gists{/gist_id}","starred_url":"https://api.github.com/users/flash1293/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flash1293/subscriptions","organizations_url":"https://api.github.com/users/flash1293/orgs","repos_url":"https://api.github.com/users/flash1293/repos","events_url":"https://api.github.com/users/flash1293/events{/privacy}","received_events_url":"https://api.github.com/users/flash1293/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1350245909,"node_id":"MDU6TGFiZWwxMzUwMjQ1OTA5","url":"https://api.github.com/repos/elastic/kibana/labels/:Lens","name":":Lens","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/kibana/pulls/37711/commits","review_comments_url":"https://api.github.com/repos/elastic/kibana/pulls/37711/comments","review_comment_url":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/37711/comments","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/7fc9083a953513a69078df1bf4e1ee0b3814feeb","head":{"label":"chrisdavies:lens/index-pattern-drag-drop","ref":"lens/index-pattern-drag-drop","sha":"7fc9083a953513a69078df1bf4e1ee0b3814feeb","user":{"login":"chrisdavies","id":833377,"node_id":"MDQ6VXNlcjgzMzM3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/833377?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisdavies","html_url":"https://github.com/chrisdavies","followers_url":"https://api.github.com/users/chrisdavies/followers","following_url":"https://api.github.com/users/chrisdavies/following{/other_user}","gists_url":"https://api.github.com/users/chrisdavies/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdavies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdavies/subscriptions","organizations_url":"https://api.github.com/users/chrisdavies/orgs","repos_url":"https://api.github.com/users/chrisdavies/repos","events_url":"https://api.github.com/users/chrisdavies/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdavies/received_events","type":"User","site_admin":false},"repo":{"id":123947515,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM5NDc1MTU=","name":"kibana","full_name":"chrisdavies/kibana","private":false,"owner":{"login":"chrisdavies","id":833377,"node_id":"MDQ6VXNlcjgzMzM3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/833377?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisdavies","html_url":"https://github.com/chrisdavies","followers_url":"https://api.github.com/users/chrisdavies/followers","following_url":"https://api.github.com/users/chrisdavies/following{/other_user}","gists_url":"https://api.github.com/users/chrisdavies/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdavies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdavies/subscriptions","organizations_url":"https://api.github.com/users/chrisdavies/orgs","repos_url":"https://api.github.com/users/chrisdavies/repos","events_url":"https://api.github.com/users/chrisdavies/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdavies/received_events","type":"User","site_admin":false},"html_url":"https://github.com/chrisdavies/kibana","description":":bar_chart: Kibana analytics and search dashboard for Elasticsearch","fork":true,"url":"https://api.github.com/repos/chrisdavies/kibana","forks_url":"https://api.github.com/repos/chrisdavies/kibana/forks","keys_url":"https://api.github.com/repos/chrisdavies/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chrisdavies/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chrisdavies/kibana/teams","hooks_url":"https://api.github.com/repos/chrisdavies/kibana/hooks","issue_events_url":"https://api.github.com/repos/chrisdavies/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/chrisdavies/kibana/events","assignees_url":"https://api.github.com/repos/chrisdavies/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/chrisdavies/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/chrisdavies/kibana/tags","blobs_url":"https://api.github.com/repos/chrisdavies/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chrisdavies/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chrisdavies/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/chrisdavies/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chrisdavies/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/chrisdavies/kibana/languages","stargazers_url":"https://api.github.com/repos/chrisdavies/kibana/stargazers","contributors_url":"https://api.github.com/repos/chrisdavies/kibana/contributors","subscribers_url":"https://api.github.com/repos/chrisdavies/kibana/subscribers","subscription_url":"https://api.github.com/repos/chrisdavies/kibana/subscription","commits_url":"https://api.github.com/repos/chrisdavies/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/chrisdavies/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/chrisdavies/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/chrisdavies/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/chrisdavies/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/chrisdavies/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chrisdavies/kibana/merges","archive_url":"https://api.github.com/repos/chrisdavies/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chrisdavies/kibana/downloads","issues_url":"https://api.github.com/repos/chrisdavies/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/chrisdavies/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/chrisdavies/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/chrisdavies/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chrisdavies/kibana/labels{/name}","releases_url":"https://api.github.com/repos/chrisdavies/kibana/releases{/id}","deployments_url":"https://api.github.com/repos/chrisdavies/kibana/deployments","created_at":"2018-03-05T16:32:39Z","updated_at":"2019-02-13T18:53:14Z","pushed_at":"2019-06-06T15:30:41Z","git_url":"git://github.com/chrisdavies/kibana.git","ssh_url":"git@github.com:chrisdavies/kibana.git","clone_url":"https://github.com/chrisdavies/kibana.git","svn_url":"https://github.com/chrisdavies/kibana","homepage":"https://www.elastic.co/products/kibana","size":799068,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:feature/lens","ref":"feature/lens","sha":"717eaff2e9aab6c757905231c15111aa0c15e3de","user":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":7833168,"node_id":"MDEwOlJlcG9zaXRvcnk3ODMzMTY4","name":"kibana","full_name":"elastic/kibana","private":false,"owner":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/elastic/kibana","description":":bar_chart: Kibana analytics and search dashboard for Elasticsearch","fork":false,"url":"https://api.github.com/repos/elastic/kibana","forks_url":"https://api.github.com/repos/elastic/kibana/forks","keys_url":"https://api.github.com/repos/elastic/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/kibana/teams","hooks_url":"https://api.github.com/repos/elastic/kibana/hooks","issue_events_url":"https://api.github.com/repos/elastic/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/kibana/events","assignees_url":"https://api.github.com/repos/elastic/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/kibana/tags","blobs_url":"https://api.github.com/repos/elastic/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/kibana/languages","stargazers_url":"https://api.github.com/repos/elastic/kibana/stargazers","contributors_url":"https://api.github.com/repos/elastic/kibana/contributors","subscribers_url":"https://api.github.com/repos/elastic/kibana/subscribers","subscription_url":"https://api.github.com/repos/elastic/kibana/subscription","commits_url":"https://api.github.com/repos/elastic/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/kibana/merges","archive_url":"https://api.github.com/repos/elastic/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/kibana/downloads","issues_url":"https://api.github.com/repos/elastic/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/kibana/labels{/name}","releases_url":"https://api.github.com/repos/elastic/kibana/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/kibana/deployments","created_at":"2013-01-26T04:00:59Z","updated_at":"2019-06-06T20:23:16Z","pushed_at":"2019-06-06T20:48:15Z","git_url":"git://github.com/elastic/kibana.git","ssh_url":"git@github.com:elastic/kibana.git","clone_url":"https://github.com/elastic/kibana.git","svn_url":"https://github.com/elastic/kibana","homepage":"https://www.elastic.co/products/kibana","size":822686,"stargazers_count":11978,"watchers_count":11978,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4676,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4704,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4676,"open_issues":4704,"watchers":11978,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/37711"},"html":{"href":"https://github.com/elastic/kibana/pull/37711"},"issue":{"href":"https://api.github.com/repos/elastic/kibana/issues/37711"},"comments":{"href":"https://api.github.com/repos/elastic/kibana/issues/37711/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/kibana/pulls/37711/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/kibana/pulls/37711/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/kibana/statuses/7fc9083a953513a69078df1bf4e1ee0b3814feeb"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"wylieconlon"}}