feature: service worker#6876
Conversation
🧪 Review environmenthttps://jwrcxdjneo4wjcnrva7ieom7ua0xkami.lambda-url.ca-central-1.on.aws/ |
🧪 Review environmenthttps://m2utz3xcmwu7zarxbjv2op4dyu0coyah.lambda-url.ca-central-1.on.aws/ |
…latform-forms-client into feature/service_worker
|
Latest Review Environment: https://7df5eewwavmat2b7v45rpb3muy0gwqdj.lambda-url.ca-central-1.on.aws/ |
Potential content strings:Form builder (v1)EN FR Form filler (v1)EN FR |
|
@samsadasivan what do you think about blurring out the "background" I added code to dismiss toast messages when the App Updater pops but thinking there's really only one thing to do when it pops (reload). Having visible inline errors in the background isn't really helpful - you can't interact with them.
|
|
Helpful way to remove the service worker as need be chrome://serviceworker-internals/ |
| sw.addEventListener("fetch", (event) => { | ||
| const requestMethod = event.request.method; | ||
| const nextAction = Boolean(event.request.headers.get("next-action")); | ||
| fakeUpdateRequirement(); |
There was a problem hiding this comment.
Reminder to remove fakeUpdateRequirement();
| } | ||
|
|
||
| // Here for testing purposes only, remove below before merging | ||
| function fakeUpdateRequirement() { |
|
FYI @bryan-robitaille new content strings are in :) |


Summary | Résumé
Adds a service worker that intercepts failed next action requests and forces the user to update their local version.

Test instructions | Instructions pour tester la modification
The PR review environment will trigger an update in the browser every 30 seconds.
By interacting with the application normally an update modal should be shown when an write action is taken (aka modifying a form or submitting a form response)
Unresolved questions / Out of scope | Questions non résolues ou hors sujet
Pull Request Checklist
Please complete the following items in the checklist before you request a review: