{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/oghliner/issues/5","labels_url":"https://api.github.com/repos/mozilla/oghliner/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/oghliner/issues/5/comments","events_url":"https://api.github.com/repos/mozilla/oghliner/issues/5/events","html_url":"https://github.com/mozilla/oghliner/issues/5","id":107079969,"number":5,"title":"support an app update user flow","user":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=3","gravatar_id":"","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"delapuente","id":757942,"avatar_url":"https://avatars.githubusercontent.com/u/757942?v=3","gravatar_id":"","url":"https://api.github.com/users/delapuente","html_url":"https://github.com/delapuente","followers_url":"https://api.github.com/users/delapuente/followers","following_url":"https://api.github.com/users/delapuente/following{/other_user}","gists_url":"https://api.github.com/users/delapuente/gists{/gist_id}","starred_url":"https://api.github.com/users/delapuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delapuente/subscriptions","organizations_url":"https://api.github.com/users/delapuente/orgs","repos_url":"https://api.github.com/users/delapuente/repos","events_url":"https://api.github.com/users/delapuente/events{/privacy}","received_events_url":"https://api.github.com/users/delapuente/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mozilla/oghliner/milestones/1","html_url":"https://github.com/mozilla/oghliner/milestones/v1","labels_url":"https://api.github.com/repos/mozilla/oghliner/milestones/1/labels","id":1343193,"number":1,"title":"v1","description":"Oghliner v1 is the initial stable release of Oghliner. It provides the following core features:\r\n\r\n* Bootstrap an app with a build script that enables it to be built, offlined, and deployed to GitHub Pages.\r\n* Offline an app by generating a Service Worker that caches it on the client in compatible browsers.\r\n* Deploy an app to GitHub Pages by committing its assets to its gh-pages branch and pushing the commit upstream.\r\n* Configure Travis to auto-deploy the app to GitHub Pages when a user merges changes into its master branch.\r\n\r\nOghliner v1 is designed to work well with existing app codebases and popular development and build tools. Its *bootstrap* template may be opinionated (with a particular directory structure and Gulp build script), but its other methods are designed to work with many kinds of apps and can be integrated into both Gulp and Grunt build scripts. And even *bootstrap* is compatible with apps scaffolded by Yeoman.\r\n\r\nOghliner v1 is designed to support deployment exclusively to GitHub Pages, however. It doesn't support deployment to other web hosting services. And it enables offlining only in browsers that support Service Workers. It doesn't implement offlining using other technologies (like AppCache).\r\n\r\nFinally, Oghliner v1 implements the \"cache-first\" strategy for offlining apps. It doesn't support other strategies for offlining static assets or caching dynamic data. Service Workers can be used to support a variety of caching strategies, and they can do background sync and handle push notifications, all of which is valuable functionality. But Oghliner v1 is focused on the specific use case of offlining an app the first time it loads (and updating it when it changes), which is the closest web app equivalent to the native app installation and update lifecycle.\r\n\r\nIn addition to its core features, Oghliner v1 includes complete and accurate documentation, sports comprehensive automated test coverage, and observes Node and NPM best practices. It also demonstrates its capabilities through usage by one or more reference applications.\r\n","creator":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=3","gravatar_id":"","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":18,"state":"open","created_at":"2015-10-07T18:01:26Z","updated_at":"2015-11-02T23:49:59Z","due_on":"2015-11-19T08:00:00Z","closed_at":null},"comments":5,"created_at":"2015-09-17T21:42:47Z","updated_at":"2015-11-03T17:28:11Z","closed_at":null,"body":"Oghliner should support an app update user flow, so an app that uses Oghliner receives a message when an update is available and can prompt the user to update the app (if it chooses to do so, and at the appropriate time).\r\n\r\nThe flow would be optional, so an app that wants updates to be completely automatic and silent can simply ignore the message and never prompt the user to update the app, which will then update itself automatically whenever the service worker is updated by the browser (which is currently the default and only supported flow).\r\n\r\nSee [sw-precache's demo service-worker-registration.js file](https://github.com/GoogleChrome/sw-precache/blob/7688ee8ccdaddd9171af352384d04d16d712f9d3/demo/app/js/service-worker-registration.js) for inspiration, but ideally we would not have apps add their custom logic to our own equivalent (service-manager.js) but rather expose the registration to their code in a way that makes it possible for them to listen for its events and handle them in their own script.\r\n"},"comment":{"url":"https://api.github.com/repos/mozilla/oghliner/issues/comments/153425388","html_url":"https://github.com/mozilla/oghliner/issues/5#issuecomment-153425388","issue_url":"https://api.github.com/repos/mozilla/oghliner/issues/5","id":153425388,"user":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=3","gravatar_id":"","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T17:28:10Z","updated_at":"2015-11-03T17:28:10Z","body":"> So by using offliner (#96) we basically get this for free (because the user can define his update strategy), don't we?\r\n\r\nIf so, then it may be that the only thing to do here, once #96 lands, is to document the support for an app update flow. But I want to make sure that the flow we get with #96 is the one described by this issue, in particular (from the original description):\r\n\r\n> Oghliner should support an app update user flow, so an app that uses Oghliner receives a message when an update is available and can prompt the user to update the app (if it chooses to do so, and at the appropriate time).\r\n\r\nAlso:\r\n\r\n> Yep, you have the current implementation here: https://github.com/mozilla/oghliner/pull/96/files#diff-1e6990c753cb6c767172ea5f54207c2fR6\r\n\r\nIf I read that code correctly, it automatically reloads the page when an update is available. That's a valid option, but my intent in this issue is to describe a flow that by default does not reload the page but rather updates the app the next time the page is reloaded:\r\n\r\n> The flow would be optional, so an app that wants updates to be completely automatic and silent can simply ignore the message and never prompt the user to update the app, which will then update itself automatically whenever the service worker is updated by the browser (which is currently the default and only supported flow).\r\n\r\nI realize, upon rereading that sentence, that the intent wasn't completely clear! In any case, I do think the developer should have the option to instantly reload the page (or prompt the user to reload it) by observing an event that indicates that an update is available, which is the third part of the description:\r\n\r\n> See sw-precache's demo service-worker-registration.js file for inspiration, but ideally we would not have apps add their custom logic to our own equivalent (service-manager.js) but rather expose the registration to their code in a way that makes it possible for them to listen for its events and handle them in their own script.\r\n\r\nCan *offliner* support a flow in which updates are automatic, silent, and patient (awaiting a reload, not causing one) by default but can be configured to be loud and/or impatient by the developer?\r\n"}}