pwa-wp icon indicating copy to clipboard operation
pwa-wp copied to clipboard

Adopt admin PWA logic from Gutenberg

Open westonruter opened this issue 4 years ago • 1 comments

In Gutenberg 11.1, experimental support for admin PWA was introduced: https://github.com/WordPress/gutenberg/pull/33102, https://github.com/WordPress/gutenberg/pull/33310, https://github.com/WordPress/gutenberg/pull/33216.

This allows for the WordPress admin to be installed to the homescreen separately for ease of access, separately from installing the frontend to the homescreen. The PWA plugin already is registering a service worker in the admin scope, but the admin is not installable as a separate PWA because there is no admin-specific web app manifest. This is what was proposed in https://github.com/GoogleChromeLabs/pwa-wp/issues/295 as mentioned in https://github.com/WordPress/gutenberg/pull/33102#issuecomment-874339487.

Only one service worker can be registered for a given scope at a time. Since the purpose of the PWA plugin's service worker is to be extensible via a WP_Scripts-esque API, it is preferable to use instead of the service worker shim in Gutenberg which is required to trigger the add-to-homescreen prompt.

  • [ ] Add web app manifest to the admin, per https://github.com/GoogleChromeLabs/pwa-wp/issues/295.
  • [ ] Open PR to remove PWA experiment from Gutenbeg.

westonruter avatar Jul 21 '21 04:07 westonruter

Not a priority for 0.7 since the service worker is being removed from Gutenberg in https://github.com/WordPress/gutenberg/pull/38810 which was causing a conflict.

westonruter avatar Feb 16 '22 16:02 westonruter