{"action":"created","comment":{"url":"https://api.github.com/repos/xwp/pwa-wp/pulls/comments/216841187","pull_request_review_id":154417418,"id":216841187,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjg0MTE4Nw==","diff_hunk":"@@ -236,4 +236,14 @@ function wp_default_service_workers( $service_workers ) {\n \t\t\t\t);\n \t\t}\n \t}\n+\n+\tadd_action( 'wp_admin_service_worker', array( $service_workers, 'precache_admin_assets' ), 9 );","path":"wp-includes/service-workers.php","position":5,"original_position":5,"commit_id":"58259d932509a10144e5d38ebcb66670296b0930","original_commit_id":"76e00cf95f403cb9f676938a6d906ab6e4ce64e1","user":{"login":"westonruter","id":134745,"node_id":"MDQ6VXNlcjEzNDc0NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/134745?v=4","gravatar_id":"","url":"https://api.github.com/users/westonruter","html_url":"https://github.com/westonruter","followers_url":"https://api.github.com/users/westonruter/followers","following_url":"https://api.github.com/users/westonruter/following{/other_user}","gists_url":"https://api.github.com/users/westonruter/gists{/gist_id}","starred_url":"https://api.github.com/users/westonruter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westonruter/subscriptions","organizations_url":"https://api.github.com/users/westonruter/orgs","repos_url":"https://api.github.com/users/westonruter/repos","events_url":"https://api.github.com/users/westonruter/events{/privacy}","received_events_url":"https://api.github.com/users/westonruter/received_events","type":"User","site_admin":false},"body":"@felixarntz With the change to `WP_Service_Worker_Scripts_Integration` and `WP_Service_Worker_Styles_Integration` to add them to both the front and admin scopes, then the integration will run at `wp_admin_service_worker` priority 10:\r\n\r\nhttps://github.com/xwp/pwa-wp/blob/57ebfa7652cd6e485056c7d11417acb726a7e87d/wp-includes/service-workers.php#L219-L221\r\n\r\nThis means that in order to set the `precache` flags on admin-specific scripts and styles that the flag has to be set at priority 9 of the`wp_admin_service_worker` action. Something is missing here.","created_at":"2018-09-11T22:14:37Z","updated_at":"2018-09-11T22:36:23Z","html_url":"https://github.com/xwp/pwa-wp/pull/42#discussion_r216841187","pull_request_url":"https://api.github.com/repos/xwp/pwa-wp/pulls/42","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/comments/216841187"},"html":{"href":"https://github.com/xwp/pwa-wp/pull/42#discussion_r216841187"},"pull_request":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/42"}},"in_reply_to_id":216804933},"pull_request":{"url":"https://api.github.com/repos/xwp/pwa-wp/pulls/42","id":205149629,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MTQ5NjI5","html_url":"https://github.com/xwp/pwa-wp/pull/42","diff_url":"https://github.com/xwp/pwa-wp/pull/42.diff","patch_url":"https://github.com/xwp/pwa-wp/pull/42.patch","issue_url":"https://api.github.com/repos/xwp/pwa-wp/issues/42","number":42,"state":"open","locked":false,"title":"Bring back \"Turbo\" mode to Admin","user":{"login":"miina","id":3294597,"node_id":"MDQ6VXNlcjMyOTQ1OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/3294597?v=4","gravatar_id":"","url":"https://api.github.com/users/miina","html_url":"https://github.com/miina","followers_url":"https://api.github.com/users/miina/followers","following_url":"https://api.github.com/users/miina/following{/other_user}","gists_url":"https://api.github.com/users/miina/gists{/gist_id}","starred_url":"https://api.github.com/users/miina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miina/subscriptions","organizations_url":"https://api.github.com/users/miina/orgs","repos_url":"https://api.github.com/users/miina/repos","events_url":"https://api.github.com/users/miina/events{/privacy}","received_events_url":"https://api.github.com/users/miina/received_events","type":"User","site_admin":false},"body":"Fixes #34. Based on #43.\r\n\r\nUsing Workbox API Prototype for caching the admin assets separately and replacing the usage of `load-scripts.php` and `load-styles.php`.\r\n\r\nScreenshots of the PR in use:\r\n\r\n- Workbox log:\r\n![screen shot 2018-08-02 at 1 27 05 pm](https://user-images.githubusercontent.com/3294597/43582442-1f21f8fe-9665-11e8-955d-f10233cd7f73.png)\r\n\r\n- Network tab:\r\n![screen shot 2018-08-02 at 1 28 17 pm](https://user-images.githubusercontent.com/3294597/43582443-1f3fc258-9665-11e8-981d-c1567a35fb20.png)\r\n- Output in the SW script:\r\n![screen shot 2018-08-02 at 1 29 38 pm](https://user-images.githubusercontent.com/3294597/43582444-1f652b38-9665-11e8-9de7-cee171afd37d.png)","created_at":"2018-07-31T15:19:22Z","updated_at":"2018-09-11T22:36:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3075b4221f0c373e5a6f9501cfaef42d1725ff11","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":943587263,"node_id":"MDU6TGFiZWw5NDM1ODcyNjM=","url":"https://api.github.com/repos/xwp/pwa-wp/labels/service-workers","name":"service-workers","color":"f9d0c4","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/xwp/pwa-wp/pulls/42/commits","review_comments_url":"https://api.github.com/repos/xwp/pwa-wp/pulls/42/comments","review_comment_url":"https://api.github.com/repos/xwp/pwa-wp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xwp/pwa-wp/issues/42/comments","statuses_url":"https://api.github.com/repos/xwp/pwa-wp/statuses/58259d932509a10144e5d38ebcb66670296b0930","head":{"label":"xwp:add/restore-turbo","ref":"add/restore-turbo","sha":"58259d932509a10144e5d38ebcb66670296b0930","user":{"login":"xwp","id":9003139,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMDMxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9003139?v=4","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"repo":{"id":134672606,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ2NzI2MDY=","name":"pwa-wp","full_name":"xwp/pwa-wp","owner":{"login":"xwp","id":9003139,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMDMxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9003139?v=4","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwp/pwa-wp","description":"WordPress feature plugin to bring Progressive Web Apps (PWA) to Core","fork":false,"url":"https://api.github.com/repos/xwp/pwa-wp","forks_url":"https://api.github.com/repos/xwp/pwa-wp/forks","keys_url":"https://api.github.com/repos/xwp/pwa-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwp/pwa-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwp/pwa-wp/teams","hooks_url":"https://api.github.com/repos/xwp/pwa-wp/hooks","issue_events_url":"https://api.github.com/repos/xwp/pwa-wp/issues/events{/number}","events_url":"https://api.github.com/repos/xwp/pwa-wp/events","assignees_url":"https://api.github.com/repos/xwp/pwa-wp/assignees{/user}","branches_url":"https://api.github.com/repos/xwp/pwa-wp/branches{/branch}","tags_url":"https://api.github.com/repos/xwp/pwa-wp/tags","blobs_url":"https://api.github.com/repos/xwp/pwa-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwp/pwa-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwp/pwa-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwp/pwa-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwp/pwa-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/xwp/pwa-wp/languages","stargazers_url":"https://api.github.com/repos/xwp/pwa-wp/stargazers","contributors_url":"https://api.github.com/repos/xwp/pwa-wp/contributors","subscribers_url":"https://api.github.com/repos/xwp/pwa-wp/subscribers","subscription_url":"https://api.github.com/repos/xwp/pwa-wp/subscription","commits_url":"https://api.github.com/repos/xwp/pwa-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwp/pwa-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwp/pwa-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwp/pwa-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwp/pwa-wp/contents/{+path}","compare_url":"https://api.github.com/repos/xwp/pwa-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwp/pwa-wp/merges","archive_url":"https://api.github.com/repos/xwp/pwa-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwp/pwa-wp/downloads","issues_url":"https://api.github.com/repos/xwp/pwa-wp/issues{/number}","pulls_url":"https://api.github.com/repos/xwp/pwa-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/xwp/pwa-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/xwp/pwa-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwp/pwa-wp/labels{/name}","releases_url":"https://api.github.com/repos/xwp/pwa-wp/releases{/id}","deployments_url":"https://api.github.com/repos/xwp/pwa-wp/deployments","created_at":"2018-05-24T06:42:09Z","updated_at":"2018-09-11T22:18:49Z","pushed_at":"2018-09-11T22:18:49Z","git_url":"git://github.com/xwp/pwa-wp.git","ssh_url":"git@github.com:xwp/pwa-wp.git","clone_url":"https://github.com/xwp/pwa-wp.git","svn_url":"https://github.com/xwp/pwa-wp","homepage":"https://wordpress.org/plugins/pwa/","size":1037,"stargazers_count":150,"watchers_count":150,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":15,"open_issues":18,"watchers":150,"default_branch":"master"}},"base":{"label":"xwp:master","ref":"master","sha":"e586959a7bf78a7719f8662f69fda46617908efb","user":{"login":"xwp","id":9003139,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMDMxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9003139?v=4","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"repo":{"id":134672606,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ2NzI2MDY=","name":"pwa-wp","full_name":"xwp/pwa-wp","owner":{"login":"xwp","id":9003139,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMDMxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9003139?v=4","gravatar_id":"","url":"https://api.github.com/users/xwp","html_url":"https://github.com/xwp","followers_url":"https://api.github.com/users/xwp/followers","following_url":"https://api.github.com/users/xwp/following{/other_user}","gists_url":"https://api.github.com/users/xwp/gists{/gist_id}","starred_url":"https://api.github.com/users/xwp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwp/subscriptions","organizations_url":"https://api.github.com/users/xwp/orgs","repos_url":"https://api.github.com/users/xwp/repos","events_url":"https://api.github.com/users/xwp/events{/privacy}","received_events_url":"https://api.github.com/users/xwp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwp/pwa-wp","description":"WordPress feature plugin to bring Progressive Web Apps (PWA) to Core","fork":false,"url":"https://api.github.com/repos/xwp/pwa-wp","forks_url":"https://api.github.com/repos/xwp/pwa-wp/forks","keys_url":"https://api.github.com/repos/xwp/pwa-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwp/pwa-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwp/pwa-wp/teams","hooks_url":"https://api.github.com/repos/xwp/pwa-wp/hooks","issue_events_url":"https://api.github.com/repos/xwp/pwa-wp/issues/events{/number}","events_url":"https://api.github.com/repos/xwp/pwa-wp/events","assignees_url":"https://api.github.com/repos/xwp/pwa-wp/assignees{/user}","branches_url":"https://api.github.com/repos/xwp/pwa-wp/branches{/branch}","tags_url":"https://api.github.com/repos/xwp/pwa-wp/tags","blobs_url":"https://api.github.com/repos/xwp/pwa-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwp/pwa-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwp/pwa-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwp/pwa-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwp/pwa-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/xwp/pwa-wp/languages","stargazers_url":"https://api.github.com/repos/xwp/pwa-wp/stargazers","contributors_url":"https://api.github.com/repos/xwp/pwa-wp/contributors","subscribers_url":"https://api.github.com/repos/xwp/pwa-wp/subscribers","subscription_url":"https://api.github.com/repos/xwp/pwa-wp/subscription","commits_url":"https://api.github.com/repos/xwp/pwa-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwp/pwa-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwp/pwa-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwp/pwa-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwp/pwa-wp/contents/{+path}","compare_url":"https://api.github.com/repos/xwp/pwa-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwp/pwa-wp/merges","archive_url":"https://api.github.com/repos/xwp/pwa-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwp/pwa-wp/downloads","issues_url":"https://api.github.com/repos/xwp/pwa-wp/issues{/number}","pulls_url":"https://api.github.com/repos/xwp/pwa-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/xwp/pwa-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/xwp/pwa-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwp/pwa-wp/labels{/name}","releases_url":"https://api.github.com/repos/xwp/pwa-wp/releases{/id}","deployments_url":"https://api.github.com/repos/xwp/pwa-wp/deployments","created_at":"2018-05-24T06:42:09Z","updated_at":"2018-09-11T22:18:49Z","pushed_at":"2018-09-11T22:18:49Z","git_url":"git://github.com/xwp/pwa-wp.git","ssh_url":"git@github.com:xwp/pwa-wp.git","clone_url":"https://github.com/xwp/pwa-wp.git","svn_url":"https://github.com/xwp/pwa-wp","homepage":"https://wordpress.org/plugins/pwa/","size":1037,"stargazers_count":150,"watchers_count":150,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":15,"open_issues":18,"watchers":150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/42"},"html":{"href":"https://github.com/xwp/pwa-wp/pull/42"},"issue":{"href":"https://api.github.com/repos/xwp/pwa-wp/issues/42"},"comments":{"href":"https://api.github.com/repos/xwp/pwa-wp/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xwp/pwa-wp/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/xwp/pwa-wp/statuses/58259d932509a10144e5d38ebcb66670296b0930"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"westonruter"}}