Use Google Workbox library

Created on 10 June 2019, over 5 years ago
Updated 21 September 2023, about 1 year ago

This is currently in progress.

Legend

✅ = Done

⌛️ = In progress/partially complete

❌ = Not started yet

Required

  1. This has been completed, though it's not a 1:1 copy as the various config pages have been kept on the same URL nesting level for better UX, i.e. so users don't have to go up or down a level/category just to see certain local task tabs.
  2. This has been upped to 1000 kilobytes based on the current median size in the referenced link.
  3. ❌ Documentation for installing Workbox, both with and without Composer.
  4. ⌛️ Change record .

Bugs

  1. This seems to work fine now and was likely a quirk of not starting with the 8.x-1.x branch before running updates.

Nice to have

  1. ❌ Add configurable path to Workbox library.
  2. ❌ Convert _template.js into a Twig template similar to what Drush does with their generators.
  3. ❌ Convert the asset cache config (pwa.config.cache_assets) to Configuration Entities ?
    • Pro: could make things easier long term and allow more customization/alteration opportunities.
    • Con: might be overkill if we never add more than the four types we have now.
  4. ❌ Use the Symfony Validator for various things by implementing validation plug-ins :
    • CacheConfigurationForm: Workbox strategies for page rules and assets.

Original summary by ChristophWeber:

We (the team at Achieve Internet) have been researching tooling for Progressive Web Apps and looked into Google's Workbox library.
In our minds using a library that is widely used to support the basic functions of a PWA would make a lot of sense.
If anyone is interested we can share more about our experience, and of course we are curious what others think.

📌 Task
Status

Needs work

Version

2.0

Component

Code

Created by

🇺🇸United States ChristophWeber

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany Anybody Porta Westfalica

    Settings this Major, as it's supposed to fix a lot of other issues and save us some (or not). But at least we should not first fix other code that's then replaced by this.

    Google Workbox looks very useful for all Serviceworker functionality.

  • Status changed to Needs work about 1 year ago
  • 🇯🇵Japan tyler36 Osaka

    Patch did not apply against `drupal/pwa:2.0.0-rc2`.

Production build 0.71.5 2024