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

Conditionally installing service workers on registered scripts or offline browsing enabled. #727

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

rutviksavsani
Copy link
Contributor

Fixes: #436

This PR conditionally installs the service worker when there are Service Worker scripts coming from other plugins or if the offline browsing option of the PWA plugin is enabled.

Implementation

pwa-test.Just.another.WordPress.site.mp4

@rutviksavsani rutviksavsani marked this pull request as draft March 14, 2022 06:16
@codecov-commenter
Copy link

Codecov Report

Merging #727 (373c0ef) into develop (f6e2a48) will decrease coverage by 0.09%.
The diff coverage is 10.52%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #727      +/-   ##
=============================================
- Coverage      18.41%   18.32%   -0.10%     
  Complexity       334      334              
=============================================
  Files             57       57              
  Lines           2270     2303      +33     
=============================================
+ Hits             418      422       +4     
- Misses          1852     1881      +29     
Flag Coverage Δ
php 18.32% <10.52%> (-0.10%) ⬇️
unit 18.32% <10.52%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
wp-includes/default-filters.php 0.00% <0.00%> (ø)
wp-includes/service-workers.php 24.19% <100.00%> (+5.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6e2a48...373c0ef. Read the comment docs.

@rutviksavsani rutviksavsani marked this pull request as ready for review March 14, 2022 09:56
@westonruter westonruter added this to the 0.8 milestone Apr 15, 2022
@westonruter westonruter modified the milestones: 0.8, 0.9 Jan 24, 2024
@westonruter westonruter modified the milestones: 0.8.1, 0.9 Apr 2, 2024
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.

Only serve offline/error page if Offline Browsing is enabled; conditionally install service worker
3 participants