{"action":"created","comment":{"url":"https://api.github.com/repos/Sage/carbon/pulls/comments/167598595","pull_request_review_id":95839518,"id":167598595,"diff_hunk":"@@ -237,6 +248,7 @@ class Form extends React.Component {\n   static defaultProps = {\n     buttonAlign: 'right',\n     cancel: true,\n+    savePrompt: true,","path":"src/components/form/form.js","position":29,"original_position":29,"commit_id":"b42880270c745a81d7d4da05be426823390ca23b","original_commit_id":"b42880270c745a81d7d4da05be426823390ca23b","user":{"login":"SeanArmstrong","id":5382335,"avatar_url":"https://avatars0.githubusercontent.com/u/5382335?v=4","gravatar_id":"","url":"https://api.github.com/users/SeanArmstrong","html_url":"https://github.com/SeanArmstrong","followers_url":"https://api.github.com/users/SeanArmstrong/followers","following_url":"https://api.github.com/users/SeanArmstrong/following{/other_user}","gists_url":"https://api.github.com/users/SeanArmstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanArmstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanArmstrong/subscriptions","organizations_url":"https://api.github.com/users/SeanArmstrong/orgs","repos_url":"https://api.github.com/users/SeanArmstrong/repos","events_url":"https://api.github.com/users/SeanArmstrong/events{/privacy}","received_events_url":"https://api.github.com/users/SeanArmstrong/received_events","type":"User","site_admin":false},"body":"Im not sure this is the best name as its not prompting you when you save. Trying to think of something better now\r\n\r\n`dirtyFormWarning`\r\n`dirtyFormCheck`\r\n`warnOnDirtyForm`","created_at":"2018-02-12T15:56:20Z","updated_at":"2018-02-12T15:56:20Z","html_url":"https://github.com/Sage/carbon/pull/1692#discussion_r167598595","pull_request_url":"https://api.github.com/repos/Sage/carbon/pulls/1692","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Sage/carbon/pulls/comments/167598595"},"html":{"href":"https://github.com/Sage/carbon/pull/1692#discussion_r167598595"},"pull_request":{"href":"https://api.github.com/repos/Sage/carbon/pulls/1692"}}},"pull_request":{"url":"https://api.github.com/repos/Sage/carbon/pulls/1692","id":167731152,"html_url":"https://github.com/Sage/carbon/pull/1692","diff_url":"https://github.com/Sage/carbon/pull/1692.diff","patch_url":"https://github.com/Sage/carbon/pull/1692.patch","issue_url":"https://api.github.com/repos/Sage/carbon/issues/1692","number":1692,"state":"open","locked":false,"title":"[CARBON-159] - Add Dirty Forms","user":{"login":"krillatron","id":5191370,"avatar_url":"https://avatars3.githubusercontent.com/u/5191370?v=4","gravatar_id":"","url":"https://api.github.com/users/krillatron","html_url":"https://github.com/krillatron","followers_url":"https://api.github.com/users/krillatron/followers","following_url":"https://api.github.com/users/krillatron/following{/other_user}","gists_url":"https://api.github.com/users/krillatron/gists{/gist_id}","starred_url":"https://api.github.com/users/krillatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krillatron/subscriptions","organizations_url":"https://api.github.com/users/krillatron/orgs","repos_url":"https://api.github.com/users/krillatron/repos","events_url":"https://api.github.com/users/krillatron/events{/privacy}","received_events_url":"https://api.github.com/users/krillatron/received_events","type":"User","site_admin":false},"body":"# Description\r\nAdding Dirty Forms to Carbon as per SOP, as a prop for the form component. \r\nIf added, will generate a popup informing you of unsaved changes if present and asking if you're sure you want to navigate away from the page. Triggers on form unload (back button, link, url change) but not on react route redirects, as per SOP.\r\n\r\n# TODO\r\n- [x] Release notes\r\n- [x] Specs (increase coverage back to 100%)\r\n- [x] Add screenshots / gifs\r\n\r\n# Related Issues / Pull Requests\r\nhttps://jira-sage.valiantyscloud.net/browse/CARBON-159\r\n\r\n# Testing Instructions\r\n- If savePrompt prop is true and form has been changed, confirmation popup should show when navigating away\r\n- If savePrompt prop is true and form hasn't been changed, no popup should show when navigating away\r\n- If savePrompt prop is false, no popup should show when navigating away\r\n\r\n# Example\r\nExample of prop + usage: \r\n[Dirty Forms - Carbon.zip](https://github.com/Sage/carbon/files/1711212/Dirty.Forms.-.Carbon.zip)\r\n","created_at":"2018-02-07T15:52:17Z","updated_at":"2018-02-12T15:56:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"186c1ac896e74322bf8c1acd29290354510bdecc","assignee":{"login":"krillatron","id":5191370,"avatar_url":"https://avatars3.githubusercontent.com/u/5191370?v=4","gravatar_id":"","url":"https://api.github.com/users/krillatron","html_url":"https://github.com/krillatron","followers_url":"https://api.github.com/users/krillatron/followers","following_url":"https://api.github.com/users/krillatron/following{/other_user}","gists_url":"https://api.github.com/users/krillatron/gists{/gist_id}","starred_url":"https://api.github.com/users/krillatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krillatron/subscriptions","organizations_url":"https://api.github.com/users/krillatron/orgs","repos_url":"https://api.github.com/users/krillatron/repos","events_url":"https://api.github.com/users/krillatron/events{/privacy}","received_events_url":"https://api.github.com/users/krillatron/received_events","type":"User","site_admin":false},"assignees":[{"login":"krillatron","id":5191370,"avatar_url":"https://avatars3.githubusercontent.com/u/5191370?v=4","gravatar_id":"","url":"https://api.github.com/users/krillatron","html_url":"https://github.com/krillatron","followers_url":"https://api.github.com/users/krillatron/followers","following_url":"https://api.github.com/users/krillatron/following{/other_user}","gists_url":"https://api.github.com/users/krillatron/gists{/gist_id}","starred_url":"https://api.github.com/users/krillatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krillatron/subscriptions","organizations_url":"https://api.github.com/users/krillatron/orgs","repos_url":"https://api.github.com/users/krillatron/repos","events_url":"https://api.github.com/users/krillatron/events{/privacy}","received_events_url":"https://api.github.com/users/krillatron/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":299974051,"url":"https://api.github.com/repos/Sage/carbon/labels/Pending%20QA","name":"Pending QA","color":"c7def8","default":false},{"id":262174249,"url":"https://api.github.com/repos/Sage/carbon/labels/Pending%20Review","name":"Pending Review","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Sage/carbon/pulls/1692/commits","review_comments_url":"https://api.github.com/repos/Sage/carbon/pulls/1692/comments","review_comment_url":"https://api.github.com/repos/Sage/carbon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sage/carbon/issues/1692/comments","statuses_url":"https://api.github.com/repos/Sage/carbon/statuses/b42880270c745a81d7d4da05be426823390ca23b","head":{"label":"Sage:carbon_159_dirty_forms","ref":"carbon_159_dirty_forms","sha":"b42880270c745a81d7d4da05be426823390ca23b","user":{"login":"Sage","id":24190,"avatar_url":"https://avatars2.githubusercontent.com/u/24190?v=4","gravatar_id":"","url":"https://api.github.com/users/Sage","html_url":"https://github.com/Sage","followers_url":"https://api.github.com/users/Sage/followers","following_url":"https://api.github.com/users/Sage/following{/other_user}","gists_url":"https://api.github.com/users/Sage/gists{/gist_id}","starred_url":"https://api.github.com/users/Sage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sage/subscriptions","organizations_url":"https://api.github.com/users/Sage/orgs","repos_url":"https://api.github.com/users/Sage/repos","events_url":"https://api.github.com/users/Sage/events{/privacy}","received_events_url":"https://api.github.com/users/Sage/received_events","type":"Organization","site_admin":false},"repo":{"id":41923638,"name":"carbon","full_name":"Sage/carbon","owner":{"login":"Sage","id":24190,"avatar_url":"https://avatars2.githubusercontent.com/u/24190?v=4","gravatar_id":"","url":"https://api.github.com/users/Sage","html_url":"https://github.com/Sage","followers_url":"https://api.github.com/users/Sage/followers","following_url":"https://api.github.com/users/Sage/following{/other_user}","gists_url":"https://api.github.com/users/Sage/gists{/gist_id}","starred_url":"https://api.github.com/users/Sage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sage/subscriptions","organizations_url":"https://api.github.com/users/Sage/orgs","repos_url":"https://api.github.com/users/Sage/repos","events_url":"https://api.github.com/users/Sage/events{/privacy}","received_events_url":"https://api.github.com/users/Sage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sage/carbon","description":"Carbon by Sage | ReactJS UI Component Library","fork":false,"url":"https://api.github.com/repos/Sage/carbon","forks_url":"https://api.github.com/repos/Sage/carbon/forks","keys_url":"https://api.github.com/repos/Sage/carbon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sage/carbon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sage/carbon/teams","hooks_url":"https://api.github.com/repos/Sage/carbon/hooks","issue_events_url":"https://api.github.com/repos/Sage/carbon/issues/events{/number}","events_url":"https://api.github.com/repos/Sage/carbon/events","assignees_url":"https://api.github.com/repos/Sage/carbon/assignees{/user}","branches_url":"https://api.github.com/repos/Sage/carbon/branches{/branch}","tags_url":"https://api.github.com/repos/Sage/carbon/tags","blobs_url":"https://api.github.com/repos/Sage/carbon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sage/carbon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sage/carbon/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sage/carbon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sage/carbon/statuses/{sha}","languages_url":"https://api.github.com/repos/Sage/carbon/languages","stargazers_url":"https://api.github.com/repos/Sage/carbon/stargazers","contributors_url":"https://api.github.com/repos/Sage/carbon/contributors","subscribers_url":"https://api.github.com/repos/Sage/carbon/subscribers","subscription_url":"https://api.github.com/repos/Sage/carbon/subscription","commits_url":"https://api.github.com/repos/Sage/carbon/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sage/carbon/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sage/carbon/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sage/carbon/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sage/carbon/contents/{+path}","compare_url":"https://api.github.com/repos/Sage/carbon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sage/carbon/merges","archive_url":"https://api.github.com/repos/Sage/carbon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sage/carbon/downloads","issues_url":"https://api.github.com/repos/Sage/carbon/issues{/number}","pulls_url":"https://api.github.com/repos/Sage/carbon/pulls{/number}","milestones_url":"https://api.github.com/repos/Sage/carbon/milestones{/number}","notifications_url":"https://api.github.com/repos/Sage/carbon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sage/carbon/labels{/name}","releases_url":"https://api.github.com/repos/Sage/carbon/releases{/id}","deployments_url":"https://api.github.com/repos/Sage/carbon/deployments","created_at":"2015-09-04T15:35:11Z","updated_at":"2018-02-09T14:04:14Z","pushed_at":"2018-02-12T11:03:01Z","git_url":"git://github.com/Sage/carbon.git","ssh_url":"git@github.com:Sage/carbon.git","clone_url":"https://github.com/Sage/carbon.git","svn_url":"https://github.com/Sage/carbon","homepage":"https://carbon.sage.com","size":15378,"stargazers_count":59,"watchers_count":59,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":108,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":13,"open_issues":108,"watchers":59,"default_branch":"master"}},"base":{"label":"Sage:master","ref":"master","sha":"c2425dcd75a8c858554bcc28de7389d77b86782e","user":{"login":"Sage","id":24190,"avatar_url":"https://avatars2.githubusercontent.com/u/24190?v=4","gravatar_id":"","url":"https://api.github.com/users/Sage","html_url":"https://github.com/Sage","followers_url":"https://api.github.com/users/Sage/followers","following_url":"https://api.github.com/users/Sage/following{/other_user}","gists_url":"https://api.github.com/users/Sage/gists{/gist_id}","starred_url":"https://api.github.com/users/Sage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sage/subscriptions","organizations_url":"https://api.github.com/users/Sage/orgs","repos_url":"https://api.github.com/users/Sage/repos","events_url":"https://api.github.com/users/Sage/events{/privacy}","received_events_url":"https://api.github.com/users/Sage/received_events","type":"Organization","site_admin":false},"repo":{"id":41923638,"name":"carbon","full_name":"Sage/carbon","owner":{"login":"Sage","id":24190,"avatar_url":"https://avatars2.githubusercontent.com/u/24190?v=4","gravatar_id":"","url":"https://api.github.com/users/Sage","html_url":"https://github.com/Sage","followers_url":"https://api.github.com/users/Sage/followers","following_url":"https://api.github.com/users/Sage/following{/other_user}","gists_url":"https://api.github.com/users/Sage/gists{/gist_id}","starred_url":"https://api.github.com/users/Sage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sage/subscriptions","organizations_url":"https://api.github.com/users/Sage/orgs","repos_url":"https://api.github.com/users/Sage/repos","events_url":"https://api.github.com/users/Sage/events{/privacy}","received_events_url":"https://api.github.com/users/Sage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sage/carbon","description":"Carbon by Sage | ReactJS UI Component Library","fork":false,"url":"https://api.github.com/repos/Sage/carbon","forks_url":"https://api.github.com/repos/Sage/carbon/forks","keys_url":"https://api.github.com/repos/Sage/carbon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sage/carbon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sage/carbon/teams","hooks_url":"https://api.github.com/repos/Sage/carbon/hooks","issue_events_url":"https://api.github.com/repos/Sage/carbon/issues/events{/number}","events_url":"https://api.github.com/repos/Sage/carbon/events","assignees_url":"https://api.github.com/repos/Sage/carbon/assignees{/user}","branches_url":"https://api.github.com/repos/Sage/carbon/branches{/branch}","tags_url":"https://api.github.com/repos/Sage/carbon/tags","blobs_url":"https://api.github.com/repos/Sage/carbon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sage/carbon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sage/carbon/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sage/carbon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sage/carbon/statuses/{sha}","languages_url":"https://api.github.com/repos/Sage/carbon/languages","stargazers_url":"https://api.github.com/repos/Sage/carbon/stargazers","contributors_url":"https://api.github.com/repos/Sage/carbon/contributors","subscribers_url":"https://api.github.com/repos/Sage/carbon/subscribers","subscription_url":"https://api.github.com/repos/Sage/carbon/subscription","commits_url":"https://api.github.com/repos/Sage/carbon/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sage/carbon/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sage/carbon/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sage/carbon/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sage/carbon/contents/{+path}","compare_url":"https://api.github.com/repos/Sage/carbon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sage/carbon/merges","archive_url":"https://api.github.com/repos/Sage/carbon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sage/carbon/downloads","issues_url":"https://api.github.com/repos/Sage/carbon/issues{/number}","pulls_url":"https://api.github.com/repos/Sage/carbon/pulls{/number}","milestones_url":"https://api.github.com/repos/Sage/carbon/milestones{/number}","notifications_url":"https://api.github.com/repos/Sage/carbon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sage/carbon/labels{/name}","releases_url":"https://api.github.com/repos/Sage/carbon/releases{/id}","deployments_url":"https://api.github.com/repos/Sage/carbon/deployments","created_at":"2015-09-04T15:35:11Z","updated_at":"2018-02-09T14:04:14Z","pushed_at":"2018-02-12T11:03:01Z","git_url":"git://github.com/Sage/carbon.git","ssh_url":"git@github.com:Sage/carbon.git","clone_url":"https://github.com/Sage/carbon.git","svn_url":"https://github.com/Sage/carbon","homepage":"https://carbon.sage.com","size":15378,"stargazers_count":59,"watchers_count":59,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":108,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":13,"open_issues":108,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sage/carbon/pulls/1692"},"html":{"href":"https://github.com/Sage/carbon/pull/1692"},"issue":{"href":"https://api.github.com/repos/Sage/carbon/issues/1692"},"comments":{"href":"https://api.github.com/repos/Sage/carbon/issues/1692/comments"},"review_comments":{"href":"https://api.github.com/repos/Sage/carbon/pulls/1692/comments"},"review_comment":{"href":"https://api.github.com/repos/Sage/carbon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sage/carbon/pulls/1692/commits"},"statuses":{"href":"https://api.github.com/repos/Sage/carbon/statuses/b42880270c745a81d7d4da05be426823390ca23b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"SeanArmstrong"}}