{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/64291484","id":64291484,"diff_hunk":"@@ -137,34 +158,26 @@ oppia.factory('routerService', [\n       },\n       navigateToMainTab: function(stateName) {\n         _savePendingChanges();\n-\n         if (_getCurrentStateFromLocationPath() === stateName) {\n           return;\n         }\n \n-        var _actuallyNavigate = function(newStateName) {\n-          if (newStateName) {\n-            editorContextService.setActiveStateName(newStateName);\n-          }\n-          $location.path('/gui/' + editorContextService.getActiveStateName());\n-          $window.scrollTo(0, 0);\n-        };\n-\n         if (_tabs.active === MAIN_TAB) {\n           $('.oppia-editor-cards-container').fadeOut(function() {\n-            _actuallyNavigate(stateName);\n+            _actuallyNavigate(SLUG_GUI, stateName);\n             $rootScope.$apply();\n             $timeout(function() {\n               $('.oppia-editor-cards-container').fadeIn();\n             }, 150);\n           });\n         } else {\n-          _actuallyNavigate(stateName);\n+          _actuallyNavigate(SLUG_GUI, stateName);\n         }\n       },\n       navigateToPreviewTab: function() {\n-        _savePendingChanges();\n-        $location.path('/preview');\n+        if (_tabs.active !== PREVIEW_TAB) {","path":"core/templates/dev/head/exploration_editor/RouterServices.js","position":136,"original_position":136,"commit_id":"26fb005ec5468c1252ab7aaa4356dba714a8da46","original_commit_id":"26fb005ec5468c1252ab7aaa4356dba714a8da46","user":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"body":"Oh, interesting. I'm not sure. How about, for now, just restoring it anyway, but adding a comment above it:\r\n\r\n  TODO(oparry): Determine whether this is necessary, since there's already a $rootScope.$broadcast('externalSave') in line 56\r\n\r\n(note that the name next to the TODO refers to who is reporting it, not who should do it). Also, please file an issue on GitHub about this so we don't forget to look into it.\r\n\r\nThanks!\r\n\r\n","created_at":"2016-05-23T21:21:41Z","updated_at":"2016-05-23T21:21:41Z","html_url":"https://github.com/oppia/oppia/pull/1724#discussion_r64291484","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/1724","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/64291484"},"html":{"href":"https://github.com/oppia/oppia/pull/1724#discussion_r64291484"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1724"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/1724","id":66172355,"html_url":"https://github.com/oppia/oppia/pull/1724","diff_url":"https://github.com/oppia/oppia/pull/1724.diff","patch_url":"https://github.com/oppia/oppia/pull/1724.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/1724","number":1724,"state":"open","locked":false,"title":"Fix milestone 1 of #921: allow jumping to a particular state in preview mode","user":{"login":"oparry","id":9349009,"avatar_url":"https://avatars.githubusercontent.com/u/9349009?v=3","gravatar_id":"","url":"https://api.github.com/users/oparry","html_url":"https://github.com/oparry","followers_url":"https://api.github.com/users/oparry/followers","following_url":"https://api.github.com/users/oparry/following{/other_user}","gists_url":"https://api.github.com/users/oparry/gists{/gist_id}","starred_url":"https://api.github.com/users/oparry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oparry/subscriptions","organizations_url":"https://api.github.com/users/oparry/orgs","repos_url":"https://api.github.com/users/oparry/repos","events_url":"https://api.github.com/users/oparry/events{/privacy}","received_events_url":"https://api.github.com/users/oparry/received_events","type":"User","site_admin":false},"body":"\r\n\r\nStay on the same state of an exploration when switching between edit and preview modes. (Milestone 1 of #921).\r\n\r\n    When switching to preview, the URL is constructed using the current state name.\r\n    The URL is reconstructed when moving to the next state in preview mode (correct answer submitted).\r\n    When a preview URL is detected, the state name is extracted and the preview tab is refreshed accordingly.\r\n\r\nExplorations with parameters are not properly handled yet, so 3. always begins the preview in the initial state. N.B. - the URL is still constructed using the active state, so it is wrong until returning to edit mode or moving on to the next state.\r\n","created_at":"2016-04-12T14:57:06Z","updated_at":"2016-05-23T21:21:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6f08404a813fdac69d750e04d0787437bfd2325","assignee":{"login":"seanlip","id":10575562,"avatar_url":"https://avatars.githubusercontent.com/u/10575562?v=3","gravatar_id":"","url":"https://api.github.com/users/seanlip","html_url":"https://github.com/seanlip","followers_url":"https://api.github.com/users/seanlip/followers","following_url":"https://api.github.com/users/seanlip/following{/other_user}","gists_url":"https://api.github.com/users/seanlip/gists{/gist_id}","starred_url":"https://api.github.com/users/seanlip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanlip/subscriptions","organizations_url":"https://api.github.com/users/seanlip/orgs","repos_url":"https://api.github.com/users/seanlip/repos","events_url":"https://api.github.com/users/seanlip/events{/privacy}","received_events_url":"https://api.github.com/users/seanlip/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/oppia/oppia/pulls/1724/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/1724/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/1724/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/26fb005ec5468c1252ab7aaa4356dba714a8da46","head":{"label":"oparry:jump-to-state-in-preview-mode","ref":"jump-to-state-in-preview-mode","sha":"26fb005ec5468c1252ab7aaa4356dba714a8da46","user":{"login":"oparry","id":9349009,"avatar_url":"https://avatars.githubusercontent.com/u/9349009?v=3","gravatar_id":"","url":"https://api.github.com/users/oparry","html_url":"https://github.com/oparry","followers_url":"https://api.github.com/users/oparry/followers","following_url":"https://api.github.com/users/oparry/following{/other_user}","gists_url":"https://api.github.com/users/oparry/gists{/gist_id}","starred_url":"https://api.github.com/users/oparry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oparry/subscriptions","organizations_url":"https://api.github.com/users/oparry/orgs","repos_url":"https://api.github.com/users/oparry/repos","events_url":"https://api.github.com/users/oparry/events{/privacy}","received_events_url":"https://api.github.com/users/oparry/received_events","type":"User","site_admin":false},"repo":{"id":50875219,"name":"oppia","full_name":"oparry/oppia","owner":{"login":"oparry","id":9349009,"avatar_url":"https://avatars.githubusercontent.com/u/9349009?v=3","gravatar_id":"","url":"https://api.github.com/users/oparry","html_url":"https://github.com/oparry","followers_url":"https://api.github.com/users/oparry/followers","following_url":"https://api.github.com/users/oparry/following{/other_user}","gists_url":"https://api.github.com/users/oparry/gists{/gist_id}","starred_url":"https://api.github.com/users/oparry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oparry/subscriptions","organizations_url":"https://api.github.com/users/oparry/orgs","repos_url":"https://api.github.com/users/oparry/repos","events_url":"https://api.github.com/users/oparry/events{/privacy}","received_events_url":"https://api.github.com/users/oparry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oparry/oppia","description":"Tool for collaboratively building intelligent tutors.","fork":true,"url":"https://api.github.com/repos/oparry/oppia","forks_url":"https://api.github.com/repos/oparry/oppia/forks","keys_url":"https://api.github.com/repos/oparry/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oparry/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oparry/oppia/teams","hooks_url":"https://api.github.com/repos/oparry/oppia/hooks","issue_events_url":"https://api.github.com/repos/oparry/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oparry/oppia/events","assignees_url":"https://api.github.com/repos/oparry/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oparry/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oparry/oppia/tags","blobs_url":"https://api.github.com/repos/oparry/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oparry/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oparry/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oparry/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oparry/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oparry/oppia/languages","stargazers_url":"https://api.github.com/repos/oparry/oppia/stargazers","contributors_url":"https://api.github.com/repos/oparry/oppia/contributors","subscribers_url":"https://api.github.com/repos/oparry/oppia/subscribers","subscription_url":"https://api.github.com/repos/oparry/oppia/subscription","commits_url":"https://api.github.com/repos/oparry/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oparry/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oparry/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oparry/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oparry/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oparry/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oparry/oppia/merges","archive_url":"https://api.github.com/repos/oparry/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oparry/oppia/downloads","issues_url":"https://api.github.com/repos/oparry/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oparry/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oparry/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oparry/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oparry/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oparry/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/oparry/oppia/deployments","created_at":"2016-02-01T22:12:51Z","updated_at":"2016-02-01T22:12:54Z","pushed_at":"2016-05-23T11:53:29Z","git_url":"git://github.com/oparry/oppia.git","ssh_url":"git@github.com:oparry/oppia.git","clone_url":"https://github.com/oparry/oppia.git","svn_url":"https://github.com/oparry/oppia","homepage":"https://www.oppia.org","size":43711,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"develop"}},"base":{"label":"oppia:develop","ref":"develop","sha":"182d64c2231bc0b27d5b3a56124ef06878dd565f","user":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"repo":{"id":40687563,"name":"oppia","full_name":"oppia/oppia","owner":{"login":"oppia","id":11620230,"avatar_url":"https://avatars.githubusercontent.com/u/11620230?v=3","gravatar_id":"","url":"https://api.github.com/users/oppia","html_url":"https://github.com/oppia","followers_url":"https://api.github.com/users/oppia/followers","following_url":"https://api.github.com/users/oppia/following{/other_user}","gists_url":"https://api.github.com/users/oppia/gists{/gist_id}","starred_url":"https://api.github.com/users/oppia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oppia/subscriptions","organizations_url":"https://api.github.com/users/oppia/orgs","repos_url":"https://api.github.com/users/oppia/repos","events_url":"https://api.github.com/users/oppia/events{/privacy}","received_events_url":"https://api.github.com/users/oppia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oppia/oppia","description":"Tool for collaboratively building intelligent tutors.","fork":false,"url":"https://api.github.com/repos/oppia/oppia","forks_url":"https://api.github.com/repos/oppia/oppia/forks","keys_url":"https://api.github.com/repos/oppia/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oppia/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oppia/oppia/teams","hooks_url":"https://api.github.com/repos/oppia/oppia/hooks","issue_events_url":"https://api.github.com/repos/oppia/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/oppia/oppia/events","assignees_url":"https://api.github.com/repos/oppia/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/oppia/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/oppia/oppia/tags","blobs_url":"https://api.github.com/repos/oppia/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oppia/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oppia/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/oppia/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/oppia/oppia/languages","stargazers_url":"https://api.github.com/repos/oppia/oppia/stargazers","contributors_url":"https://api.github.com/repos/oppia/oppia/contributors","subscribers_url":"https://api.github.com/repos/oppia/oppia/subscribers","subscription_url":"https://api.github.com/repos/oppia/oppia/subscription","commits_url":"https://api.github.com/repos/oppia/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/oppia/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/oppia/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/oppia/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/oppia/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/oppia/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oppia/oppia/merges","archive_url":"https://api.github.com/repos/oppia/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oppia/oppia/downloads","issues_url":"https://api.github.com/repos/oppia/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/oppia/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/oppia/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/oppia/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oppia/oppia/labels{/name}","releases_url":"https://api.github.com/repos/oppia/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/oppia/oppia/deployments","created_at":"2015-08-14T00:16:14Z","updated_at":"2016-05-23T18:19:56Z","pushed_at":"2016-05-23T18:50:12Z","git_url":"git://github.com/oppia/oppia.git","ssh_url":"git@github.com:oppia/oppia.git","clone_url":"https://github.com/oppia/oppia.git","svn_url":"https://github.com/oppia/oppia","homepage":"https://www.oppia.org","size":76745,"stargazers_count":131,"watchers_count":131,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":215,"mirror_url":null,"open_issues_count":292,"forks":215,"open_issues":292,"watchers":131,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1724"},"html":{"href":"https://github.com/oppia/oppia/pull/1724"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/1724"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/1724/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1724/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/1724/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/26fb005ec5468c1252ab7aaa4356dba714a8da46"}}}}
{"actor":{"display_login":"seanlip"}}