{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/govuk-design-system/issues/247","repository_url":"https://api.github.com/repos/alphagov/govuk-design-system","labels_url":"https://api.github.com/repos/alphagov/govuk-design-system/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/govuk-design-system/issues/247/comments","events_url":"https://api.github.com/repos/alphagov/govuk-design-system/issues/247/events","html_url":"https://github.com/alphagov/govuk-design-system/pull/247","id":316248834,"number":247,"title":"Service Worker added for offline documentation","user":{"login":"Nooshu","id":1223960,"avatar_url":"https://avatars1.githubusercontent.com/u/1223960?v=4","gravatar_id":"","url":"https://api.github.com/users/Nooshu","html_url":"https://github.com/Nooshu","followers_url":"https://api.github.com/users/Nooshu/followers","following_url":"https://api.github.com/users/Nooshu/following{/other_user}","gists_url":"https://api.github.com/users/Nooshu/gists{/gist_id}","starred_url":"https://api.github.com/users/Nooshu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nooshu/subscriptions","organizations_url":"https://api.github.com/users/Nooshu/orgs","repos_url":"https://api.github.com/users/Nooshu/repos","events_url":"https://api.github.com/users/Nooshu/events{/privacy}","received_events_url":"https://api.github.com/users/Nooshu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-20T12:31:18Z","updated_at":"2018-04-23T14:49:41Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/alphagov/govuk-design-system/pulls/247","html_url":"https://github.com/alphagov/govuk-design-system/pull/247","diff_url":"https://github.com/alphagov/govuk-design-system/pull/247.diff","patch_url":"https://github.com/alphagov/govuk-design-system/pull/247.patch"},"body":"In a recent document discussing the \"Design System and Frontend documentation\" there was a question about where the documentation should sit. One of the options was _\"All documentation lives in the Design System and the main Frontend README is just a link to the Get started guide in the Design System\"_. The only risk listed with this approach was _\"Users who clone the repo or download the zip from GitHub won’t have access to offline documentation.\"_ This PR has been created to solve this issue for Design System users who require documentation while they are offline.\r\n\r\nA service worker has been added with all the heavy lifting done using [Workbox](https://developers.google.com/web/tools/workbox/). Workbox is built into the metalsmith build pipeline. Workbox handles the file manifest and looks for changes between builds. Once a change is detected, the manifest is updated. Old cache is cleared and replaced with the newest version.\r\n\r\nIt is now possible to view all the DS docs while offline. There may be considerations around when this PR is merged as a service worker does add another level of caching that can sometimes complicate development. The level of debugging available in the console for 3.1.0 of Workbox has been vastly improved so a developer gets a much clearer picture of what is happening. We could hide all this behind a 'development' / 'production' check or even a simple boolean to disable when required. "},"comment":{"url":"https://api.github.com/repos/alphagov/govuk-design-system/issues/comments/383602663","html_url":"https://github.com/alphagov/govuk-design-system/pull/247#issuecomment-383602663","issue_url":"https://api.github.com/repos/alphagov/govuk-design-system/issues/247","id":383602663,"user":{"login":"nickcolley","id":2445413,"avatar_url":"https://avatars2.githubusercontent.com/u/2445413?v=4","gravatar_id":"","url":"https://api.github.com/users/nickcolley","html_url":"https://github.com/nickcolley","followers_url":"https://api.github.com/users/nickcolley/followers","following_url":"https://api.github.com/users/nickcolley/following{/other_user}","gists_url":"https://api.github.com/users/nickcolley/gists{/gist_id}","starred_url":"https://api.github.com/users/nickcolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickcolley/subscriptions","organizations_url":"https://api.github.com/users/nickcolley/orgs","repos_url":"https://api.github.com/users/nickcolley/repos","events_url":"https://api.github.com/users/nickcolley/events{/privacy}","received_events_url":"https://api.github.com/users/nickcolley/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T14:49:41Z","updated_at":"2018-04-23T14:49:41Z","author_association":"CONTRIBUTOR","body":"Looks good based on those tests above, we noticed that there's a runtime cache that caches Analytics.\r\n\r\nIf possible it would be good to avoid this, as it might make Google Tag Manager unpredictable."}}
{"actor":{"display_login":"nickcolley"}}