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

(fix) Service Worker Housekeeping: Remove Unused SW Events | Fix SW Startup Cycle During Initial Load #369

Merged

Conversation

manuelroemer
Copy link
Member

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.
  • I have updated the esm-framework mock to reflect any API changes I have made.

Summary

Housekeeping for the service worker. Removes a now unused event (networkRequestFailed - was only introduced for esm-form-entry and is now not required anymore). Also improves the startup and SW registration (which should issues with initial caching of resources).

…e (as it became obsolete and is no longer used in any module).
…ean up the offline setup and make it more robust (remove potential race-ish conditions).
@FlorianRappl FlorianRappl merged commit c103f2b into openmrs:master Mar 23, 2022
@brandones
Copy link
Collaborator

Hi @manuelroemer , do you think this will fix https://issues.openmrs.org/browse/O3-1067 , or is it unrelated?

@manuelroemer
Copy link
Member Author

@brandones I haven't explicitly tested this, but it should be unrelatated to the issue. This fix here is mainly introduced to fix an issue where some data (e.g. static patient-registration files) wasn't properly cached when the page was initially loaded, requiring users to maunally refresh the page once. Though if it does happen to fix the linked issue - even better. ;)

@ZacButko ZacButko mentioned this pull request May 3, 2022
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.

3 participants