{"action":"created","comment":{"url":"https://api.github.com/repos/segmentio/evergreen/pulls/comments/168363811","pull_request_review_id":96716807,"id":168363811,"diff_hunk":"@@ -0,0 +1,40 @@\n+import React from 'react'\n+import PropTypes from 'prop-types'\n+\n+export default class DialogManager extends React.PureComponent {\n+  static propTypes = {\n+    children: PropTypes.func\n+  }\n+\n+  state = {\n+    isShown: false,\n+    isLoading: false\n+  }\n+\n+  render() {\n+    return this.props.children({\n+      isShown: this.state.isShown,\n+      isLoading: this.state.isLoading,\n+      confirmLoading: () => {","path":"src/dialog/docs/DialogManager.js","position":18,"original_position":18,"commit_id":"04b2ecf65b64971cd9307dac687b9a7d5fc86790","original_commit_id":"04b2ecf65b64971cd9307dac687b9a7d5fc86790","user":{"login":"Rowno","id":605501,"avatar_url":"https://avatars3.githubusercontent.com/u/605501?v=4","gravatar_id":"","url":"https://api.github.com/users/Rowno","html_url":"https://github.com/Rowno","followers_url":"https://api.github.com/users/Rowno/followers","following_url":"https://api.github.com/users/Rowno/following{/other_user}","gists_url":"https://api.github.com/users/Rowno/gists{/gist_id}","starred_url":"https://api.github.com/users/Rowno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rowno/subscriptions","organizations_url":"https://api.github.com/users/Rowno/orgs","repos_url":"https://api.github.com/users/Rowno/repos","events_url":"https://api.github.com/users/Rowno/events{/privacy}","received_events_url":"https://api.github.com/users/Rowno/received_events","type":"User","site_admin":false},"body":"Move all these callback to class methods.","created_at":"2018-02-15T01:39:08Z","updated_at":"2018-02-15T01:51:48Z","html_url":"https://github.com/segmentio/evergreen/pull/134#discussion_r168363811","pull_request_url":"https://api.github.com/repos/segmentio/evergreen/pulls/134","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/segmentio/evergreen/pulls/comments/168363811"},"html":{"href":"https://github.com/segmentio/evergreen/pull/134#discussion_r168363811"},"pull_request":{"href":"https://api.github.com/repos/segmentio/evergreen/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/segmentio/evergreen/pulls/134","id":169261946,"html_url":"https://github.com/segmentio/evergreen/pull/134","diff_url":"https://github.com/segmentio/evergreen/pull/134.diff","patch_url":"https://github.com/segmentio/evergreen/pull/134.patch","issue_url":"https://api.github.com/repos/segmentio/evergreen/issues/134","number":134,"state":"open","locked":false,"title":"Improved dialog and docs + button loading","user":{"login":"jeroenransijn","id":564463,"avatar_url":"https://avatars1.githubusercontent.com/u/564463?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroenransijn","html_url":"https://github.com/jeroenransijn","followers_url":"https://api.github.com/users/jeroenransijn/followers","following_url":"https://api.github.com/users/jeroenransijn/following{/other_user}","gists_url":"https://api.github.com/users/jeroenransijn/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenransijn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenransijn/subscriptions","organizations_url":"https://api.github.com/users/jeroenransijn/orgs","repos_url":"https://api.github.com/users/jeroenransijn/repos","events_url":"https://api.github.com/users/jeroenransijn/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenransijn/received_events","type":"User","site_admin":false},"body":"This PR is based on top of #127, #128. The other PR was still based on the old mono-repo, so I redid most what was in that PR and made some additional changes and tweaks. \r\n\r\n## This PR contains\r\n\r\n* Dialog API improvements\r\n* More Dialog stories\r\n* Dialog documentation\r\n* Button now has a `isLoading` prop\r\n* Minor changes in content for Table and Buttons docs.\r\n\r\n## Design Examples\r\n\r\n![dialog](https://user-images.githubusercontent.com/564463/36235625-a97bd824-11a6-11e8-9158-acc6718b9ccb.gif)\r\n![confirm loading](https://user-images.githubusercontent.com/564463/36235629-ac259ee8-11a6-11e8-967c-d0541ff6f902.gif)\r\n![button isloading](https://user-images.githubusercontent.com/564463/36235631-aebffc16-11a6-11e8-85fb-e76340373245.gif)\r\n![dialog docs](https://user-images.githubusercontent.com/564463/36235707-0f9f7c78-11a7-11e8-9f03-82d0a86d3827.gif)\r\n\r\n\r\n## Props and default props\r\n\r\n```javascript\r\nstatic propTypes = {\r\n  /**\r\n   * Composes the Overlay component as the base.\r\n   */\r\n  ...Overlay.propTypes,\r\n\r\n  /**\r\n   * Children can be a node or a function accepting `({ close })`.\r\n   * See an example to understand how this works.\r\n   */\r\n  children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\r\n\r\n  /**\r\n   * Title of the Dialog. Titles should use Title Case.\r\n   */\r\n  title: PropTypes.node,\r\n\r\n  /**\r\n   * Props passed through to the primary button.\r\n   * Passing this object will show the button and cancel button.\r\n   * You should pass `children` and `onClick`.\r\n   */\r\n  primaryButton: PropTypes.object,\r\n\r\n  /**\r\n   * Label of the cancel button, shown when primaryButton is passed.\r\n   * You should not have to change this in most cases.\r\n   */\r\n  cancelLabel: PropTypes.node,\r\n\r\n  /**\r\n   * Only effective when when passing primaryButton.\r\n   */\r\n  hideCancelButton: PropTypes.bool,\r\n\r\n  /**\r\n   * Width of the Dialog.\r\n   */\r\n  width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n\r\n  /**\r\n   * The space above the Dialog.\r\n   * This offset is also used at the bottom when there is not enough space\r\n   * available on screen — and the Dialog scrolls internally.\r\n   */\r\n  topOffset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n\r\n  /**\r\n   * The min height of the body content.\r\n   * Makes it less weird when only showing little content.\r\n   */\r\n  minHeightContent: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n\r\n  /**\r\n   * When true, hide the header containing the title and close button.\r\n   */\r\n  hideHeader: PropTypes.bool,\r\n\r\n  /**\r\n   * Props that are passed to the Dialog container.\r\n   */\r\n  containerProps: PropTypes.object\r\n}\r\n\r\nstatic defaultProps = {\r\n  width: 560,\r\n  topOffset: '12vh',\r\n  minHeightContent: 80,\r\n  cancelLabel: 'Cancel'\r\n}\r\n```","created_at":"2018-02-15T00:51:04Z","updated_at":"2018-02-15T01:51:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a87702b9623030873c581e516b1ba449ceb7cd3a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":672426374,"url":"https://api.github.com/repos/segmentio/evergreen/labels/Type:%20Documentation","name":"Type: Documentation","color":"435A6F","default":false},{"id":678572186,"url":"https://api.github.com/repos/segmentio/evergreen/labels/Type:%20Improvement","name":"Type: Improvement","color":"435A6F","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/segmentio/evergreen/pulls/134/commits","review_comments_url":"https://api.github.com/repos/segmentio/evergreen/pulls/134/comments","review_comment_url":"https://api.github.com/repos/segmentio/evergreen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segmentio/evergreen/issues/134/comments","statuses_url":"https://api.github.com/repos/segmentio/evergreen/statuses/04b2ecf65b64971cd9307dac687b9a7d5fc86790","head":{"label":"segmentio:improve-dialog-2","ref":"improve-dialog-2","sha":"04b2ecf65b64971cd9307dac687b9a7d5fc86790","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars0.githubusercontent.com/u/819518?v=4","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":98789146,"name":"evergreen","full_name":"segmentio/evergreen","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars0.githubusercontent.com/u/819518?v=4","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/evergreen","description":"🌲 Evergreen React UI Framework by Segment","fork":false,"url":"https://api.github.com/repos/segmentio/evergreen","forks_url":"https://api.github.com/repos/segmentio/evergreen/forks","keys_url":"https://api.github.com/repos/segmentio/evergreen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/evergreen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/evergreen/teams","hooks_url":"https://api.github.com/repos/segmentio/evergreen/hooks","issue_events_url":"https://api.github.com/repos/segmentio/evergreen/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/evergreen/events","assignees_url":"https://api.github.com/repos/segmentio/evergreen/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/evergreen/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/evergreen/tags","blobs_url":"https://api.github.com/repos/segmentio/evergreen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/evergreen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/evergreen/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/evergreen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/evergreen/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/evergreen/languages","stargazers_url":"https://api.github.com/repos/segmentio/evergreen/stargazers","contributors_url":"https://api.github.com/repos/segmentio/evergreen/contributors","subscribers_url":"https://api.github.com/repos/segmentio/evergreen/subscribers","subscription_url":"https://api.github.com/repos/segmentio/evergreen/subscription","commits_url":"https://api.github.com/repos/segmentio/evergreen/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/evergreen/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/evergreen/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/evergreen/issues/comments{/number}","contents_url":"https://api.github.com/repos/segmentio/evergreen/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/evergreen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/evergreen/merges","archive_url":"https://api.github.com/repos/segmentio/evergreen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/evergreen/downloads","issues_url":"https://api.github.com/repos/segmentio/evergreen/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/evergreen/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/evergreen/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/evergreen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/evergreen/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/evergreen/releases{/id}","deployments_url":"https://api.github.com/repos/segmentio/evergreen/deployments","created_at":"2017-07-30T10:03:14Z","updated_at":"2018-02-15T01:03:07Z","pushed_at":"2018-02-15T00:51:05Z","git_url":"git://github.com/segmentio/evergreen.git","ssh_url":"git@github.com:segmentio/evergreen.git","clone_url":"https://github.com/segmentio/evergreen.git","svn_url":"https://github.com/segmentio/evergreen","homepage":"https://segmentio.github.io/evergreen/","size":1884,"stargazers_count":152,"watchers_count":152,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":16,"open_issues":20,"watchers":152,"default_branch":"master"}},"base":{"label":"segmentio:master","ref":"master","sha":"61c281dce816908e296c298d452c399a99dad467","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars0.githubusercontent.com/u/819518?v=4","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":98789146,"name":"evergreen","full_name":"segmentio/evergreen","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars0.githubusercontent.com/u/819518?v=4","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/evergreen","description":"🌲 Evergreen React UI Framework by Segment","fork":false,"url":"https://api.github.com/repos/segmentio/evergreen","forks_url":"https://api.github.com/repos/segmentio/evergreen/forks","keys_url":"https://api.github.com/repos/segmentio/evergreen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/evergreen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/evergreen/teams","hooks_url":"https://api.github.com/repos/segmentio/evergreen/hooks","issue_events_url":"https://api.github.com/repos/segmentio/evergreen/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/evergreen/events","assignees_url":"https://api.github.com/repos/segmentio/evergreen/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/evergreen/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/evergreen/tags","blobs_url":"https://api.github.com/repos/segmentio/evergreen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/evergreen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/evergreen/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/evergreen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/evergreen/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/evergreen/languages","stargazers_url":"https://api.github.com/repos/segmentio/evergreen/stargazers","contributors_url":"https://api.github.com/repos/segmentio/evergreen/contributors","subscribers_url":"https://api.github.com/repos/segmentio/evergreen/subscribers","subscription_url":"https://api.github.com/repos/segmentio/evergreen/subscription","commits_url":"https://api.github.com/repos/segmentio/evergreen/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/evergreen/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/evergreen/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/evergreen/issues/comments{/number}","contents_url":"https://api.github.com/repos/segmentio/evergreen/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/evergreen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/evergreen/merges","archive_url":"https://api.github.com/repos/segmentio/evergreen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/evergreen/downloads","issues_url":"https://api.github.com/repos/segmentio/evergreen/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/evergreen/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/evergreen/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/evergreen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/evergreen/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/evergreen/releases{/id}","deployments_url":"https://api.github.com/repos/segmentio/evergreen/deployments","created_at":"2017-07-30T10:03:14Z","updated_at":"2018-02-15T01:03:07Z","pushed_at":"2018-02-15T00:51:05Z","git_url":"git://github.com/segmentio/evergreen.git","ssh_url":"git@github.com:segmentio/evergreen.git","clone_url":"https://github.com/segmentio/evergreen.git","svn_url":"https://github.com/segmentio/evergreen","homepage":"https://segmentio.github.io/evergreen/","size":1884,"stargazers_count":152,"watchers_count":152,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":16,"open_issues":20,"watchers":152,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segmentio/evergreen/pulls/134"},"html":{"href":"https://github.com/segmentio/evergreen/pull/134"},"issue":{"href":"https://api.github.com/repos/segmentio/evergreen/issues/134"},"comments":{"href":"https://api.github.com/repos/segmentio/evergreen/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/segmentio/evergreen/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/segmentio/evergreen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segmentio/evergreen/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/segmentio/evergreen/statuses/04b2ecf65b64971cd9307dac687b9a7d5fc86790"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Rowno"}}