GitHub PullRequestEvent at 2014-06-11 04:02:17
Repository: gaia
Actor: lightsofapollo
Payload: {"action":"closed","number":20199,"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/20199","id":16866832,"html_url":"https://github.com/mozilla-b2g/gaia/pull/20199","diff_url":"https://github.com/mozilla-b2g/gaia/pull/20199.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/20199.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/20199","number":20199,"state":"closed","title":"Bug 1022247 - Icon fetching refactoring","user":{"login":"lightsofapollo","id":322957,"avatar_url":"https://avatars.githubusercontent.com/u/322957?","gravatar_id":"52c6593cac3e4b93da1714af0760146b","url":"https://api.github.com/users/lightsofapollo","html_url":"https://github.com/lightsofapollo","followers_url":"https://api.github.com/users/lightsofapollo/followers","following_url":"https://api.github.com/users/lightsofapollo/following{/other_user}","gists_url":"https://api.github.com/users/lightsofapollo/gists{/gist_id}","starred_url":"https://api.github.com/users/lightsofapollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightsofapollo/subscriptions","organizations_url":"https://api.github.com/users/lightsofapollo/orgs","repos_url":"https://api.github.com/users/lightsofapollo/repos","events_url":"https://api.github.com/users/lightsofapollo/events{/privacy}","received_events_url":"https://api.github.com/users/lightsofapollo/received_events","type":"User","site_admin":false},"body":"### Goal:\r\n\r\nThis PR contains a number of changes which fix various bugs but it's primary goal is to:\r\n\r\n  - ensure we don't cache icons forever\r\n  - handle icon fetching errors and do the right thing\r\n  - sanely test (as much as possible) with integration tests\r\n\r\n### Walkthrough:\r\n\r\n1. IconRetriever is gone and async_storage is not used anymore in gaia_grid... We still fetch icons of course but this is done with a private method inside the gaia_grid component. I found that using the lazy loader added some overhead and the code is now small enough to justify keeping it in the same file (IMO)\r\n\r\n2. GridItem will emit (via dispatchEvent) gaiagrid-iconblobload and gaiagrid-iconbloberror to indicate when the icon has been fetched successfully or not... if the icon was a blob it is stored on .detail.defaultIconBlob. \r\n\r\n3. .detail.defaultIconBlob is used on fetching errors if available otherwise the default icon is used (which now lives in the web component)\r\n\r\n4. app.js in verticalhome listens to the new gaiagrid events and handles the download retry logic (when we go from an offline state to an online state) and some supporting logic in store/item.js\r\n\r\n5. Lots of new test infrastructure with a node server to help us emulate a number of states (like broken socket, unresponsive socket, etc..)\r\n\r\nThis also happens to fix a bug where we don't display a default icon on the search app.\r\n\r\n### Other notes:\r\n\r\nGenerally speaking relying on XHR (and the underlying network cache) to do the right thing is much better then implementing caching ourselves in search/collections... They seem to do the right things without us needing to re implement network caching.\r\n\r\nThis also means that our blob cache in the homescreen is for backup purposes only and may not be hit even if we are offline (network cache gets hit then we use our blob if available.)\r\n","created_at":"2014-06-08T21:17:47Z","updated_at":"2014-06-11T04:02:16Z","closed_at":"2014-06-11T04:02:16Z","merged_at":"2014-06-11T04:02:16Z","merge_commit_sha":"d27fcbfded89ced74dde26ad7e872036fc1d8e70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/20199/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/20199/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/20199/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/a16f730ad2512270b3da9f48b3428b3d6152a1bb","head":{"label":"lightsofapollo:icon-fallbacks","ref":"icon-fallbacks","sha":"a16f730ad2512270b3da9f48b3428b3d6152a1bb","user":{"login":"lightsofapollo","id":322957,"avatar_url":"https://avatars.githubusercontent.com/u/322957?","gravatar_id":"52c6593cac3e4b93da1714af0760146b","url":"https://api.github.com/users/lightsofapollo","html_url":"https://github.com/lightsofapollo","followers_url":"https://api.github.com/users/lightsofapollo/followers","following_url":"https://api.github.com/users/lightsofapollo/following{/other_user}","gists_url":"https://api.github.com/users/lightsofapollo/gists{/gist_id}","starred_url":"https://api.github.com/users/lightsofapollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightsofapollo/subscriptions","organizations_url":"https://api.github.com/users/lightsofapollo/orgs","repos_url":"https://api.github.com/users/lightsofapollo/repos","events_url":"https://api.github.com/users/lightsofapollo/events{/privacy}","received_events_url":"https://api.github.com/users/lightsofapollo/received_events","type":"User","site_admin":false},"repo":{"id":3837072,"name":"gaia","full_name":"lightsofapollo/gaia","owner":{"login":"lightsofapollo","id":322957,"avatar_url":"https://avatars.githubusercontent.com/u/322957?","gravatar_id":"52c6593cac3e4b93da1714af0760146b","url":"https://api.github.com/users/lightsofapollo","html_url":"https://github.com/lightsofapollo","followers_url":"https://api.github.com/users/lightsofapollo/followers","following_url":"https://api.github.com/users/lightsofapollo/following{/other_user}","gists_url":"https://api.github.com/users/lightsofapollo/gists{/gist_id}","starred_url":"https://api.github.com/users/lightsofapollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightsofapollo/subscriptions","organizations_url":"https://api.github.com/users/lightsofapollo/orgs","repos_url":"https://api.github.com/users/lightsofapollo/repos","events_url":"https://api.github.com/users/lightsofapollo/events{/privacy}","received_events_url":"https://api.github.com/users/lightsofapollo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lightsofapollo/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project","fork":true,"url":"https://api.github.com/repos/lightsofapollo/gaia","forks_url":"https://api.github.com/repos/lightsofapollo/gaia/forks","keys_url":"https://api.github.com/repos/lightsofapollo/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lightsofapollo/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lightsofapollo/gaia/teams","hooks_url":"https://api.github.com/repos/lightsofapollo/gaia/hooks","issue_events_url":"https://api.github.com/repos/lightsofapollo/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/lightsofapollo/gaia/events","assignees_url":"https://api.github.com/repos/lightsofapollo/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/lightsofapollo/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/lightsofapollo/gaia/tags","blobs_url":"https://api.github.com/repos/lightsofapollo/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lightsofapollo/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lightsofapollo/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/lightsofapollo/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lightsofapollo/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/lightsofapollo/gaia/languages","stargazers_url":"https://api.github.com/repos/lightsofapollo/gaia/stargazers","contributors_url":"https://api.github.com/repos/lightsofapollo/gaia/contributors","subscribers_url":"https://api.github.com/repos/lightsofapollo/gaia/subscribers","subscription_url":"https://api.github.com/repos/lightsofapollo/gaia/subscription","commits_url":"https://api.github.com/repos/lightsofapollo/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/lightsofapollo/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/lightsofapollo/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/lightsofapollo/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/lightsofapollo/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/lightsofapollo/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lightsofapollo/gaia/merges","archive_url":"https://api.github.com/repos/lightsofapollo/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lightsofapollo/gaia/downloads","issues_url":"https://api.github.com/repos/lightsofapollo/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/lightsofapollo/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/lightsofapollo/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/lightsofapollo/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lightsofapollo/gaia/labels{/name}","releases_url":"https://api.github.com/repos/lightsofapollo/gaia/releases{/id}","created_at":"2012-03-26T20:26:21Z","updated_at":"2014-06-11T04:02:16Z","pushed_at":"2014-06-11T02:05:31Z","git_url":"git://github.com/lightsofapollo/gaia.git","ssh_url":"git@github.com:lightsofapollo/gaia.git","clone_url":"https://github.com/lightsofapollo/gaia.git","svn_url":"https://github.com/lightsofapollo/gaia","homepage":"https://wiki.mozilla.org/B2G","size":776872,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"f5466f413a9415164bad87b75e214e7b99004166","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?","gravatar_id":"b1de11f7d6ddaf7b9d527281297c2ee1","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?","gravatar_id":"b1de11f7d6ddaf7b9d527281297c2ee1","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see https://wiki.mozilla.org/Release_Management/B2G_Landing","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2014-06-11T04:02:16Z","pushed_at":"2014-06-11T04:02:16Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1193746,"stargazers_count":1623,"watchers_count":1623,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1598,"mirror_url":null,"open_issues_count":1595,"forks":1598,"open_issues":1595,"watchers":1623,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/20199"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/20199"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/20199"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/20199/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/20199/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/20199/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/a16f730ad2512270b3da9f48b3428b3d6152a1bb"}},"merged":true,"mergeable":true,"mergeable_state":"clean","merged_by":{"login":"lightsofapollo","id":322957,"avatar_url":"https://avatars.githubusercontent.com/u/322957?","gravatar_id":"52c6593cac3e4b93da1714af0760146b","url":"https://api.github.com/users/lightsofapollo","html_url":"https://github.com/lightsofapollo","followers_url":"https://api.github.com/users/lightsofapollo/followers","following_url":"https://api.github.com/users/lightsofapollo/following{/other_user}","gists_url":"https://api.github.com/users/lightsofapollo/gists{/gist_id}","starred_url":"https://api.github.com/users/lightsofapollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightsofapollo/subscriptions","organizations_url":"https://api.github.com/users/lightsofapollo/orgs","repos_url":"https://api.github.com/users/lightsofapollo/repos","events_url":"https://api.github.com/users/lightsofapollo/events{/privacy}","received_events_url":"https://api.github.com/users/lightsofapollo/received_events","type":"User","site_admin":false},"comments":1,"review_comments":4,"commits":1,"additions":1006,"deletions":326,"changed_files":31}}