{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/kibana/pulls/comments/72303890","id":72303890,"diff_hunk":"@@ -0,0 +1,42 @@\n+.sharing-ui-menu__List {\n+  display: block;\n+  margin: 0;\n+  padding: 0;\n+}\n+\n+.sharing-ui-menu__ListWrapper,\n+.sharing-ui-menu__SharePanel {","path":"src/ui/public/kbn_share/kbn_share.less","position":8,"original_position":8,"commit_id":"b9892a2d53958f0e7e5bb39bb3d90b73b501471e","original_commit_id":"a4d1670dd0b3ee75c30995fc50be8bd133ef4837","user":{"login":"cjcenizal","id":1238659,"avatar_url":"https://avatars.githubusercontent.com/u/1238659?v=3","gravatar_id":"","url":"https://api.github.com/users/cjcenizal","html_url":"https://github.com/cjcenizal","followers_url":"https://api.github.com/users/cjcenizal/followers","following_url":"https://api.github.com/users/cjcenizal/following{/other_user}","gists_url":"https://api.github.com/users/cjcenizal/gists{/gist_id}","starred_url":"https://api.github.com/users/cjcenizal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjcenizal/subscriptions","organizations_url":"https://api.github.com/users/cjcenizal/orgs","repos_url":"https://api.github.com/users/cjcenizal/repos","events_url":"https://api.github.com/users/cjcenizal/events{/privacy}","received_events_url":"https://api.github.com/users/cjcenizal/received_events","type":"User","site_admin":false},"body":"Totally agree. Let's use the pattern you gave here: https://github.com/elastic/kibana-ui-framework/pull/11/files#r72156938","created_at":"2016-07-26T18:02:24Z","updated_at":"2016-07-26T18:02:24Z","html_url":"https://github.com/elastic/kibana/pull/7840#discussion_r72303890","pull_request_url":"https://api.github.com/repos/elastic/kibana/pulls/7840","_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments/72303890"},"html":{"href":"https://github.com/elastic/kibana/pull/7840#discussion_r72303890"},"pull_request":{"href":"https://api.github.com/repos/elastic/kibana/pulls/7840"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/kibana/pulls/7840","id":78753201,"html_url":"https://github.com/elastic/kibana/pull/7840","diff_url":"https://github.com/elastic/kibana/pull/7840.diff","patch_url":"https://github.com/elastic/kibana/pull/7840.patch","issue_url":"https://api.github.com/repos/elastic/kibana/issues/7840","number":7840,"state":"open","locked":false,"title":"[wip] Sharing UI","user":{"login":"bevacqua","id":934293,"avatar_url":"https://avatars.githubusercontent.com/u/934293?v=3","gravatar_id":"","url":"https://api.github.com/users/bevacqua","html_url":"https://github.com/bevacqua","followers_url":"https://api.github.com/users/bevacqua/followers","following_url":"https://api.github.com/users/bevacqua/following{/other_user}","gists_url":"https://api.github.com/users/bevacqua/gists{/gist_id}","starred_url":"https://api.github.com/users/bevacqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bevacqua/subscriptions","organizations_url":"https://api.github.com/users/bevacqua/orgs","repos_url":"https://api.github.com/users/bevacqua/repos","events_url":"https://api.github.com/users/bevacqua/events{/privacy}","received_events_url":"https://api.github.com/users/bevacqua/received_events","type":"User","site_admin":false},"body":"This is the work in progress for the Sharing UI.\r\n\r\n- [x] There's a service to register sharing functionality\r\n- [x] Components register sharing options with that service\r\n  - [x] They're not shown when the `$scope` is flagged as `$$destroyed`, if passed to `.register`\r\n- [x] Share button as a `kbn-share-nav` directive \r\n- [x] Share options slide down via `kbn-share` directive\r\n- [x] Component CSS is kept in `ui/kbn-share`\r\n- [x] Sharing functionality\r\n  - [x] Able to define custom `template`, just like before this PR\r\n  - [x] Able to define custom `action()` when `.register`-ing\r\n    - [x] Can return a `Promise` or thenable telling us whether sharing succeeded, passed, or is asynchronous\r\n    - [x] Sharing panel is closed synchronously after `action` if no thenable is returned\r\n- [ ] Tests\r\n- [ ] Meets #7320 expectations\r\n- [ ] ...\r\n- [ ] Profit!\r\n\r\nHere's the UI when clicking Share in Discover.\r\n\r\n![screen shot 2016-07-25 at 17 56 12](https://cloud.githubusercontent.com/assets/934293/17117329/0ceae9c0-5292-11e6-9fb4-8264755023a3.png)\r\n\r\nAnd here's when we click Link in the sharing options. Note that when there's more than a single sharing option, only the selected one is highlighted, and the \"Back\" button below it takes you back to the full list.\r\n\r\n![screen shot 2016-07-25 at 17 56 07](https://cloud.githubusercontent.com/assets/934293/17117334/0f0150d2-5292-11e6-8925-f039f445ba2b.png)\r\n\r\nHere's an example with the code that can be found below copied into the Discover controller, it has a bunch more buttons that are example below.\r\n\r\n![screen shot 2016-07-25 at 18 03 39](https://cloud.githubusercontent.com/assets/934293/17117355/23f256c6-5292-11e6-8786-1a1e5f04e1e7.png)\r\n\r\nHere's an example with a custom action. In this case, there is no extra configuration options, so once the \"Download\" button is clicked, the action is executed and then the top nav bar is closed.\r\n\r\n```js\r\nkbnShare.register('discover.download', {\r\n  $scope,\r\n  icon: {\r\n    title: 'Download',\r\n    classes: 'fa fa-download'\r\n  },\r\n  action() {\r\n    console.log('omg omg omg!');\r\n  }\r\n});\r\n```\r\n\r\nWe can return a promise, in which case the nav bar is closed only after the promise is settled.\r\n\r\n```js\r\nkbnShare.register('discover.delayed', {\r\n  $scope,\r\n  icon: {\r\n    title: 'Slowly',\r\n    classes: 'fa fa-clock-o'\r\n  },\r\n  action() {\r\n    return new Promise(resolve => setTimeout(() => {\r\n      console.log('yay!');\r\n      resolve();\r\n    }, 2000));\r\n  }\r\n});\r\n```\r\n\r\nIf the promise is rejected, `notify.error` creates a notification atop the UI.\r\n\r\n```js\r\nkbnShare.register('discover.failable', {\r\n  $scope,\r\n  icon: {\r\n    title: 'Fail Soon',\r\n    classes: 'fa fa-remove'\r\n  },\r\n  action() {\r\n    return new Promise((resolve, reject) => setTimeout(() => {\r\n      reject('omg omg failed!');\r\n    }, 2000));\r\n  }\r\n});\r\n```","created_at":"2016-07-25T21:13:08Z","updated_at":"2016-07-26T18:02:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d85ac1215ba7d618096837666d17de1aad6a46eb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/kibana/pulls/7840/commits","review_comments_url":"https://api.github.com/repos/elastic/kibana/pulls/7840/comments","review_comment_url":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/7840/comments","statuses_url":"https://api.github.com/repos/elastic/kibana/statuses/b9892a2d53958f0e7e5bb39bb3d90b73b501471e","head":{"label":"bevacqua:feature/sharing-ui","ref":"feature/sharing-ui","sha":"b9892a2d53958f0e7e5bb39bb3d90b73b501471e","user":{"login":"bevacqua","id":934293,"avatar_url":"https://avatars.githubusercontent.com/u/934293?v=3","gravatar_id":"","url":"https://api.github.com/users/bevacqua","html_url":"https://github.com/bevacqua","followers_url":"https://api.github.com/users/bevacqua/followers","following_url":"https://api.github.com/users/bevacqua/following{/other_user}","gists_url":"https://api.github.com/users/bevacqua/gists{/gist_id}","starred_url":"https://api.github.com/users/bevacqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bevacqua/subscriptions","organizations_url":"https://api.github.com/users/bevacqua/orgs","repos_url":"https://api.github.com/users/bevacqua/repos","events_url":"https://api.github.com/users/bevacqua/events{/privacy}","received_events_url":"https://api.github.com/users/bevacqua/received_events","type":"User","site_admin":false},"repo":{"id":53334717,"name":"kibana","full_name":"bevacqua/kibana","owner":{"login":"bevacqua","id":934293,"avatar_url":"https://avatars.githubusercontent.com/u/934293?v=3","gravatar_id":"","url":"https://api.github.com/users/bevacqua","html_url":"https://github.com/bevacqua","followers_url":"https://api.github.com/users/bevacqua/followers","following_url":"https://api.github.com/users/bevacqua/following{/other_user}","gists_url":"https://api.github.com/users/bevacqua/gists{/gist_id}","starred_url":"https://api.github.com/users/bevacqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bevacqua/subscriptions","organizations_url":"https://api.github.com/users/bevacqua/orgs","repos_url":"https://api.github.com/users/bevacqua/repos","events_url":"https://api.github.com/users/bevacqua/events{/privacy}","received_events_url":"https://api.github.com/users/bevacqua/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bevacqua/kibana","description":":bar_chart: Kibana analytics and search dashboard for Elasticsearch","fork":true,"url":"https://api.github.com/repos/bevacqua/kibana","forks_url":"https://api.github.com/repos/bevacqua/kibana/forks","keys_url":"https://api.github.com/repos/bevacqua/kibana/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bevacqua/kibana/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bevacqua/kibana/teams","hooks_url":"https://api.github.com/repos/bevacqua/kibana/hooks","issue_events_url":"https://api.github.com/repos/bevacqua/kibana/issues/events{/number}","events_url":"https://api.github.com/repos/bevacqua/kibana/events","assignees_url":"https://api.github.com/repos/bevacqua/kibana/assignees{/user}","branches_url":"https://api.github.com/repos/bevacqua/kibana/branches{/branch}","tags_url":"https://api.github.com/repos/bevacqua/kibana/tags","blobs_url":"https://api.github.com/repos/bevacqua/kibana/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bevacqua/kibana/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bevacqua/kibana/git/refs{/sha}","trees_url":"https://api.github.com/repos/bevacqua/kibana/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bevacqua/kibana/statuses/{sha}","languages_url":"https://api.github.com/repos/bevacqua/kibana/languages","stargazers_url":"https://api.github.com/repos/bevacqua/kibana/stargazers","contributors_url":"https://api.github.com/repos/bevacqua/kibana/contributors","subscribers_url":"https://api.github.com/repos/bevacqua/kibana/subscribers","subscription_url":"https://api.github.com/repos/bevacqua/kibana/subscription","commits_url":"https://api.github.com/repos/bevacqua/kibana/commits{/sha}","git_commits_url":"https://api.github.com/repos/bevacqua/kibana/git/commits{/sha}","comments_url":"https://api.github.com/repos/bevacqua/kibana/comments{/number}","issue_comment_url":"https://api.github.com/repos/bevacqua/kibana/issues/comments{/number}","contents_url":"https://api.github.com/repos/bevacqua/kibana/contents/{+path}","compare_url":"https://api.github.com/repos/bevacqua/kibana/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bevacqua/kibana/merges","archive_url":"https://api.github.com/repos/bevacqua/kibana/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bevacqua/kibana/downloads","issues_url":"https://api.github.com/repos/bevacqua/kibana/issues{/number}","pulls_url":"https://api.github.com/repos/bevacqua/kibana/pulls{/number}","milestones_url":"https://api.github.com/repos/bevacqua/kibana/milestones{/number}","notifications_url":"https://api.github.com/repos/bevacqua/kibana/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bevacqua/kibana/labels{/name}","releases_url":"https://api.github.com/repos/bevacqua/kibana/releases{/id}","deployments_url":"https://api.github.com/repos/bevacqua/kibana/deployments","created_at":"2016-03-07T15:10:45Z","updated_at":"2016-03-15T19:10:52Z","pushed_at":"2016-07-25T22:36:35Z","git_url":"git://github.com/bevacqua/kibana.git","ssh_url":"git@github.com:bevacqua/kibana.git","clone_url":"https://github.com/bevacqua/kibana.git","svn_url":"https://github.com/bevacqua/kibana","homepage":"https://www.elastic.co/products/kibana","size":181558,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"89a9f0eb516918a955ce2bfae7274a982e50eb8e","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","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,"name":"kibana","full_name":"elastic/kibana","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","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},"private":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":"2016-07-26T10:49:32Z","pushed_at":"2016-07-26T17:15:37Z","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":234549,"stargazers_count":5699,"watchers_count":5699,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2096,"mirror_url":null,"open_issues_count":1122,"forks":2096,"open_issues":1122,"watchers":5699,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/kibana/pulls/7840"},"html":{"href":"https://github.com/elastic/kibana/pull/7840"},"issue":{"href":"https://api.github.com/repos/elastic/kibana/issues/7840"},"comments":{"href":"https://api.github.com/repos/elastic/kibana/issues/7840/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/kibana/pulls/7840/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/kibana/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/kibana/pulls/7840/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/kibana/statuses/b9892a2d53958f0e7e5bb39bb3d90b73b501471e"}}}}
{"actor":{"display_login":"cjcenizal"}}