payload: {"action":"created","comment":{"url":"https://api.github.com/repos/bocoup/threeflows/pulls/comments/347378050","pull_request_review_id":318326550,"id":347378050,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0NzM3ODA1MA==","diff_hunk":"@@ -144,29 +185,56 @@ class Editor extends Component {\n             case 'slides':\n                 return (\n                     <Slides\n-                        scenarioId={this.props.match.params.id}\n+                        scenarioId={scenarioId || this.props.match.params.id}\n                         updateEditorMessage={this.updateEditorMessage}\n                     />\n                 );\n             case 'preview':\n-                return <Scenario scenarioId={this.props.match.params.id} />;\n+                return (\n+                    <Scenario\n+                        scenarioId={scenarioId || this.props.match.params.id}\n+                    />\n+                );\n             default:\n                 return null;\n         }\n     }\n \n+    getAllTabs(scenarioId) {\n+        if (!scenarioId) return {};\n+        let copyId;\n+        switch (scenarioId) {\n+            case 'new':\n+                return {\n+                    moment: this.getTab('moment', 'new')\n+                };\n+            case 'copy':\n+                copyId = String(this.props.location.state.scenarioCopy.id);\n+                return {\n+                    moment: this.getTab('moment', copyId),\n+                    slides: this.getTab('slides', copyId),\n+                    preview: this.getTab('preview', copyId)\n+                };\n+            default:\n+                return {\n+                    moment: this.getTab('moment'),\n+                    slides: this.getTab('slides'),\n+                    preview: this.getTab('preview')\n+                };\n+        }\n+    }\n+\n     getSubmitCallback() {\n         let endpoint, method;\n         const scenarioId = this.props.match.params.id;\n \n-        if (scenarioId === 'new') {\n+        if (this.props.isNewScenario || scenarioId === 'copy') {","path":"client/components/Editor/index.jsx","position":171,"original_position":171,"commit_id":"8ad584d4fdcddfbced56ea8d3f9706d56c26038d","original_commit_id":"8ad584d4fdcddfbced56ea8d3f9706d56c26038d","user":{"login":"ktbee","id":7991694,"node_id":"MDQ6VXNlcjc5OTE2OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7991694?v=4","gravatar_id":"","url":"https://api.github.com/users/ktbee","html_url":"https://github.com/ktbee","followers_url":"https://api.github.com/users/ktbee/followers","following_url":"https://api.github.com/users/ktbee/following{/other_user}","gists_url":"https://api.github.com/users/ktbee/gists{/gist_id}","starred_url":"https://api.github.com/users/ktbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktbee/subscriptions","organizations_url":"https://api.github.com/users/ktbee/orgs","repos_url":"https://api.github.com/users/ktbee/repos","events_url":"https://api.github.com/users/ktbee/events{/privacy}","received_events_url":"https://api.github.com/users/ktbee/received_events","type":"User","site_admin":false},"body":"We had this `isNewScenario` prop already thanks to our component in routes, I'm just taking advantage of it here.","created_at":"2019-11-18T13:25:30Z","updated_at":"2019-11-18T13:25:31Z","html_url":"https://github.com/bocoup/threeflows/pull/130#discussion_r347378050","pull_request_url":"https://api.github.com/repos/bocoup/threeflows/pulls/130","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/bocoup/threeflows/pulls/comments/347378050"},"html":{"href":"https://github.com/bocoup/threeflows/pull/130#discussion_r347378050"},"pull_request":{"href":"https://api.github.com/repos/bocoup/threeflows/pulls/130"}}},"pull_request":{"url":"https://api.github.com/repos/bocoup/threeflows/pulls/130","id":342153004,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQyMTUzMDA0","html_url":"https://github.com/bocoup/threeflows/pull/130","diff_url":"https://github.com/bocoup/threeflows/pull/130.diff","patch_url":"https://github.com/bocoup/threeflows/pull/130.patch","issue_url":"https://api.github.com/repos/bocoup/threeflows/issues/130","number":130,"state":"open","locked":false,"title":"Add copy button, logic, endpoint for saving multiple slides","user":{"login":"ktbee","id":7991694,"node_id":"MDQ6VXNlcjc5OTE2OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7991694?v=4","gravatar_id":"","url":"https://api.github.com/users/ktbee","html_url":"https://github.com/ktbee","followers_url":"https://api.github.com/users/ktbee/followers","following_url":"https://api.github.com/users/ktbee/following{/other_user}","gists_url":"https://api.github.com/users/ktbee/gists{/gist_id}","starred_url":"https://api.github.com/users/ktbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktbee/subscriptions","organizations_url":"https://api.github.com/users/ktbee/orgs","repos_url":"https://api.github.com/users/ktbee/repos","events_url":"https://api.github.com/users/ktbee/events{/privacy}","received_events_url":"https://api.github.com/users/ktbee/received_events","type":"User","site_admin":false},"body":"@evmiguel @rwaldron here is my PR for adding forking functionality, let me know what you think of it! My proposed changes:\r\n\r\n- Add \"copy\" button to the UI and pass some of the original scenario's data to the copy via `location.state`\r\n- A `copyScenario` function that creates a new scenario with this passed data, gets the original slides and saves that slides data to the new scenario as well\r\n- Add an endpoint for bulk saving slides\r\n- Small amount of refactoring","created_at":"2019-11-18T13:23:19Z","updated_at":"2019-11-18T13:25:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"800c92d59aeaf6edafaac1677a4dd1a4ac408b91","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rwaldron","id":27985,"node_id":"MDQ6VXNlcjI3OTg1","avatar_url":"https://avatars3.githubusercontent.com/u/27985?v=4","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},{"login":"evmiguel","id":2789098,"node_id":"MDQ6VXNlcjI3ODkwOTg=","avatar_url":"https://avatars1.githubusercontent.com/u/2789098?v=4","gravatar_id":"","url":"https://api.github.com/users/evmiguel","html_url":"https://github.com/evmiguel","followers_url":"https://api.github.com/users/evmiguel/followers","following_url":"https://api.github.com/users/evmiguel/following{/other_user}","gists_url":"https://api.github.com/users/evmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/evmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evmiguel/subscriptions","organizations_url":"https://api.github.com/users/evmiguel/orgs","repos_url":"https://api.github.com/users/evmiguel/repos","events_url":"https://api.github.com/users/evmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/evmiguel/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bocoup/threeflows/pulls/130/commits","review_comments_url":"https://api.github.com/repos/bocoup/threeflows/pulls/130/comments","review_comment_url":"https://api.github.com/repos/bocoup/threeflows/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bocoup/threeflows/issues/130/comments","statuses_url":"https://api.github.com/repos/bocoup/threeflows/statuses/8ad584d4fdcddfbced56ea8d3f9706d56c26038d","head":{"label":"bocoup:fork-a-moment","ref":"fork-a-moment","sha":"8ad584d4fdcddfbced56ea8d3f9706d56c26038d","user":{"login":"bocoup","id":497466,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NzQ2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/497466?v=4","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"repo":{"id":203409277,"node_id":"MDEwOlJlcG9zaXRvcnkyMDM0MDkyNzc=","name":"threeflows","full_name":"bocoup/threeflows","private":false,"owner":{"login":"bocoup","id":497466,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NzQ2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/497466?v=4","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bocoup/threeflows","description":"Practice spaces for teacher preparation programs","fork":true,"url":"https://api.github.com/repos/bocoup/threeflows","forks_url":"https://api.github.com/repos/bocoup/threeflows/forks","keys_url":"https://api.github.com/repos/bocoup/threeflows/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bocoup/threeflows/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bocoup/threeflows/teams","hooks_url":"https://api.github.com/repos/bocoup/threeflows/hooks","issue_events_url":"https://api.github.com/repos/bocoup/threeflows/issues/events{/number}","events_url":"https://api.github.com/repos/bocoup/threeflows/events","assignees_url":"https://api.github.com/repos/bocoup/threeflows/assignees{/user}","branches_url":"https://api.github.com/repos/bocoup/threeflows/branches{/branch}","tags_url":"https://api.github.com/repos/bocoup/threeflows/tags","blobs_url":"https://api.github.com/repos/bocoup/threeflows/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bocoup/threeflows/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bocoup/threeflows/git/refs{/sha}","trees_url":"https://api.github.com/repos/bocoup/threeflows/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bocoup/threeflows/statuses/{sha}","languages_url":"https://api.github.com/repos/bocoup/threeflows/languages","stargazers_url":"https://api.github.com/repos/bocoup/threeflows/stargazers","contributors_url":"https://api.github.com/repos/bocoup/threeflows/contributors","subscribers_url":"https://api.github.com/repos/bocoup/threeflows/subscribers","subscription_url":"https://api.github.com/repos/bocoup/threeflows/subscription","commits_url":"https://api.github.com/repos/bocoup/threeflows/commits{/sha}","git_commits_url":"https://api.github.com/repos/bocoup/threeflows/git/commits{/sha}","comments_url":"https://api.github.com/repos/bocoup/threeflows/comments{/number}","issue_comment_url":"https://api.github.com/repos/bocoup/threeflows/issues/comments{/number}","contents_url":"https://api.github.com/repos/bocoup/threeflows/contents/{+path}","compare_url":"https://api.github.com/repos/bocoup/threeflows/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bocoup/threeflows/merges","archive_url":"https://api.github.com/repos/bocoup/threeflows/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bocoup/threeflows/downloads","issues_url":"https://api.github.com/repos/bocoup/threeflows/issues{/number}","pulls_url":"https://api.github.com/repos/bocoup/threeflows/pulls{/number}","milestones_url":"https://api.github.com/repos/bocoup/threeflows/milestones{/number}","notifications_url":"https://api.github.com/repos/bocoup/threeflows/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bocoup/threeflows/labels{/name}","releases_url":"https://api.github.com/repos/bocoup/threeflows/releases{/id}","deployments_url":"https://api.github.com/repos/bocoup/threeflows/deployments","created_at":"2019-08-20T16:00:42Z","updated_at":"2019-11-14T15:59:05Z","pushed_at":"2019-11-18T13:23:20Z","git_url":"git://github.com/bocoup/threeflows.git","ssh_url":"git@github.com:bocoup/threeflows.git","clone_url":"https://github.com/bocoup/threeflows.git","svn_url":"https://github.com/bocoup/threeflows","homepage":"https://tsl.mit.edu/","size":709,"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":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":0,"default_branch":"teacher-moments"}},"base":{"label":"bocoup:teacher-moments","ref":"teacher-moments","sha":"870a21cac6942eb73e8dd3d548449b18daa30c62","user":{"login":"bocoup","id":497466,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NzQ2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/497466?v=4","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"repo":{"id":203409277,"node_id":"MDEwOlJlcG9zaXRvcnkyMDM0MDkyNzc=","name":"threeflows","full_name":"bocoup/threeflows","private":false,"owner":{"login":"bocoup","id":497466,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NzQ2Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/497466?v=4","gravatar_id":"","url":"https://api.github.com/users/bocoup","html_url":"https://github.com/bocoup","followers_url":"https://api.github.com/users/bocoup/followers","following_url":"https://api.github.com/users/bocoup/following{/other_user}","gists_url":"https://api.github.com/users/bocoup/gists{/gist_id}","starred_url":"https://api.github.com/users/bocoup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bocoup/subscriptions","organizations_url":"https://api.github.com/users/bocoup/orgs","repos_url":"https://api.github.com/users/bocoup/repos","events_url":"https://api.github.com/users/bocoup/events{/privacy}","received_events_url":"https://api.github.com/users/bocoup/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bocoup/threeflows","description":"Practice spaces for teacher preparation programs","fork":true,"url":"https://api.github.com/repos/bocoup/threeflows","forks_url":"https://api.github.com/repos/bocoup/threeflows/forks","keys_url":"https://api.github.com/repos/bocoup/threeflows/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bocoup/threeflows/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bocoup/threeflows/teams","hooks_url":"https://api.github.com/repos/bocoup/threeflows/hooks","issue_events_url":"https://api.github.com/repos/bocoup/threeflows/issues/events{/number}","events_url":"https://api.github.com/repos/bocoup/threeflows/events","assignees_url":"https://api.github.com/repos/bocoup/threeflows/assignees{/user}","branches_url":"https://api.github.com/repos/bocoup/threeflows/branches{/branch}","tags_url":"https://api.github.com/repos/bocoup/threeflows/tags","blobs_url":"https://api.github.com/repos/bocoup/threeflows/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bocoup/threeflows/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bocoup/threeflows/git/refs{/sha}","trees_url":"https://api.github.com/repos/bocoup/threeflows/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bocoup/threeflows/statuses/{sha}","languages_url":"https://api.github.com/repos/bocoup/threeflows/languages","stargazers_url":"https://api.github.com/repos/bocoup/threeflows/stargazers","contributors_url":"https://api.github.com/repos/bocoup/threeflows/contributors","subscribers_url":"https://api.github.com/repos/bocoup/threeflows/subscribers","subscription_url":"https://api.github.com/repos/bocoup/threeflows/subscription","commits_url":"https://api.github.com/repos/bocoup/threeflows/commits{/sha}","git_commits_url":"https://api.github.com/repos/bocoup/threeflows/git/commits{/sha}","comments_url":"https://api.github.com/repos/bocoup/threeflows/comments{/number}","issue_comment_url":"https://api.github.com/repos/bocoup/threeflows/issues/comments{/number}","contents_url":"https://api.github.com/repos/bocoup/threeflows/contents/{+path}","compare_url":"https://api.github.com/repos/bocoup/threeflows/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bocoup/threeflows/merges","archive_url":"https://api.github.com/repos/bocoup/threeflows/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bocoup/threeflows/downloads","issues_url":"https://api.github.com/repos/bocoup/threeflows/issues{/number}","pulls_url":"https://api.github.com/repos/bocoup/threeflows/pulls{/number}","milestones_url":"https://api.github.com/repos/bocoup/threeflows/milestones{/number}","notifications_url":"https://api.github.com/repos/bocoup/threeflows/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bocoup/threeflows/labels{/name}","releases_url":"https://api.github.com/repos/bocoup/threeflows/releases{/id}","deployments_url":"https://api.github.com/repos/bocoup/threeflows/deployments","created_at":"2019-08-20T16:00:42Z","updated_at":"2019-11-14T15:59:05Z","pushed_at":"2019-11-18T13:23:20Z","git_url":"git://github.com/bocoup/threeflows.git","ssh_url":"git@github.com:bocoup/threeflows.git","clone_url":"https://github.com/bocoup/threeflows.git","svn_url":"https://github.com/bocoup/threeflows","homepage":"https://tsl.mit.edu/","size":709,"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":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":0,"default_branch":"teacher-moments"}},"_links":{"self":{"href":"https://api.github.com/repos/bocoup/threeflows/pulls/130"},"html":{"href":"https://github.com/bocoup/threeflows/pull/130"},"issue":{"href":"https://api.github.com/repos/bocoup/threeflows/issues/130"},"comments":{"href":"https://api.github.com/repos/bocoup/threeflows/issues/130/comments"},"review_comments":{"href":"https://api.github.com/repos/bocoup/threeflows/pulls/130/comments"},"review_comment":{"href":"https://api.github.com/repos/bocoup/threeflows/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bocoup/threeflows/pulls/130/commits"},"statuses":{"href":"https://api.github.com/repos/bocoup/threeflows/statuses/8ad584d4fdcddfbced56ea8d3f9706d56c26038d"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"ktbee"}}