Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Designer] Update designer service worker #7757

Merged
merged 9 commits into from
Aug 23, 2022
Merged

Conversation

anna-dingler
Copy link
Contributor

@anna-dingler anna-dingler commented Aug 10, 2022

Description

When a new service worker is installed, we need to make sure that it claims all existing clients on activation and does not wait to take over for the prior service worker.

Otherwise, the new service worker would not take over until prior clients are closed/refreshed.

See documentation here:
https://developer.mozilla.org/en-US/docs/Web/API/Clients/claim
https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting

The caching strategy was also changed from StaleWhileRevalidate to NetworkFirst.

How Verified

Tested on the Adaptive Cards Designer.

Microsoft Reviewers: Open in CodeFlow

@ghost
Copy link

ghost commented Aug 10, 2022

Hi @anna-dingler. Thanks for helping make the AdaptiveCards JS renderer + tooling better. As additional verification, once the JS build succeeds, please go to the test site to test out your website/designer changes.

@anna-dingler anna-dingler changed the title [Designer] Skip waiting when installing service worker [Designer] Update designer service worker Aug 11, 2022
@anna-dingler anna-dingler marked this pull request as ready for review August 11, 2022 16:47
@ghost ghost added the no-recent-activity label Aug 17, 2022
@ghost
Copy link

ghost commented Aug 17, 2022

Hi @anna-dingler. This pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along.

@ghost ghost removed the no-recent-activity label Aug 17, 2022
@ghost
Copy link

ghost commented Aug 17, 2022

Staleness reset by anna-dingler

@anna-dingler anna-dingler merged commit cfdce09 into main Aug 23, 2022
@anna-dingler anna-dingler deleted the anna/updateDesignerPWA branch August 23, 2022 21:49
michaelfarnsworth pushed a commit to michaelfarnsworth/AdaptiveCards that referenced this pull request Nov 10, 2022
* Designer: skip waiting when installing service worker

* Update caching strategy

* Remove designer/ from the precache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants