{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/canon-react/pulls/comments/69778069","id":69778069,"diff_hunk":"@@ -21,109 +29,181 @@ describe('FormPopover', () => {\n     jasmine.getFixtures().cleanUp();\n   });\n \n-  const renderPopover = (popoverProps) => {\n-    ReactDOM.render(\n-      <FormPopover\n-        onRequestClose={onCancel}\n-        onSubmit={onSubmit}\n-        target=\"popover-target\"\n-        isOpen={true}\n-        {...popoverProps}>\n-        test\n-      </FormPopover>,\n-      document.getElementById('container')\n-    );\n-  };\n-\n-  it('fires the submit callback on click', () => {\n-    renderPopover({});\n-    TestUtils.Simulate.click(document.querySelector('.rs-btn-primary'));\n-\n-    expect(onSubmit).toHaveBeenCalled();\n-  });\n+  const formPopover = (popoverProps) => (\n+    <FormPopover\n+      onRequestClose={ onCancel }\n+      onSubmit={ onSubmit }\n+      target=\"popover-target\"\n+      isOpen={ true }\n+      { ...popoverProps }>\n+      testing child rendering\n+    </FormPopover>\n+  );\n+\n+  describe('behavior', () => {\n+    let eventSpy;\n+\n+    const renderPopover = (popoverProps) => {\n+      ReactDOM.render(\n+        formPopover(popoverProps),\n+        document.getElementById('container')\n+      );\n+    };\n \n-  it('prevents default behavior on submit', () => {\n-    let eventCancelSpy;\n+    beforeEach(() => {\n+      eventSpy = jasmine.createSpy('eventSpy');\n+      renderPopover({});\n+    });\n \n-    eventCancelSpy = jasmine.createSpy('eventCancelSpy');\n-    renderPopover({});\n-    TestUtils.Simulate.click(\n-      document.querySelector('.rs-btn-primary'),\n-      { preventDefault: eventCancelSpy }\n-    );\n+    it('prevents default behavior on submit', () => {\n+      TestUtils.Simulate.click(\n+        document.querySelector('.rs-btn-primary'),\n+        { preventDefault: eventSpy }\n+      );\n \n-    expect(eventCancelSpy).toHaveBeenCalled();\n-  });\n+      expect(eventSpy).toHaveBeenCalled();\n+    });\n \n-  it('fires the request close callback on cancel', () => {\n-    renderPopover({});\n-    TestUtils.Simulate.click(document.querySelector('.rs-btn-link'));\n+    it('fires the submit callback on click', () => {\n+      TestUtils.Simulate.click(document.querySelector('.rs-btn-primary'));\n \n-    expect(onCancel).toHaveBeenCalled();\n-  });\n+      expect(onSubmit).toHaveBeenCalled();\n+    });\n+\n+    it('prevents default behavior on cancel', () => {\n+      TestUtils.Simulate.click(\n+        document.querySelector('.rs-btn-link'),\n+        { preventDefault: eventSpy }\n+      );\n \n-  it('prevents default behavior on cancel', () => {\n-    let eventCancelSpy;\n+      expect(eventSpy).toHaveBeenCalled();\n+    });\n \n-    eventCancelSpy = jasmine.createSpy('eventCancelSpy');\n-    renderPopover({});\n-    TestUtils.Simulate.click(\n-      document.querySelector('.rs-btn-link'),\n-      { preventDefault: eventCancelSpy }\n-    );\n+    it('fires the request close callback on cancel', () => {\n+      TestUtils.Simulate.click(document.querySelector('.rs-btn-link'));\n \n-    expect(eventCancelSpy).toHaveBeenCalled();\n+      expect(onCancel).toHaveBeenCalled();\n+    });\n   });\n \n-  describe('while processing', () => {\n+  describe('rendering', () => {\n+    let popover, popoverOverlay, form, popoverBody, popoverFooter, errorIndicator,\n+        submit, cancel, processingIndicator;","path":"test/FormPopoverSpec.jsx","position":123,"original_position":123,"commit_id":"654f3f70d40c6612f90266a100d7601239839d3c","original_commit_id":"654f3f70d40c6612f90266a100d7601239839d3c","user":{"login":"adampickeral","id":1210971,"avatar_url":"https://avatars.githubusercontent.com/u/1210971?v=3","gravatar_id":"","url":"https://api.github.com/users/adampickeral","html_url":"https://github.com/adampickeral","followers_url":"https://api.github.com/users/adampickeral/followers","following_url":"https://api.github.com/users/adampickeral/following{/other_user}","gists_url":"https://api.github.com/users/adampickeral/gists{/gist_id}","starred_url":"https://api.github.com/users/adampickeral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adampickeral/subscriptions","organizations_url":"https://api.github.com/users/adampickeral/orgs","repos_url":"https://api.github.com/users/adampickeral/repos","events_url":"https://api.github.com/users/adampickeral/events{/privacy}","received_events_url":"https://api.github.com/users/adampickeral/received_events","type":"User","site_admin":false},"body":"2 space indent","created_at":"2016-07-06T17:49:04Z","updated_at":"2016-07-06T17:49:04Z","html_url":"https://github.com/rackerlabs/canon-react/pull/119#discussion_r69778069","pull_request_url":"https://api.github.com/repos/rackerlabs/canon-react/pulls/119","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/canon-react/pulls/comments/69778069"},"html":{"href":"https://github.com/rackerlabs/canon-react/pull/119#discussion_r69778069"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/canon-react/pulls/119"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/canon-react/pulls/119","id":76457888,"html_url":"https://github.com/rackerlabs/canon-react/pull/119","diff_url":"https://github.com/rackerlabs/canon-react/pull/119.diff","patch_url":"https://github.com/rackerlabs/canon-react/pull/119.patch","issue_url":"https://api.github.com/repos/rackerlabs/canon-react/issues/119","number":119,"state":"open","locked":false,"title":"Fix FormPopover error display [ready]","user":{"login":"hannahstwinter","id":3260236,"avatar_url":"https://avatars.githubusercontent.com/u/3260236?v=3","gravatar_id":"","url":"https://api.github.com/users/hannahstwinter","html_url":"https://github.com/hannahstwinter","followers_url":"https://api.github.com/users/hannahstwinter/followers","following_url":"https://api.github.com/users/hannahstwinter/following{/other_user}","gists_url":"https://api.github.com/users/hannahstwinter/gists{/gist_id}","starred_url":"https://api.github.com/users/hannahstwinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannahstwinter/subscriptions","organizations_url":"https://api.github.com/users/hannahstwinter/orgs","repos_url":"https://api.github.com/users/hannahstwinter/repos","events_url":"https://api.github.com/users/hannahstwinter/events{/privacy}","received_events_url":"https://api.github.com/users/hannahstwinter/received_events","type":"User","site_admin":false},"body":"This PR introduces an ErrorIndicator component to be used in cases such as displaying errors on the FormPopover footer. Currently, the error is being displayed through a FormFieldValidationBlock below the button components. However, the Canon classes being used in that component are meaningless outside of a control group, so the error would display as plain black text and the positioning (being rendered below the buttons) would display the error beside of the buttons, widening the popover substantially.\r\n\r\nCurrent (screenshot of code I'm developing within Reach consuming the FormPopover pattern) -\r\n<img width=\"647\" alt=\"screen shot 2016-07-06 at 12 20 19 pm\" src=\"https://cloud.githubusercontent.com/assets/3260236/16625766/1961719c-4374-11e6-80b7-c200f282bbc8.png\">\r\n\r\nWith changes (rendering error through ErrorIndicator component located above buttons) -\r\n<img width=\"560\" alt=\"screen shot 2016-07-06 at 12 13 13 pm\" src=\"https://cloud.githubusercontent.com/assets/3260236/16625536/1586615a-4373-11e6-85c4-1ab5678ae860.png\">\r\n\r\nCanon does not have any patterns surrounding error text outside of tables and validation, so I have settled on the ```rs-status-error``` class here to convey that something is borked and paint it red.\r\nAny thoughts or feedback as to a different approach (including whether or not you think there should be a more appropriate class in the Canon repo) would be appreciated.","created_at":"2016-07-06T16:03:47Z","updated_at":"2016-07-06T17:49:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecc818f2c04810c0327c511872c6c9e5b0c1ba6f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/canon-react/pulls/119/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/canon-react/pulls/119/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/canon-react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/canon-react/issues/119/comments","statuses_url":"https://api.github.com/repos/rackerlabs/canon-react/statuses/654f3f70d40c6612f90266a100d7601239839d3c","head":{"label":"hannahstwinter:fix_form_popover_error","ref":"fix_form_popover_error","sha":"654f3f70d40c6612f90266a100d7601239839d3c","user":{"login":"hannahstwinter","id":3260236,"avatar_url":"https://avatars.githubusercontent.com/u/3260236?v=3","gravatar_id":"","url":"https://api.github.com/users/hannahstwinter","html_url":"https://github.com/hannahstwinter","followers_url":"https://api.github.com/users/hannahstwinter/followers","following_url":"https://api.github.com/users/hannahstwinter/following{/other_user}","gists_url":"https://api.github.com/users/hannahstwinter/gists{/gist_id}","starred_url":"https://api.github.com/users/hannahstwinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannahstwinter/subscriptions","organizations_url":"https://api.github.com/users/hannahstwinter/orgs","repos_url":"https://api.github.com/users/hannahstwinter/repos","events_url":"https://api.github.com/users/hannahstwinter/events{/privacy}","received_events_url":"https://api.github.com/users/hannahstwinter/received_events","type":"User","site_admin":false},"repo":{"id":61911966,"name":"canon-react","full_name":"hannahstwinter/canon-react","owner":{"login":"hannahstwinter","id":3260236,"avatar_url":"https://avatars.githubusercontent.com/u/3260236?v=3","gravatar_id":"","url":"https://api.github.com/users/hannahstwinter","html_url":"https://github.com/hannahstwinter","followers_url":"https://api.github.com/users/hannahstwinter/followers","following_url":"https://api.github.com/users/hannahstwinter/following{/other_user}","gists_url":"https://api.github.com/users/hannahstwinter/gists{/gist_id}","starred_url":"https://api.github.com/users/hannahstwinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannahstwinter/subscriptions","organizations_url":"https://api.github.com/users/hannahstwinter/orgs","repos_url":"https://api.github.com/users/hannahstwinter/repos","events_url":"https://api.github.com/users/hannahstwinter/events{/privacy}","received_events_url":"https://api.github.com/users/hannahstwinter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hannahstwinter/canon-react","description":"React components for Rackspace's Canon framework","fork":true,"url":"https://api.github.com/repos/hannahstwinter/canon-react","forks_url":"https://api.github.com/repos/hannahstwinter/canon-react/forks","keys_url":"https://api.github.com/repos/hannahstwinter/canon-react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hannahstwinter/canon-react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hannahstwinter/canon-react/teams","hooks_url":"https://api.github.com/repos/hannahstwinter/canon-react/hooks","issue_events_url":"https://api.github.com/repos/hannahstwinter/canon-react/issues/events{/number}","events_url":"https://api.github.com/repos/hannahstwinter/canon-react/events","assignees_url":"https://api.github.com/repos/hannahstwinter/canon-react/assignees{/user}","branches_url":"https://api.github.com/repos/hannahstwinter/canon-react/branches{/branch}","tags_url":"https://api.github.com/repos/hannahstwinter/canon-react/tags","blobs_url":"https://api.github.com/repos/hannahstwinter/canon-react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hannahstwinter/canon-react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hannahstwinter/canon-react/git/refs{/sha}","trees_url":"https://api.github.com/repos/hannahstwinter/canon-react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hannahstwinter/canon-react/statuses/{sha}","languages_url":"https://api.github.com/repos/hannahstwinter/canon-react/languages","stargazers_url":"https://api.github.com/repos/hannahstwinter/canon-react/stargazers","contributors_url":"https://api.github.com/repos/hannahstwinter/canon-react/contributors","subscribers_url":"https://api.github.com/repos/hannahstwinter/canon-react/subscribers","subscription_url":"https://api.github.com/repos/hannahstwinter/canon-react/subscription","commits_url":"https://api.github.com/repos/hannahstwinter/canon-react/commits{/sha}","git_commits_url":"https://api.github.com/repos/hannahstwinter/canon-react/git/commits{/sha}","comments_url":"https://api.github.com/repos/hannahstwinter/canon-react/comments{/number}","issue_comment_url":"https://api.github.com/repos/hannahstwinter/canon-react/issues/comments{/number}","contents_url":"https://api.github.com/repos/hannahstwinter/canon-react/contents/{+path}","compare_url":"https://api.github.com/repos/hannahstwinter/canon-react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hannahstwinter/canon-react/merges","archive_url":"https://api.github.com/repos/hannahstwinter/canon-react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hannahstwinter/canon-react/downloads","issues_url":"https://api.github.com/repos/hannahstwinter/canon-react/issues{/number}","pulls_url":"https://api.github.com/repos/hannahstwinter/canon-react/pulls{/number}","milestones_url":"https://api.github.com/repos/hannahstwinter/canon-react/milestones{/number}","notifications_url":"https://api.github.com/repos/hannahstwinter/canon-react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hannahstwinter/canon-react/labels{/name}","releases_url":"https://api.github.com/repos/hannahstwinter/canon-react/releases{/id}","deployments_url":"https://api.github.com/repos/hannahstwinter/canon-react/deployments","created_at":"2016-06-24T20:55:45Z","updated_at":"2016-06-24T20:55:47Z","pushed_at":"2016-07-06T16:22:43Z","git_url":"git://github.com/hannahstwinter/canon-react.git","ssh_url":"git@github.com:hannahstwinter/canon-react.git","clone_url":"https://github.com/hannahstwinter/canon-react.git","svn_url":"https://github.com/hannahstwinter/canon-react","homepage":"http://rackerlabs.github.io/canon-react/","size":1656,"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":"rackerlabs:master","ref":"master","sha":"599e577030f424843cc76098a821ca906e08e330","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":31282707,"name":"canon-react","full_name":"rackerlabs/canon-react","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/canon-react","description":"React components for Rackspace's Canon framework","fork":false,"url":"https://api.github.com/repos/rackerlabs/canon-react","forks_url":"https://api.github.com/repos/rackerlabs/canon-react/forks","keys_url":"https://api.github.com/repos/rackerlabs/canon-react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/canon-react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/canon-react/teams","hooks_url":"https://api.github.com/repos/rackerlabs/canon-react/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/canon-react/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/canon-react/events","assignees_url":"https://api.github.com/repos/rackerlabs/canon-react/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/canon-react/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/canon-react/tags","blobs_url":"https://api.github.com/repos/rackerlabs/canon-react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/canon-react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/canon-react/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/canon-react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/canon-react/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/canon-react/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/canon-react/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/canon-react/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/canon-react/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/canon-react/subscription","commits_url":"https://api.github.com/repos/rackerlabs/canon-react/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/canon-react/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/canon-react/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/canon-react/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/canon-react/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/canon-react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/canon-react/merges","archive_url":"https://api.github.com/repos/rackerlabs/canon-react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/canon-react/downloads","issues_url":"https://api.github.com/repos/rackerlabs/canon-react/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/canon-react/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/canon-react/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/canon-react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/canon-react/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/canon-react/releases{/id}","deployments_url":"https://api.github.com/repos/rackerlabs/canon-react/deployments","created_at":"2015-02-24T21:23:09Z","updated_at":"2016-06-21T00:37:42Z","pushed_at":"2016-07-06T16:22:44Z","git_url":"git://github.com/rackerlabs/canon-react.git","ssh_url":"git@github.com:rackerlabs/canon-react.git","clone_url":"https://github.com/rackerlabs/canon-react.git","svn_url":"https://github.com/rackerlabs/canon-react","homepage":"http://rackerlabs.github.io/canon-react/","size":1695,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"open_issues_count":10,"forks":13,"open_issues":10,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/canon-react/pulls/119"},"html":{"href":"https://github.com/rackerlabs/canon-react/pull/119"},"issue":{"href":"https://api.github.com/repos/rackerlabs/canon-react/issues/119"},"comments":{"href":"https://api.github.com/repos/rackerlabs/canon-react/issues/119/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/canon-react/pulls/119/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/canon-react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/canon-react/pulls/119/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/canon-react/statuses/654f3f70d40c6612f90266a100d7601239839d3c"}}}}
{"actor":{"display_login":"adampickeral"}}