Resolve "Review and fix/improve PWA behaviour and serviceworker" #1981
No reviewers
Labels
No labels
Security
TeX
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
part
ci
part
docs
part
frontend
part
i18n
part
non-technical
part
packaging
prio
1
prio
2
prio
3
release-mr-5.x
size
large
size
medium
size
small
source
customer
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
type
breaking
type
bug
type
feature
type
refactoring
workflow
blocked
workflow
confirmed
workflow
current-todo
workflow
discussing
workflow
new-app
workflow
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aleksis/AlekSIS-Core!1981
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "230-review-and-fix-improve-pwa-behaviour-and-serviceworker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #230
added 1 commit
Compare with previous version
added 2 commits
Compare with previous version
unmarked as a Work In Progress
Finished and can be merged.
added 1 commit
Compare with previous version
added 11 commits
masterCompare with previous version
added 1 commit
Compare with previous version
Please use a context wrapper here.
marked as a Work In Progress
Could you please explain this?
changed this line in version 7 of the diff
added 1 commit
Compare with previous version
added 203 commits
masterCompare with previous version
changed this line in version 9 of the diff
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
resolved all threads
assigned to @nik
added 1 commit
Compare with previous version
unmarked as a Work In Progress
added 1 commit
Compare with previous version
Iff these regexes indeed match anywhere in the request path, these will break all requests that contain these words anywhere.
marked this merge request as draft
changed this line in version 13 of the diff
added 2 commits
Compare with previous version
added 1 commit
Compare with previous version
resolved all threads
So I guess I made a mistake; the serviceworker can indeed access the response headers.
This can be merged now.
marked this merge request as ready
resolved all threads
STATIC_ROOTis not guaranteed to be writable at runtime, so as explained before, this should happen when runningcollectstatic.I also do not see why cache name and fallback path should be configurable, and precache paths are also unnecessary (even more so, given that the default, which includes
/, is wrong, as/is not guaranteed to be the dashboard, and even now is not the dashboard under all conditions — consider that precaching happens before the first login, so if this precaches anything, it precaches a redirect or the login page; and after login, the dashboard is cached hen loading even without leveraging precaching).So to conlude — just drop all of that and make the service worker static.
changed this line in version 15 of the diff
added 1 commit
Compare with previous version
resolved all threads
added 1 commit
Compare with previous version
Unused import
Apart from the outdated
supersyntax (just usesuper()` nowadays), this is a pretty useless mixin.Please use
method_decoratorwith thenever_cachedecorator directly on the class instead.Please use
method_decoratorwith thenever_cachedecorator directly on the class instead.Please use
method_decoratorwith thenever_cachedecorator directly on the class instead.Where is this used, and why?
Please clean up the commit history (squashing commits that add/remove the same thing).
Why though?
Nowhere. Forgot to remove it.
From the Zen of Python:
Using the decorator directly is as short as using the mixin, but clearly conveys what is happening without looking at another file.
There is already one obvious way to apply a decorator to a class-based view, as described in the Django docs.
Also, if a view decides to override the
dispatchmethod, the mixin would break, requiring developers to mix both ways in the same codebase, and developers might need finer-grained control over which methods are decorated (e.g. decoratingoptionsorheadis wrong in quite a few cases, requiring to drop the mixin and go with the method decorator again).Also, you should research how method resolution works with multiple inheritance, Your mixin breaks surprisingly easily.
changed this line in version 17 of the diff
changed this line in version 17 of the diff
changed this line in version 17 of the diff
changed this line in version 17 of the diff
changed this line in version 17 of the diff
changed this line in version 17 of the diff
added 2 commits
Compare with previous version
resolved all threads
Unrelated change
Please strip blank lines from the end.
changed this line in version 18 of the diff
changed this line in version 18 of the diff
added 7 commits
Compare with previous version
resolved all threads
Still not clean.
While at it, also please reword all commit messages that fo not follow our commit message guidelines.
added 34 commits
master9c251e1a- Add serviceworker template, settings and file replacement functionality01d5b7f7- Add never_cache decorator for several viewsd03ac424- Fix precaching of offline fallback pageCompare with previous version
resolved all threads
resolved all threads
mentioned in commit
aee5dbb016