-
Notifications
You must be signed in to change notification settings - Fork 31
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
chore/sw_cache #512
chore/sw_cache #512
Conversation
/build |
/build |
/build |
/build |
/build |
/build |
/build |
/build |
/build |
@@ -3,11 +3,13 @@ import { PayloadAction, createSlice } from "@reduxjs/toolkit"; | |||
interface IUIState { | |||
isLoading: boolean; | |||
error: string; | |||
serviceWorkerUpdated: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не очень улавливаю, зачем нам знать что сервис воркер обновился, и что вообще мы в это понятие вкладываем?
В мр'е не вижу чтобы где-то использовалось это поле в приложении
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/moira-alert/web2.0/pull/512/files#:~:text=const%20%7B%20serviceWorkerUpdated%20%7D%20%3D%20useAppSelector(UIState)%3B
используется для тоста с предложением обновиться
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ссылка не работает к сожалению, но я понял что не увидел это место.
Мне не нравится название serviceWorkerUpdated
, вообще не отражает сценарий, что мы предлагаем пользователю обновить страницу
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно наверно переименовать во что-то по типу newFrontendVersionAvailable
или needToUpdateFrontend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
переименовал
/build |
/build |
Build and push Docker images with tag: 2024-05-21.0589cf0 |
precaching static files with workbox-webpack-plugin
the main reason was to get rid of chunk load error, which happend during release with active browser tab, at the same time overall loading time has decreased.
precache works on the background and updates on every service worker registration, so to get new version you just need to refresh the page.
added page reload notification when new version is available