GitHub PullRequestReviewCommentEvent at 2014-10-02 22:57:44
Repository: angular.js
Actor: caitp
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.js/pulls/comments/18373285","id":18373285,"diff_hunk":"@@ -232,9 +305,39 @@ var $AnimateProvider = ['$provide', function($provide) {\n        * @return {Promise} the animation callback promise\n        */\n       setClass : function(element, add, remove) {\n-        this.addClass(element, add);\n-        this.removeClass(element, remove);\n-        return asyncPromise();\n+        var self = this;\n+        var STORAGE_KEY = '$$animateClasses';\n+        element = extractElementNodes(jqLite(element));\n+\n+        add = isArray(add) ? add : add.split(' ');\n+        remove = isArray(remove) ? remove : remove.split(' ');\n+\n+        var cache = element.data(STORAGE_KEY);\n+        if (cache) {\n+          cache.add = cache.add.concat(add);\n+          cache.remove = cache.remove.concat(remove);\n+          //the digest cycle will combine all the animations into one function\n+          return cache.promise;\n+        } else {\n+          element.data(STORAGE_KEY, cache = {\n+            add : add,\n+            remove : remove\n+          });\n+        }\n+\n+        return cache.promise = runAnimationPostDigest(function(done) {\n+          var cache = element.data(STORAGE_KEY);\n+          element.removeData(STORAGE_KEY);\n+\n+          var classes = cache && resolveElementClasses(element, cache);\n+\n+          if (classes) {\n+            if (classes[0].length) self.$$addClassImmediately(element, classes[0]);","path":"src/ng/animate.js","position":140,"original_position":140,"commit_id":"7c14dbb30a64829029e30648888b98e146c3e3ec","original_commit_id":"7c14dbb30a64829029e30648888b98e146c3e3ec","user":{"login":"caitp","id":2294695,"avatar_url":"https://avatars.githubusercontent.com/u/2294695?v=2","gravatar_id":"","url":"https://api.github.com/users/caitp","html_url":"https://github.com/caitp","followers_url":"https://api.github.com/users/caitp/followers","following_url":"https://api.github.com/users/caitp/following{/other_user}","gists_url":"https://api.github.com/users/caitp/gists{/gist_id}","starred_url":"https://api.github.com/users/caitp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caitp/subscriptions","organizations_url":"https://api.github.com/users/caitp/orgs","repos_url":"https://api.github.com/users/caitp/repos","events_url":"https://api.github.com/users/caitp/events{/privacy}","received_events_url":"https://api.github.com/users/caitp/received_events","type":"User","site_admin":false},"body":"works for me --- that would mean a change in ngAnimate too so that they're consistent","created_at":"2014-10-02T22:57:44Z","updated_at":"2014-10-02T22:57:44Z","html_url":"https://github.com/angular/angular.js/pull/9283#discussion_r18373285","pull_request_url":"https://api.github.com/repos/angular/angular.js/pulls/9283","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/18373285"},"html":{"href":"https://github.com/angular/angular.js/pull/9283#discussion_r18373285"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.js/pulls/9283"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.js/pulls/9283","id":21819933,"html_url":"https://github.com/angular/angular.js/pull/9283","diff_url":"https://github.com/angular/angular.js/pull/9283.diff","patch_url":"https://github.com/angular/angular.js/pull/9283.patch","issue_url":"https://api.github.com/repos/angular/angular.js/issues/9283","number":9283,"state":"open","locked":false,"title":"fix(ngAnimate): defer DOM operations for changing classes to postDigest","user":{"login":"caitp","id":2294695,"avatar_url":"https://avatars.githubusercontent.com/u/2294695?v=2","gravatar_id":"","url":"https://api.github.com/users/caitp","html_url":"https://github.com/caitp","followers_url":"https://api.github.com/users/caitp/followers","following_url":"https://api.github.com/users/caitp/following{/other_user}","gists_url":"https://api.github.com/users/caitp/gists{/gist_id}","starred_url":"https://api.github.com/users/caitp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caitp/subscriptions","organizations_url":"https://api.github.com/users/caitp/orgs","repos_url":"https://api.github.com/users/caitp/repos","events_url":"https://api.github.com/users/caitp/events{/privacy}","received_events_url":"https://api.github.com/users/caitp/received_events","type":"User","site_admin":false},"body":"When ngAnimate is used, it will defer changes to classes until postDigest.\nPreviously, AngularJS (when ngAnimate is not loaded) would always immediately\nperform these DOM operations.\n\nNow, even when the ngAnimate module is not used, if $rootScope is in the midst\nof a digest, class manipulation is deferred. This helps reduce jank in\nbrowsers such as IE11.\n\n/CC @tbosch --- alternative/more general fix here\n\nCloses #8234\nCloses #9263","created_at":"2014-09-25T23:28:41Z","updated_at":"2014-10-02T22:57:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b27ace6f471747a950ccaf302928e508785adce","assignee":{"login":"tbosch","id":690815,"avatar_url":"https://avatars.githubusercontent.com/u/690815?v=2","gravatar_id":"","url":"https://api.github.com/users/tbosch","html_url":"https://github.com/tbosch","followers_url":"https://api.github.com/users/tbosch/followers","following_url":"https://api.github.com/users/tbosch/following{/other_user}","gists_url":"https://api.github.com/users/tbosch/gists{/gist_id}","starred_url":"https://api.github.com/users/tbosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbosch/subscriptions","organizations_url":"https://api.github.com/users/tbosch/orgs","repos_url":"https://api.github.com/users/tbosch/repos","events_url":"https://api.github.com/users/tbosch/events{/privacy}","received_events_url":"https://api.github.com/users/tbosch/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/68","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/68/labels","id":807522,"number":68,"title":"1.3.0-rc.5","description":"","creator":{"login":"jeffbcross","id":463703,"avatar_url":"https://avatars.githubusercontent.com/u/463703?v=2","gravatar_id":"","url":"https://api.github.com/users/jeffbcross","html_url":"https://github.com/jeffbcross","followers_url":"https://api.github.com/users/jeffbcross/followers","following_url":"https://api.github.com/users/jeffbcross/following{/other_user}","gists_url":"https://api.github.com/users/jeffbcross/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbcross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbcross/subscriptions","organizations_url":"https://api.github.com/users/jeffbcross/orgs","repos_url":"https://api.github.com/users/jeffbcross/repos","events_url":"https://api.github.com/users/jeffbcross/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbcross/received_events","type":"User","site_admin":false},"open_issues":56,"closed_issues":12,"state":"open","created_at":"2014-09-29T23:19:19Z","updated_at":"2014-10-02T21:37:53Z","due_on":"2014-10-06T07:00:00Z"},"commits_url":"https://api.github.com/repos/angular/angular.js/pulls/9283/commits","review_comments_url":"https://api.github.com/repos/angular/angular.js/pulls/9283/comments","review_comment_url":"https://api.github.com/repos/angular/angular.js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/9283/comments","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/7c14dbb30a64829029e30648888b98e146c3e3ec","head":{"label":"caitp:issue-8234-2","ref":"issue-8234-2","sha":"7c14dbb30a64829029e30648888b98e146c3e3ec","user":{"login":"caitp","id":2294695,"avatar_url":"https://avatars.githubusercontent.com/u/2294695?v=2","gravatar_id":"","url":"https://api.github.com/users/caitp","html_url":"https://github.com/caitp","followers_url":"https://api.github.com/users/caitp/followers","following_url":"https://api.github.com/users/caitp/following{/other_user}","gists_url":"https://api.github.com/users/caitp/gists{/gist_id}","starred_url":"https://api.github.com/users/caitp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caitp/subscriptions","organizations_url":"https://api.github.com/users/caitp/orgs","repos_url":"https://api.github.com/users/caitp/repos","events_url":"https://api.github.com/users/caitp/events{/privacy}","received_events_url":"https://api.github.com/users/caitp/received_events","type":"User","site_admin":false},"repo":{"id":12836214,"name":"angular.js","full_name":"caitp/angular.js","owner":{"login":"caitp","id":2294695,"avatar_url":"https://avatars.githubusercontent.com/u/2294695?v=2","gravatar_id":"","url":"https://api.github.com/users/caitp","html_url":"https://github.com/caitp","followers_url":"https://api.github.com/users/caitp/followers","following_url":"https://api.github.com/users/caitp/following{/other_user}","gists_url":"https://api.github.com/users/caitp/gists{/gist_id}","starred_url":"https://api.github.com/users/caitp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caitp/subscriptions","organizations_url":"https://api.github.com/users/caitp/orgs","repos_url":"https://api.github.com/users/caitp/repos","events_url":"https://api.github.com/users/caitp/events{/privacy}","received_events_url":"https://api.github.com/users/caitp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caitp/angular.js","description":"","fork":true,"url":"https://api.github.com/repos/caitp/angular.js","forks_url":"https://api.github.com/repos/caitp/angular.js/forks","keys_url":"https://api.github.com/repos/caitp/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caitp/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caitp/angular.js/teams","hooks_url":"https://api.github.com/repos/caitp/angular.js/hooks","issue_events_url":"https://api.github.com/repos/caitp/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/caitp/angular.js/events","assignees_url":"https://api.github.com/repos/caitp/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/caitp/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/caitp/angular.js/tags","blobs_url":"https://api.github.com/repos/caitp/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caitp/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caitp/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/caitp/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caitp/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/caitp/angular.js/languages","stargazers_url":"https://api.github.com/repos/caitp/angular.js/stargazers","contributors_url":"https://api.github.com/repos/caitp/angular.js/contributors","subscribers_url":"https://api.github.com/repos/caitp/angular.js/subscribers","subscription_url":"https://api.github.com/repos/caitp/angular.js/subscription","commits_url":"https://api.github.com/repos/caitp/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/caitp/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/caitp/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/caitp/angular.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/caitp/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/caitp/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caitp/angular.js/merges","archive_url":"https://api.github.com/repos/caitp/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caitp/angular.js/downloads","issues_url":"https://api.github.com/repos/caitp/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/caitp/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/caitp/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/caitp/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caitp/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/caitp/angular.js/releases{/id}","created_at":"2013-09-14T21:16:31Z","updated_at":"2014-06-25T03:24:39Z","pushed_at":"2014-10-02T18:14:10Z","git_url":"git://github.com/caitp/angular.js.git","ssh_url":"git@github.com:caitp/angular.js.git","clone_url":"https://github.com/caitp/angular.js.git","svn_url":"https://github.com/caitp/angular.js","homepage":"http://angularjs.org","size":63099,"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":"angular:master","ref":"master","sha":"f2942447c1ce88106951040a116f84006dccd987","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=2","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":460078,"name":"angular.js","full_name":"angular/angular.js","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=2","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular.js","description":"HTML enhanced for web apps","fork":false,"url":"https://api.github.com/repos/angular/angular.js","forks_url":"https://api.github.com/repos/angular/angular.js/forks","keys_url":"https://api.github.com/repos/angular/angular.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.js/teams","hooks_url":"https://api.github.com/repos/angular/angular.js/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.js/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.js/events","assignees_url":"https://api.github.com/repos/angular/angular.js/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.js/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.js/tags","blobs_url":"https://api.github.com/repos/angular/angular.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.js/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.js/languages","stargazers_url":"https://api.github.com/repos/angular/angular.js/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.js/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.js/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.js/subscription","commits_url":"https://api.github.com/repos/angular/angular.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/angular/angular.js/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.js/merges","archive_url":"https://api.github.com/repos/angular/angular.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.js/downloads","issues_url":"https://api.github.com/repos/angular/angular.js/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.js/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.js/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.js/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.js/releases{/id}","created_at":"2010-01-06T00:34:37Z","updated_at":"2014-10-02T22:25:55Z","pushed_at":"2014-10-02T22:57:14Z","git_url":"git://github.com/angular/angular.js.git","ssh_url":"git@github.com:angular/angular.js.git","clone_url":"https://github.com/angular/angular.js.git","svn_url":"https://github.com/angular/angular.js","homepage":"http://angularjs.org","size":236487,"stargazers_count":29407,"watchers_count":29407,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11027,"mirror_url":null,"open_issues_count":1164,"forks":11027,"open_issues":1164,"watchers":29407,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.js/pulls/9283"},"html":{"href":"https://github.com/angular/angular.js/pull/9283"},"issue":{"href":"https://api.github.com/repos/angular/angular.js/issues/9283"},"comments":{"href":"https://api.github.com/repos/angular/angular.js/issues/9283/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.js/pulls/9283/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.js/pulls/9283/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.js/statuses/7c14dbb30a64829029e30648888b98e146c3e3ec"}}}}