{"action":"created","comment":{"url":"https://api.github.com/repos/oppia/oppia/pulls/comments/85669560","pull_request_review_id":6371835,"id":85669560,"diff_hunk":"@@ -0,0 +1,140 @@\n+oppia.animation('.conversation-skin-responses-animate-slide', function() {\n+  return {\n+    removeClass: function(element, className, done) {\n+      if (className !== 'ng-hide') {\n+        done();\n+        return;\n+      }\n+      element.hide().slideDown(400, done);\n+    },\n+    addClass: function(element, className, done) {\n+      if (className !== 'ng-hide') {\n+        done();\n+        return;\n+      }\n+      element.slideUp(400, done);\n+    }\n+  };\n+});\n+\n+oppia.animation('.conversation-skin-animate-tutor-card-content', function() {\n+  var animateCardChange = function(element, className, done) {\n+    if (className !== 'animate-card-change') {\n+      return;\n+    }\n+\n+    var currentHeight = element.height();\n+    var expectedNextHeight = $(\n+      '.conversation-skin-future-tutor-card ' +\n+      '.conversation-skin-tutor-card-content'\n+    ).height();\n+\n+    // Fix the current card height, so that it does not change during the\n+    // animation, even though its contents might.\n+    element.css('height', currentHeight);\n+\n+    jQuery(element).animate({\n+      opacity: 0\n+    }, TIME_FADEOUT_MSEC).animate({\n+      height: expectedNextHeight\n+    }, TIME_HEIGHT_CHANGE_MSEC).animate({\n+      opacity: 1\n+    }, TIME_FADEIN_MSEC, function() {\n+      element.css('height', '');\n+      done();\n+    });\n+\n+    return function(cancel) {\n+      if (cancel) {\n+        element.css('opacity', '1.0');\n+        element.css('height', '');\n+        element.stop();\n+      }\n+    };\n+  };\n+\n+  return {\n+    addClass: animateCardChange\n+  };\n+});\n+\n+oppia.directive('tutorCard', [function() {\n+  return {\n+    restrict: 'E',\n+    scope: {\n+      startCardChangeAnimation: '=',\n+      showNextCard: '&',\n+      showSupplementalCard: '&'\n+    },\n+    templateUrl: 'components/TutorCard',\n+    controller: [\n+    '$scope', 'oppiaPlayerService', 'UrlInterpolationService',\n+    'playerPositionService', 'playerTranscriptService',\n+    'ExplorationObjectFactory', 'windowDimensionsService',\n+    function($scope, oppiaPlayerService, UrlInterpolationService,\n+      playerPositionService, playerTranscriptService, explorationObjectFactory,\n+      windowDimensionsService) {\n+      var CONTENT_FOCUS_LABEL_PREFIX = 'content-focus-label-';\n+      var TWO_CARD_THRESHOLD_PX = 960;\n+\n+      var updateActiveCard = function() {\n+        var index = playerPositionService.getActiveCardIndex();\n+        if (index === null) {\n+          return;\n+        }\n+\n+        var exploration = explorationObjectFactory.get();\n+        $scope.arePreviousResponsesShown = false;\n+        $scope.activeCard = playerTranscriptService.getCard(index);\n+        $scope.isInteractionInline = exploration.isInteractionInline(\n+          $scope.activeCard.stateName);\n+        $scope.interactionInstructions = exploration.getInteractionInstructions(\n+          $scope.activeCard.stateName);\n+      };\n+\n+      $scope.arePreviousResponsesShown = false;\n+\n+      $scope.OPPIA_AVATAR_IMAGE_URL = (\n+        UrlInterpolationService.getStaticImageUrl(\n+          '/avatar/oppia_black_72px.png'));\n+\n+      $scope.profilePicture = (UrlInterpolationService.getStaticImageUrl(\n+          '/avatar/user_blue_72px.png'));\n+\n+      oppiaPlayerService.getUserProfileImage().then(function(result) {\n+        $scope.profilePicture = result;\n+      });\n+\n+      $scope.getContentFocusLabel = function(index) {\n+        return CONTENT_FOCUS_LABEL_PREFIX + index;\n+      };\n+\n+      $scope.toggleShowPreviousResponses = function() {\n+        $scope.arePreviousResponsesShown = !$scope.arePreviousResponsesShown;\n+      };\n+\n+      $scope.isViewportNarrow = function() {\n+        return windowDimensionsService.getWidth() < TWO_CARD_THRESHOLD_PX;\n+      };\n+\n+      $scope.submitAnswer = function(answer, interactionRulesService) {\n+        $scope.$parent.submitAnswer(answer, interactionRulesService);","path":"core/templates/dev/head/pages/exploration_player/TutorCardDirective.js","position":121,"original_position":121,"commit_id":"731c693e3330f5962f5a7aa38883fc99321afd17","original_commit_id":"731c693e3330f5962f5a7aa38883fc99321afd17","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":"Never use $parent. Pass the function in if you need to, or call a service directly?","created_at":"2016-10-30T21:19:04Z","updated_at":"2016-10-30T21:24:56Z","html_url":"https://github.com/oppia/oppia/pull/2668#discussion_r85669560","pull_request_url":"https://api.github.com/repos/oppia/oppia/pulls/2668","_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments/85669560"},"html":{"href":"https://github.com/oppia/oppia/pull/2668#discussion_r85669560"},"pull_request":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2668"}}},"pull_request":{"url":"https://api.github.com/repos/oppia/oppia/pulls/2668","id":91523465,"html_url":"https://github.com/oppia/oppia/pull/2668","diff_url":"https://github.com/oppia/oppia/pull/2668.diff","patch_url":"https://github.com/oppia/oppia/pull/2668.patch","issue_url":"https://api.github.com/repos/oppia/oppia/issues/2668","number":2668,"state":"open","locked":false,"title":"Fix #2650: Refactor learner view","user":{"login":"maitbayev","id":5602283,"avatar_url":"https://avatars.githubusercontent.com/u/5602283?v=3","gravatar_id":"","url":"https://api.github.com/users/maitbayev","html_url":"https://github.com/maitbayev","followers_url":"https://api.github.com/users/maitbayev/followers","following_url":"https://api.github.com/users/maitbayev/following{/other_user}","gists_url":"https://api.github.com/users/maitbayev/gists{/gist_id}","starred_url":"https://api.github.com/users/maitbayev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maitbayev/subscriptions","organizations_url":"https://api.github.com/users/maitbayev/orgs","repos_url":"https://api.github.com/users/maitbayev/repos","events_url":"https://api.github.com/users/maitbayev/events{/privacy}","received_events_url":"https://api.github.com/users/maitbayev/received_events","type":"User","site_admin":false},"body":"I think, this PR is ready for review, but might need a lot of further cleanups.\r\n","created_at":"2016-10-30T14:33:47Z","updated_at":"2016-10-30T21:24:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ed5df1e1e21c78630cd59941a17b2efc3c9eefd","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},"assignees":[{"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/2668/commits","review_comments_url":"https://api.github.com/repos/oppia/oppia/pulls/2668/comments","review_comment_url":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oppia/oppia/issues/2668/comments","statuses_url":"https://api.github.com/repos/oppia/oppia/statuses/731c693e3330f5962f5a7aa38883fc99321afd17","head":{"label":"maitbayev:tutor-card-4","ref":"tutor-card-4","sha":"731c693e3330f5962f5a7aa38883fc99321afd17","user":{"login":"maitbayev","id":5602283,"avatar_url":"https://avatars.githubusercontent.com/u/5602283?v=3","gravatar_id":"","url":"https://api.github.com/users/maitbayev","html_url":"https://github.com/maitbayev","followers_url":"https://api.github.com/users/maitbayev/followers","following_url":"https://api.github.com/users/maitbayev/following{/other_user}","gists_url":"https://api.github.com/users/maitbayev/gists{/gist_id}","starred_url":"https://api.github.com/users/maitbayev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maitbayev/subscriptions","organizations_url":"https://api.github.com/users/maitbayev/orgs","repos_url":"https://api.github.com/users/maitbayev/repos","events_url":"https://api.github.com/users/maitbayev/events{/privacy}","received_events_url":"https://api.github.com/users/maitbayev/received_events","type":"User","site_admin":false},"repo":{"id":47291248,"name":"oppia","full_name":"maitbayev/oppia","owner":{"login":"maitbayev","id":5602283,"avatar_url":"https://avatars.githubusercontent.com/u/5602283?v=3","gravatar_id":"","url":"https://api.github.com/users/maitbayev","html_url":"https://github.com/maitbayev","followers_url":"https://api.github.com/users/maitbayev/followers","following_url":"https://api.github.com/users/maitbayev/following{/other_user}","gists_url":"https://api.github.com/users/maitbayev/gists{/gist_id}","starred_url":"https://api.github.com/users/maitbayev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maitbayev/subscriptions","organizations_url":"https://api.github.com/users/maitbayev/orgs","repos_url":"https://api.github.com/users/maitbayev/repos","events_url":"https://api.github.com/users/maitbayev/events{/privacy}","received_events_url":"https://api.github.com/users/maitbayev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maitbayev/oppia","description":"Tool for collaboratively building interactive tutors.","fork":true,"url":"https://api.github.com/repos/maitbayev/oppia","forks_url":"https://api.github.com/repos/maitbayev/oppia/forks","keys_url":"https://api.github.com/repos/maitbayev/oppia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maitbayev/oppia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maitbayev/oppia/teams","hooks_url":"https://api.github.com/repos/maitbayev/oppia/hooks","issue_events_url":"https://api.github.com/repos/maitbayev/oppia/issues/events{/number}","events_url":"https://api.github.com/repos/maitbayev/oppia/events","assignees_url":"https://api.github.com/repos/maitbayev/oppia/assignees{/user}","branches_url":"https://api.github.com/repos/maitbayev/oppia/branches{/branch}","tags_url":"https://api.github.com/repos/maitbayev/oppia/tags","blobs_url":"https://api.github.com/repos/maitbayev/oppia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maitbayev/oppia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maitbayev/oppia/git/refs{/sha}","trees_url":"https://api.github.com/repos/maitbayev/oppia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maitbayev/oppia/statuses/{sha}","languages_url":"https://api.github.com/repos/maitbayev/oppia/languages","stargazers_url":"https://api.github.com/repos/maitbayev/oppia/stargazers","contributors_url":"https://api.github.com/repos/maitbayev/oppia/contributors","subscribers_url":"https://api.github.com/repos/maitbayev/oppia/subscribers","subscription_url":"https://api.github.com/repos/maitbayev/oppia/subscription","commits_url":"https://api.github.com/repos/maitbayev/oppia/commits{/sha}","git_commits_url":"https://api.github.com/repos/maitbayev/oppia/git/commits{/sha}","comments_url":"https://api.github.com/repos/maitbayev/oppia/comments{/number}","issue_comment_url":"https://api.github.com/repos/maitbayev/oppia/issues/comments{/number}","contents_url":"https://api.github.com/repos/maitbayev/oppia/contents/{+path}","compare_url":"https://api.github.com/repos/maitbayev/oppia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maitbayev/oppia/merges","archive_url":"https://api.github.com/repos/maitbayev/oppia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maitbayev/oppia/downloads","issues_url":"https://api.github.com/repos/maitbayev/oppia/issues{/number}","pulls_url":"https://api.github.com/repos/maitbayev/oppia/pulls{/number}","milestones_url":"https://api.github.com/repos/maitbayev/oppia/milestones{/number}","notifications_url":"https://api.github.com/repos/maitbayev/oppia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maitbayev/oppia/labels{/name}","releases_url":"https://api.github.com/repos/maitbayev/oppia/releases{/id}","deployments_url":"https://api.github.com/repos/maitbayev/oppia/deployments","created_at":"2015-12-02T22:01:37Z","updated_at":"2016-04-24T23:21:05Z","pushed_at":"2016-10-30T18:08:39Z","git_url":"git://github.com/maitbayev/oppia.git","ssh_url":"git@github.com:maitbayev/oppia.git","clone_url":"https://github.com/maitbayev/oppia.git","svn_url":"https://github.com/maitbayev/oppia","homepage":"https://www.oppia.org","size":47543,"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":"0f882b9670ef65f62b83b7207d8205ac15a561a0","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 interactive lessons.","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-10-29T17:23:03Z","pushed_at":"2016-10-30T20:52:07Z","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":90850,"stargazers_count":183,"watchers_count":183,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":276,"mirror_url":null,"open_issues_count":348,"forks":276,"open_issues":348,"watchers":183,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2668"},"html":{"href":"https://github.com/oppia/oppia/pull/2668"},"issue":{"href":"https://api.github.com/repos/oppia/oppia/issues/2668"},"comments":{"href":"https://api.github.com/repos/oppia/oppia/issues/2668/comments"},"review_comments":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2668/comments"},"review_comment":{"href":"https://api.github.com/repos/oppia/oppia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oppia/oppia/pulls/2668/commits"},"statuses":{"href":"https://api.github.com/repos/oppia/oppia/statuses/731c693e3330f5962f5a7aa38883fc99321afd17"}}}}
{"actor":{"display_login":"seanlip"}}