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

Replace dummy sw.js with pre-caching and runtime-caching workbox SW #15196

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Sep 15, 2020

Service Worker

Fixes #12591

@t3chguy t3chguy requested a review from a team September 15, 2020 11:22
@turt2live
Copy link
Member

Service Worker

So many words.

Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than the prefetch, this lgtm

Comment on lines -58 to -67
<!-- Legacy supporting Prefetch images -->
<img src="<%= require('matrix-react-sdk/res/img/warning.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/e2e/warning.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/feather-customised/warning-triangle.svg') %>" width="24" height="23" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/format/bold.svg') %>" width="25" height="22" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/format/code.svg') %>" width="25" height="22" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/format/italics.svg') %>" width="25" height="22" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/format/quote.svg') %>" width="25" height="22" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
<img src="<%= require('matrix-react-sdk/res/img/format/strikethrough.svg') %>" width="25" height="22" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of these are required so the user actually sees an icon when they go offline, such as the warning triangle. The composer ones are so there isn't a delay when showing the formatting bar the first time

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, now handled by the service worker's prefetch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was it committed? I'm not seeing it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the behaviour of workbox to precache all webpack outputs which match criteria like the above

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, neat. Would be good to include that in the PR description :)

@t3chguy
Copy link
Member Author

t3chguy commented Sep 18, 2020

Blocking until after RC as it is risky

@t3chguy t3chguy merged commit 477b7a3 into develop Sep 23, 2020
@t3chguy t3chguy deleted the t3chguy/fix/12591 branch September 23, 2020 16:03
@t3chguy t3chguy restored the t3chguy/fix/12591 branch September 24, 2020 09:09
@t3chguy t3chguy mentioned this pull request Oct 1, 2020
@t3chguy t3chguy deleted the t3chguy/fix/12591 branch May 12, 2022 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

i18n can still go wrong
2 participants