{"action":"closed","number":1571,"pull_request":{"url":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls/1571","id":89248935,"html_url":"https://github.com/ENCODE-DCC/encoded/pull/1571","diff_url":"https://github.com/ENCODE-DCC/encoded/pull/1571.diff","patch_url":"https://github.com/ENCODE-DCC/encoded/pull/1571.patch","issue_url":"https://api.github.com/repos/ENCODE-DCC/encoded/issues/1571","number":1571,"state":"closed","locked":false,"title":"4519 Stop multiple redraws on the home page charts","user":{"login":"forresttanaka","id":1181324,"avatar_url":"https://avatars.githubusercontent.com/u/1181324?v=3","gravatar_id":"","url":"https://api.github.com/users/forresttanaka","html_url":"https://github.com/forresttanaka","followers_url":"https://api.github.com/users/forresttanaka/followers","following_url":"https://api.github.com/users/forresttanaka/following{/other_user}","gists_url":"https://api.github.com/users/forresttanaka/gists{/gist_id}","starred_url":"https://api.github.com/users/forresttanaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forresttanaka/subscriptions","organizations_url":"https://api.github.com/users/forresttanaka/orgs","repos_url":"https://api.github.com/users/forresttanaka/repos","events_url":"https://api.github.com/users/forresttanaka/events{/privacy}","received_events_url":"https://api.github.com/users/forresttanaka/received_events","type":"User","site_admin":false},"body":"This branch only affects the home page. The original algorithm for the charts involved destroying the chart each time new data came in, and creating the charts fresh. This caused the charts to vanish and redraw as the user chose new selections of assay and organism (each causing a GET request).\r\n\r\nIn addition, the FetchedData component — that has existed in encoded probably since the beginning of the ReactJS implementation — redraws whatever data it retrieved the last time before doing the GET request. That caused the charts to redraw an extra time. I looked into avoiding this initial redraw, but I could only see having FetchedData clear its past data and rendering nothing before doing the GET request (React components have to render immediately). That reduced one chart redraw, but caused the entire chart to disappear between the time the GET request went out and the response came back — worse than the original problem in my opinion. This change would have also caused the region-search dropdown to flash on each keystroke beyond its throttling mechanism.\r\n\r\nSo I kept FetchedData the same, and instead keep the chart instances around between user selections. It still calls FetchedData which causes an immediate render, but it simply renders the same data on top of itself, which the user can’t see (note: that’s why we don’t see the redraw problem on the region-search page, which does something similar). As new data comes in, the existing chart instances get the new data and simply update themselves without clearing and redrawing.\r\n\r\nThe charts do get destroyed if no data comes in, in which case the message “No data to display” gets displayed instead. When the next selection brings in actual data, the charts get recreated.","created_at":"2016-10-13T17:42:59Z","updated_at":"2016-10-13T23:32:28Z","closed_at":"2016-10-13T23:32:28Z","merged_at":"2016-10-13T23:32:28Z","merge_commit_sha":"21c97add8000f82e4c20cf7aa0c5ff16635f10b9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls/1571/commits","review_comments_url":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls/1571/comments","review_comment_url":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ENCODE-DCC/encoded/issues/1571/comments","statuses_url":"https://api.github.com/repos/ENCODE-DCC/encoded/statuses/8db4469e52fee7fb5d960defda710afeb6dfeb9c","head":{"label":"ENCODE-DCC:4519-chart-redraw","ref":"4519-chart-redraw","sha":"8db4469e52fee7fb5d960defda710afeb6dfeb9c","user":{"login":"ENCODE-DCC","id":1713898,"avatar_url":"https://avatars.githubusercontent.com/u/1713898?v=3","gravatar_id":"","url":"https://api.github.com/users/ENCODE-DCC","html_url":"https://github.com/ENCODE-DCC","followers_url":"https://api.github.com/users/ENCODE-DCC/followers","following_url":"https://api.github.com/users/ENCODE-DCC/following{/other_user}","gists_url":"https://api.github.com/users/ENCODE-DCC/gists{/gist_id}","starred_url":"https://api.github.com/users/ENCODE-DCC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ENCODE-DCC/subscriptions","organizations_url":"https://api.github.com/users/ENCODE-DCC/orgs","repos_url":"https://api.github.com/users/ENCODE-DCC/repos","events_url":"https://api.github.com/users/ENCODE-DCC/events{/privacy}","received_events_url":"https://api.github.com/users/ENCODE-DCC/received_events","type":"Organization","site_admin":false},"repo":{"id":7045549,"name":"encoded","full_name":"ENCODE-DCC/encoded","owner":{"login":"ENCODE-DCC","id":1713898,"avatar_url":"https://avatars.githubusercontent.com/u/1713898?v=3","gravatar_id":"","url":"https://api.github.com/users/ENCODE-DCC","html_url":"https://github.com/ENCODE-DCC","followers_url":"https://api.github.com/users/ENCODE-DCC/followers","following_url":"https://api.github.com/users/ENCODE-DCC/following{/other_user}","gists_url":"https://api.github.com/users/ENCODE-DCC/gists{/gist_id}","starred_url":"https://api.github.com/users/ENCODE-DCC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ENCODE-DCC/subscriptions","organizations_url":"https://api.github.com/users/ENCODE-DCC/orgs","repos_url":"https://api.github.com/users/ENCODE-DCC/repos","events_url":"https://api.github.com/users/ENCODE-DCC/events{/privacy}","received_events_url":"https://api.github.com/users/ENCODE-DCC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ENCODE-DCC/encoded","description":"Metadata database for ENCODE 3","fork":false,"url":"https://api.github.com/repos/ENCODE-DCC/encoded","forks_url":"https://api.github.com/repos/ENCODE-DCC/encoded/forks","keys_url":"https://api.github.com/repos/ENCODE-DCC/encoded/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ENCODE-DCC/encoded/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ENCODE-DCC/encoded/teams","hooks_url":"https://api.github.com/repos/ENCODE-DCC/encoded/hooks","issue_events_url":"https://api.github.com/repos/ENCODE-DCC/encoded/issues/events{/number}","events_url":"https://api.github.com/repos/ENCODE-DCC/encoded/events","assignees_url":"https://api.github.com/repos/ENCODE-DCC/encoded/assignees{/user}","branches_url":"https://api.github.com/repos/ENCODE-DCC/encoded/branches{/branch}","tags_url":"https://api.github.com/repos/ENCODE-DCC/encoded/tags","blobs_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/refs{/sha}","trees_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ENCODE-DCC/encoded/statuses/{sha}","languages_url":"https://api.github.com/repos/ENCODE-DCC/encoded/languages","stargazers_url":"https://api.github.com/repos/ENCODE-DCC/encoded/stargazers","contributors_url":"https://api.github.com/repos/ENCODE-DCC/encoded/contributors","subscribers_url":"https://api.github.com/repos/ENCODE-DCC/encoded/subscribers","subscription_url":"https://api.github.com/repos/ENCODE-DCC/encoded/subscription","commits_url":"https://api.github.com/repos/ENCODE-DCC/encoded/commits{/sha}","git_commits_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/commits{/sha}","comments_url":"https://api.github.com/repos/ENCODE-DCC/encoded/comments{/number}","issue_comment_url":"https://api.github.com/repos/ENCODE-DCC/encoded/issues/comments{/number}","contents_url":"https://api.github.com/repos/ENCODE-DCC/encoded/contents/{+path}","compare_url":"https://api.github.com/repos/ENCODE-DCC/encoded/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ENCODE-DCC/encoded/merges","archive_url":"https://api.github.com/repos/ENCODE-DCC/encoded/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ENCODE-DCC/encoded/downloads","issues_url":"https://api.github.com/repos/ENCODE-DCC/encoded/issues{/number}","pulls_url":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls{/number}","milestones_url":"https://api.github.com/repos/ENCODE-DCC/encoded/milestones{/number}","notifications_url":"https://api.github.com/repos/ENCODE-DCC/encoded/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ENCODE-DCC/encoded/labels{/name}","releases_url":"https://api.github.com/repos/ENCODE-DCC/encoded/releases{/id}","deployments_url":"https://api.github.com/repos/ENCODE-DCC/encoded/deployments","created_at":"2012-12-07T00:52:21Z","updated_at":"2016-10-12T18:12:42Z","pushed_at":"2016-10-13T23:32:28Z","git_url":"git://github.com/ENCODE-DCC/encoded.git","ssh_url":"git@github.com:ENCODE-DCC/encoded.git","clone_url":"https://github.com/ENCODE-DCC/encoded.git","svn_url":"https://github.com/ENCODE-DCC/encoded","homepage":"https://www.encodeproject.org","size":166559,"stargazers_count":38,"watchers_count":38,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":38,"default_branch":"master"}},"base":{"label":"ENCODE-DCC:master","ref":"master","sha":"d65ee09f225219b2a2712cbad4c1fa99e8c986c9","user":{"login":"ENCODE-DCC","id":1713898,"avatar_url":"https://avatars.githubusercontent.com/u/1713898?v=3","gravatar_id":"","url":"https://api.github.com/users/ENCODE-DCC","html_url":"https://github.com/ENCODE-DCC","followers_url":"https://api.github.com/users/ENCODE-DCC/followers","following_url":"https://api.github.com/users/ENCODE-DCC/following{/other_user}","gists_url":"https://api.github.com/users/ENCODE-DCC/gists{/gist_id}","starred_url":"https://api.github.com/users/ENCODE-DCC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ENCODE-DCC/subscriptions","organizations_url":"https://api.github.com/users/ENCODE-DCC/orgs","repos_url":"https://api.github.com/users/ENCODE-DCC/repos","events_url":"https://api.github.com/users/ENCODE-DCC/events{/privacy}","received_events_url":"https://api.github.com/users/ENCODE-DCC/received_events","type":"Organization","site_admin":false},"repo":{"id":7045549,"name":"encoded","full_name":"ENCODE-DCC/encoded","owner":{"login":"ENCODE-DCC","id":1713898,"avatar_url":"https://avatars.githubusercontent.com/u/1713898?v=3","gravatar_id":"","url":"https://api.github.com/users/ENCODE-DCC","html_url":"https://github.com/ENCODE-DCC","followers_url":"https://api.github.com/users/ENCODE-DCC/followers","following_url":"https://api.github.com/users/ENCODE-DCC/following{/other_user}","gists_url":"https://api.github.com/users/ENCODE-DCC/gists{/gist_id}","starred_url":"https://api.github.com/users/ENCODE-DCC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ENCODE-DCC/subscriptions","organizations_url":"https://api.github.com/users/ENCODE-DCC/orgs","repos_url":"https://api.github.com/users/ENCODE-DCC/repos","events_url":"https://api.github.com/users/ENCODE-DCC/events{/privacy}","received_events_url":"https://api.github.com/users/ENCODE-DCC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ENCODE-DCC/encoded","description":"Metadata database for ENCODE 3","fork":false,"url":"https://api.github.com/repos/ENCODE-DCC/encoded","forks_url":"https://api.github.com/repos/ENCODE-DCC/encoded/forks","keys_url":"https://api.github.com/repos/ENCODE-DCC/encoded/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ENCODE-DCC/encoded/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ENCODE-DCC/encoded/teams","hooks_url":"https://api.github.com/repos/ENCODE-DCC/encoded/hooks","issue_events_url":"https://api.github.com/repos/ENCODE-DCC/encoded/issues/events{/number}","events_url":"https://api.github.com/repos/ENCODE-DCC/encoded/events","assignees_url":"https://api.github.com/repos/ENCODE-DCC/encoded/assignees{/user}","branches_url":"https://api.github.com/repos/ENCODE-DCC/encoded/branches{/branch}","tags_url":"https://api.github.com/repos/ENCODE-DCC/encoded/tags","blobs_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/refs{/sha}","trees_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ENCODE-DCC/encoded/statuses/{sha}","languages_url":"https://api.github.com/repos/ENCODE-DCC/encoded/languages","stargazers_url":"https://api.github.com/repos/ENCODE-DCC/encoded/stargazers","contributors_url":"https://api.github.com/repos/ENCODE-DCC/encoded/contributors","subscribers_url":"https://api.github.com/repos/ENCODE-DCC/encoded/subscribers","subscription_url":"https://api.github.com/repos/ENCODE-DCC/encoded/subscription","commits_url":"https://api.github.com/repos/ENCODE-DCC/encoded/commits{/sha}","git_commits_url":"https://api.github.com/repos/ENCODE-DCC/encoded/git/commits{/sha}","comments_url":"https://api.github.com/repos/ENCODE-DCC/encoded/comments{/number}","issue_comment_url":"https://api.github.com/repos/ENCODE-DCC/encoded/issues/comments{/number}","contents_url":"https://api.github.com/repos/ENCODE-DCC/encoded/contents/{+path}","compare_url":"https://api.github.com/repos/ENCODE-DCC/encoded/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ENCODE-DCC/encoded/merges","archive_url":"https://api.github.com/repos/ENCODE-DCC/encoded/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ENCODE-DCC/encoded/downloads","issues_url":"https://api.github.com/repos/ENCODE-DCC/encoded/issues{/number}","pulls_url":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls{/number}","milestones_url":"https://api.github.com/repos/ENCODE-DCC/encoded/milestones{/number}","notifications_url":"https://api.github.com/repos/ENCODE-DCC/encoded/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ENCODE-DCC/encoded/labels{/name}","releases_url":"https://api.github.com/repos/ENCODE-DCC/encoded/releases{/id}","deployments_url":"https://api.github.com/repos/ENCODE-DCC/encoded/deployments","created_at":"2012-12-07T00:52:21Z","updated_at":"2016-10-12T18:12:42Z","pushed_at":"2016-10-13T23:32:28Z","git_url":"git://github.com/ENCODE-DCC/encoded.git","ssh_url":"git@github.com:ENCODE-DCC/encoded.git","clone_url":"https://github.com/ENCODE-DCC/encoded.git","svn_url":"https://github.com/ENCODE-DCC/encoded","homepage":"https://www.encodeproject.org","size":166559,"stargazers_count":38,"watchers_count":38,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls/1571"},"html":{"href":"https://github.com/ENCODE-DCC/encoded/pull/1571"},"issue":{"href":"https://api.github.com/repos/ENCODE-DCC/encoded/issues/1571"},"comments":{"href":"https://api.github.com/repos/ENCODE-DCC/encoded/issues/1571/comments"},"review_comments":{"href":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls/1571/comments"},"review_comment":{"href":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ENCODE-DCC/encoded/pulls/1571/commits"},"statuses":{"href":"https://api.github.com/repos/ENCODE-DCC/encoded/statuses/8db4469e52fee7fb5d960defda710afeb6dfeb9c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"hitz","id":288823,"avatar_url":"https://avatars.githubusercontent.com/u/288823?v=3","gravatar_id":"","url":"https://api.github.com/users/hitz","html_url":"https://github.com/hitz","followers_url":"https://api.github.com/users/hitz/followers","following_url":"https://api.github.com/users/hitz/following{/other_user}","gists_url":"https://api.github.com/users/hitz/gists{/gist_id}","starred_url":"https://api.github.com/users/hitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hitz/subscriptions","organizations_url":"https://api.github.com/users/hitz/orgs","repos_url":"https://api.github.com/users/hitz/repos","events_url":"https://api.github.com/users/hitz/events{/privacy}","received_events_url":"https://api.github.com/users/hitz/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":13,"additions":555,"deletions":449,"changed_files":3}}
{"actor":{"display_login":"hitz"}}