-
-
Notifications
You must be signed in to change notification settings - Fork 759
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
Add PWA manifest, service worker, and web push #751
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## main #751 +/- ##
==========================================
+ Coverage 65.70% 65.80% +0.10%
==========================================
Files 50 53 +3
Lines 7342 7648 +306
==========================================
+ Hits 4824 5033 +209
- Misses 1728 1777 +49
- Partials 790 838 +48
☔ View full report in Codecov by Sentry. |
This looks great. I have no idea what's involved to make the web push part work. I always assumed that ntfy will be a push provider, but my understanding is that that's not possible. |
It does work! I have it working with VAPID keys and no intermediate (e.g. Firebase) required. Pushing now - I will send you a message on Discord to discuss how to configure it though, that's what I'm looking at currently. |
thanks for the review and good questions. I'll respond in detail when I have some free time or after work.
much appreciated, I'm only vaguely familiar with go so I'm learning the patterns / idiomatic way of doing things as I go (haha). |
Did some work. Not even close to done.
Things I've noticed:
Lots of TODOs. Here are some major things:
(I'll do more tonight, likely) |
Alright, addressed most of the review comments. What's remaining:
Do you see anything else? |
Additional action items:
I'll try to actually get some time to try it tomorrow and on the weekend. |
Hey @nimbleghost and @binwiederhier , Just wanted to give a big THANK YOU to the both of you ❤️❤️! For my use cases, this makes ntfy even more helpful. Thanks so much and keep up the great work 🥰 |
- Use new notification request/opt-in flow for push - Implement unsubscribing - Implement muting - Implement emojis in title - Add iOS specific PWA warning - Don’t use websockets when web push is enabled - Fix duplicate notifications - Implement default web push setting - Implement changing subscription type - Implement web push subscription refresh - Implement web push notification click
Rely directly on getting it from the browser
- Use a single endpoint - Use a declarative web push sync hook. This thus handles all edge cases that had to be manually handled before: logout, login, account sync, etc. - Simplify UX: browser notifications are always enabled (unless denied), web push toggle only shows up if permissions are already granted.
URL heuristic is the second check if there is no mime
There are sometimes edge cases on iOS which cause the app to crash, it’s good to have a reload button as there’s no browser chrome (reload, back, forward) in an iOS standalone PWA.
This is required for the Stripe redirection flow
Currently translated at 100.0% (382 of 382 strings) Translation: ntfy/Web app Translate-URL: https://hosted.weblate.org/projects/ntfy/web/tr/
Resolves #346
Resolves #199
Adds a PWA manifest, service worker, the required go server routes, and VAPID-based web push
I can't test Android, but this is what it looks like on macOS and iOS: