{"action":"created","comment":{"url":"https://api.github.com/repos/tootsuite/mastodon/pulls/comments/122901122","pull_request_review_id":45054132,"id":122901122,"diff_hunk":"@@ -41,16 +42,26 @@ class StatusList extends ImmutablePureComponent {\n     } else if (this.props.onScroll) {\n       this.props.onScroll();\n     }\n-  }\n+  }, 200, {\n+    trailing: true,\n+  });","path":"app/javascript/mastodon/components/status_list.js","position":24,"original_position":24,"commit_id":"8d9ebf9d1bbc98106b32e76f418287b4083af8b9","original_commit_id":"8d9ebf9d1bbc98106b32e76f418287b4083af8b9","user":{"login":"unarist","id":705555,"avatar_url":"https://avatars1.githubusercontent.com/u/705555?v=3","gravatar_id":"","url":"https://api.github.com/users/unarist","html_url":"https://github.com/unarist","followers_url":"https://api.github.com/users/unarist/followers","following_url":"https://api.github.com/users/unarist/following{/other_user}","gists_url":"https://api.github.com/users/unarist/gists{/gist_id}","starred_url":"https://api.github.com/users/unarist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unarist/subscriptions","organizations_url":"https://api.github.com/users/unarist/orgs","repos_url":"https://api.github.com/users/unarist/repos","events_url":"https://api.github.com/users/unarist/events{/privacy}","received_events_url":"https://api.github.com/users/unarist/received_events","type":"User","site_admin":false},"body":"This prevents TIMELINE_SCROLL_TOP and loading more processing until they stops scroll. For example, below (trivial?) issues will happens:\r\n\r\n- TIMELINE_SCROLL_TOP: The unread indicator won't appears when new toot received while scrolling.\r\n- loading more: Fetch request will be delayed about 200ms.","created_at":"2017-06-20T07:40:41Z","updated_at":"2017-06-20T07:40:41Z","html_url":"https://github.com/tootsuite/mastodon/pull/3832#discussion_r122901122","pull_request_url":"https://api.github.com/repos/tootsuite/mastodon/pulls/3832","_links":{"self":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/comments/122901122"},"html":{"href":"https://github.com/tootsuite/mastodon/pull/3832#discussion_r122901122"},"pull_request":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/3832"}}},"pull_request":{"url":"https://api.github.com/repos/tootsuite/mastodon/pulls/3832","id":126168767,"html_url":"https://github.com/tootsuite/mastodon/pull/3832","diff_url":"https://github.com/tootsuite/mastodon/pull/3832.diff","patch_url":"https://github.com/tootsuite/mastodon/pull/3832.patch","issue_url":"https://api.github.com/repos/tootsuite/mastodon/issues/3832","number":3832,"state":"closed","locked":false,"title":"Fix jittery scrolling for Chromium browsers (#3776)","user":{"login":"nolanlawson","id":283842,"avatar_url":"https://avatars3.githubusercontent.com/u/283842?v=3","gravatar_id":"","url":"https://api.github.com/users/nolanlawson","html_url":"https://github.com/nolanlawson","followers_url":"https://api.github.com/users/nolanlawson/followers","following_url":"https://api.github.com/users/nolanlawson/following{/other_user}","gists_url":"https://api.github.com/users/nolanlawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nolanlawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolanlawson/subscriptions","organizations_url":"https://api.github.com/users/nolanlawson/orgs","repos_url":"https://api.github.com/users/nolanlawson/repos","events_url":"https://api.github.com/users/nolanlawson/events{/privacy}","received_events_url":"https://api.github.com/users/nolanlawson/received_events","type":"User","site_admin":false},"body":"This is a partial fix for #3776 (jiggling/jittery scrolling). This PR only fixes the issue for Chrome/Chromium. Here's why:\r\n\r\nThe main issue is that `scrollTop` doesn't provide subpixel precision – only integers. So if we set the `scrollTop` to an integer then it will always cause jiggling, because it may be off by a subpixel.\r\n\r\nUnfortunately there doesn't seem to be any way to get a subpixel precision for the scroll. So the next best thing is to avoid re-setting an integer `scrollTop` when the `scrollTop` is already that exact same integer. This turns out to work for Chrome because they have [an intervention](https://www.chromestatus.com/feature/5700102471548928) to avoid moving the scroll position when elements are added to the top of a list. So the `scrollTop` is already correct; there's no reason to re-set it.\r\n\r\nSo by checking the `scrollTop` before setting it, we remove the jitter from Chrome. Unfortunately this PR does not fix Edge, Firefox, or Safari. The only way to fix the jitter in those browser (I believe) would be to avoid adding the elements entirely, e.g. similar to how Twitter does it with the \"show more tweets\" button.","created_at":"2017-06-17T21:31:09Z","updated_at":"2017-06-20T07:40:41Z","closed_at":"2017-06-18T00:59:30Z","merged_at":"2017-06-18T00:59:30Z","merge_commit_sha":"1f2abd8d672288939232cbe1e2ce063f3ab4f0b4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tootsuite/mastodon/pulls/3832/commits","review_comments_url":"https://api.github.com/repos/tootsuite/mastodon/pulls/3832/comments","review_comment_url":"https://api.github.com/repos/tootsuite/mastodon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tootsuite/mastodon/issues/3832/comments","statuses_url":"https://api.github.com/repos/tootsuite/mastodon/statuses/8d9ebf9d1bbc98106b32e76f418287b4083af8b9","head":{"label":"nolanlawson:3776","ref":"3776","sha":"8d9ebf9d1bbc98106b32e76f418287b4083af8b9","user":{"login":"nolanlawson","id":283842,"avatar_url":"https://avatars3.githubusercontent.com/u/283842?v=3","gravatar_id":"","url":"https://api.github.com/users/nolanlawson","html_url":"https://github.com/nolanlawson","followers_url":"https://api.github.com/users/nolanlawson/followers","following_url":"https://api.github.com/users/nolanlawson/following{/other_user}","gists_url":"https://api.github.com/users/nolanlawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nolanlawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolanlawson/subscriptions","organizations_url":"https://api.github.com/users/nolanlawson/orgs","repos_url":"https://api.github.com/users/nolanlawson/repos","events_url":"https://api.github.com/users/nolanlawson/events{/privacy}","received_events_url":"https://api.github.com/users/nolanlawson/received_events","type":"User","site_admin":false},"repo":{"id":89179047,"name":"mastodon","full_name":"nolanlawson/mastodon","owner":{"login":"nolanlawson","id":283842,"avatar_url":"https://avatars3.githubusercontent.com/u/283842?v=3","gravatar_id":"","url":"https://api.github.com/users/nolanlawson","html_url":"https://github.com/nolanlawson","followers_url":"https://api.github.com/users/nolanlawson/followers","following_url":"https://api.github.com/users/nolanlawson/following{/other_user}","gists_url":"https://api.github.com/users/nolanlawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nolanlawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolanlawson/subscriptions","organizations_url":"https://api.github.com/users/nolanlawson/orgs","repos_url":"https://api.github.com/users/nolanlawson/repos","events_url":"https://api.github.com/users/nolanlawson/events{/privacy}","received_events_url":"https://api.github.com/users/nolanlawson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nolanlawson/mastodon","description":"A GNU Social-compatible microblogging server","fork":true,"url":"https://api.github.com/repos/nolanlawson/mastodon","forks_url":"https://api.github.com/repos/nolanlawson/mastodon/forks","keys_url":"https://api.github.com/repos/nolanlawson/mastodon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nolanlawson/mastodon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nolanlawson/mastodon/teams","hooks_url":"https://api.github.com/repos/nolanlawson/mastodon/hooks","issue_events_url":"https://api.github.com/repos/nolanlawson/mastodon/issues/events{/number}","events_url":"https://api.github.com/repos/nolanlawson/mastodon/events","assignees_url":"https://api.github.com/repos/nolanlawson/mastodon/assignees{/user}","branches_url":"https://api.github.com/repos/nolanlawson/mastodon/branches{/branch}","tags_url":"https://api.github.com/repos/nolanlawson/mastodon/tags","blobs_url":"https://api.github.com/repos/nolanlawson/mastodon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nolanlawson/mastodon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nolanlawson/mastodon/git/refs{/sha}","trees_url":"https://api.github.com/repos/nolanlawson/mastodon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nolanlawson/mastodon/statuses/{sha}","languages_url":"https://api.github.com/repos/nolanlawson/mastodon/languages","stargazers_url":"https://api.github.com/repos/nolanlawson/mastodon/stargazers","contributors_url":"https://api.github.com/repos/nolanlawson/mastodon/contributors","subscribers_url":"https://api.github.com/repos/nolanlawson/mastodon/subscribers","subscription_url":"https://api.github.com/repos/nolanlawson/mastodon/subscription","commits_url":"https://api.github.com/repos/nolanlawson/mastodon/commits{/sha}","git_commits_url":"https://api.github.com/repos/nolanlawson/mastodon/git/commits{/sha}","comments_url":"https://api.github.com/repos/nolanlawson/mastodon/comments{/number}","issue_comment_url":"https://api.github.com/repos/nolanlawson/mastodon/issues/comments{/number}","contents_url":"https://api.github.com/repos/nolanlawson/mastodon/contents/{+path}","compare_url":"https://api.github.com/repos/nolanlawson/mastodon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nolanlawson/mastodon/merges","archive_url":"https://api.github.com/repos/nolanlawson/mastodon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nolanlawson/mastodon/downloads","issues_url":"https://api.github.com/repos/nolanlawson/mastodon/issues{/number}","pulls_url":"https://api.github.com/repos/nolanlawson/mastodon/pulls{/number}","milestones_url":"https://api.github.com/repos/nolanlawson/mastodon/milestones{/number}","notifications_url":"https://api.github.com/repos/nolanlawson/mastodon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nolanlawson/mastodon/labels{/name}","releases_url":"https://api.github.com/repos/nolanlawson/mastodon/releases{/id}","deployments_url":"https://api.github.com/repos/nolanlawson/mastodon/deployments","created_at":"2017-04-23T23:24:04Z","updated_at":"2017-04-23T23:24:09Z","pushed_at":"2017-06-18T17:13:16Z","git_url":"git://github.com/nolanlawson/mastodon.git","ssh_url":"git@github.com:nolanlawson/mastodon.git","clone_url":"https://github.com/nolanlawson/mastodon.git","svn_url":"https://github.com/nolanlawson/mastodon","homepage":"https://mastodon.social","size":39822,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"tootsuite:master","ref":"master","sha":"94d0e012dea89058b9c059636fb6d42f6565e534","user":{"login":"tootsuite","id":24979032,"avatar_url":"https://avatars0.githubusercontent.com/u/24979032?v=3","gravatar_id":"","url":"https://api.github.com/users/tootsuite","html_url":"https://github.com/tootsuite","followers_url":"https://api.github.com/users/tootsuite/followers","following_url":"https://api.github.com/users/tootsuite/following{/other_user}","gists_url":"https://api.github.com/users/tootsuite/gists{/gist_id}","starred_url":"https://api.github.com/users/tootsuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tootsuite/subscriptions","organizations_url":"https://api.github.com/users/tootsuite/orgs","repos_url":"https://api.github.com/users/tootsuite/repos","events_url":"https://api.github.com/users/tootsuite/events{/privacy}","received_events_url":"https://api.github.com/users/tootsuite/received_events","type":"Organization","site_admin":false},"repo":{"id":52281283,"name":"mastodon","full_name":"tootsuite/mastodon","owner":{"login":"tootsuite","id":24979032,"avatar_url":"https://avatars0.githubusercontent.com/u/24979032?v=3","gravatar_id":"","url":"https://api.github.com/users/tootsuite","html_url":"https://github.com/tootsuite","followers_url":"https://api.github.com/users/tootsuite/followers","following_url":"https://api.github.com/users/tootsuite/following{/other_user}","gists_url":"https://api.github.com/users/tootsuite/gists{/gist_id}","starred_url":"https://api.github.com/users/tootsuite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tootsuite/subscriptions","organizations_url":"https://api.github.com/users/tootsuite/orgs","repos_url":"https://api.github.com/users/tootsuite/repos","events_url":"https://api.github.com/users/tootsuite/events{/privacy}","received_events_url":"https://api.github.com/users/tootsuite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tootsuite/mastodon","description":"A GNU Social-compatible microblogging server","fork":false,"url":"https://api.github.com/repos/tootsuite/mastodon","forks_url":"https://api.github.com/repos/tootsuite/mastodon/forks","keys_url":"https://api.github.com/repos/tootsuite/mastodon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tootsuite/mastodon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tootsuite/mastodon/teams","hooks_url":"https://api.github.com/repos/tootsuite/mastodon/hooks","issue_events_url":"https://api.github.com/repos/tootsuite/mastodon/issues/events{/number}","events_url":"https://api.github.com/repos/tootsuite/mastodon/events","assignees_url":"https://api.github.com/repos/tootsuite/mastodon/assignees{/user}","branches_url":"https://api.github.com/repos/tootsuite/mastodon/branches{/branch}","tags_url":"https://api.github.com/repos/tootsuite/mastodon/tags","blobs_url":"https://api.github.com/repos/tootsuite/mastodon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tootsuite/mastodon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tootsuite/mastodon/git/refs{/sha}","trees_url":"https://api.github.com/repos/tootsuite/mastodon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tootsuite/mastodon/statuses/{sha}","languages_url":"https://api.github.com/repos/tootsuite/mastodon/languages","stargazers_url":"https://api.github.com/repos/tootsuite/mastodon/stargazers","contributors_url":"https://api.github.com/repos/tootsuite/mastodon/contributors","subscribers_url":"https://api.github.com/repos/tootsuite/mastodon/subscribers","subscription_url":"https://api.github.com/repos/tootsuite/mastodon/subscription","commits_url":"https://api.github.com/repos/tootsuite/mastodon/commits{/sha}","git_commits_url":"https://api.github.com/repos/tootsuite/mastodon/git/commits{/sha}","comments_url":"https://api.github.com/repos/tootsuite/mastodon/comments{/number}","issue_comment_url":"https://api.github.com/repos/tootsuite/mastodon/issues/comments{/number}","contents_url":"https://api.github.com/repos/tootsuite/mastodon/contents/{+path}","compare_url":"https://api.github.com/repos/tootsuite/mastodon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tootsuite/mastodon/merges","archive_url":"https://api.github.com/repos/tootsuite/mastodon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tootsuite/mastodon/downloads","issues_url":"https://api.github.com/repos/tootsuite/mastodon/issues{/number}","pulls_url":"https://api.github.com/repos/tootsuite/mastodon/pulls{/number}","milestones_url":"https://api.github.com/repos/tootsuite/mastodon/milestones{/number}","notifications_url":"https://api.github.com/repos/tootsuite/mastodon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tootsuite/mastodon/labels{/name}","releases_url":"https://api.github.com/repos/tootsuite/mastodon/releases{/id}","deployments_url":"https://api.github.com/repos/tootsuite/mastodon/deployments","created_at":"2016-02-22T15:01:25Z","updated_at":"2017-06-20T07:19:52Z","pushed_at":"2017-06-20T02:12:52Z","git_url":"git://github.com/tootsuite/mastodon.git","ssh_url":"git@github.com:tootsuite/mastodon.git","clone_url":"https://github.com/tootsuite/mastodon.git","svn_url":"https://github.com/tootsuite/mastodon","homepage":"https://mastodon.social","size":39767,"stargazers_count":9517,"watchers_count":9517,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1815,"mirror_url":null,"open_issues_count":775,"forks":1815,"open_issues":775,"watchers":9517,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/3832"},"html":{"href":"https://github.com/tootsuite/mastodon/pull/3832"},"issue":{"href":"https://api.github.com/repos/tootsuite/mastodon/issues/3832"},"comments":{"href":"https://api.github.com/repos/tootsuite/mastodon/issues/3832/comments"},"review_comments":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/3832/comments"},"review_comment":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tootsuite/mastodon/pulls/3832/commits"},"statuses":{"href":"https://api.github.com/repos/tootsuite/mastodon/statuses/8d9ebf9d1bbc98106b32e76f418287b4083af8b9"}}}}
{"actor":{"display_login":"unarist"}}