cinnyapp / cinny

Yet another matrix client
https://cinny.in
GNU Affero General Public License v3.0
1.87k stars 242 forks source link

Feature Request: PWA #17

Open farribeiro opened 3 years ago

farribeiro commented 3 years ago

https://web.dev/progressive-web-apps/

vwkd commented 2 years ago

I think this issue confuses PWA with just being responsive.

frostedkitsune commented 2 years ago

I think this issue confuses PWA with just being responsive.

I think so PWA and responsive design are two different things....btw, what is the progress on any of this topic?

C0ffeeCode commented 2 years ago

This might be interesting regarding this issue: https://developer.mozilla.org/en-US/docs/Web/API/Badging_API

RihanArfan commented 2 years ago

PWA will allow Cinny to be installable on desktop or mobile and make it feel like a native app. Other things can be done like full offline support so it loads fully from the cache.

This might help. https://create-react-app.dev/docs/making-a-progressive-web-app/

reesericci commented 2 years ago

I would like to see PWA support, as then I could use Cinny on my phone like a native app.

Iruwen commented 2 years ago

I assume we need a PWA service worker to get true push notification support on mobile besides caching, so this would be a killer feature.

C0ffeeCode commented 2 years ago

I had been working on implementing background notifications using service worker, but it requires changes to how Cinny saves the token since localstorage, where it lives today, is not available in serviceworkers, so it would have to be migrated to indexeddb. If someone is interested to take it over: https://github.com/c0ffeecode/cinny/tree/background-notifications

It takes advantage of push gateways and ntfy, so it can listen for notifications using WebSockets efficiently.

As for the Tauri build, it propably would be better implement background notifications in rust.

genofire commented 2 years ago

@C0ffeeCode it sounds you do not use VAPID WebPush Notification for this insteat: https://support.mozilla.org/en-US/kb/push-notifications-firefox

Like hydrogen-web it does: https://github.com/vector-im/hydrogen-web

Iruwen commented 2 years ago

By its description it doesn't sound like there's an "instead" due to its severe limitations.

rltas commented 2 years ago

Looks like it'll become much more useful "soon": https://webkit.org/blog/12945/meet-web-push/ https://firt.dev/ios-15.4b#web-push-notifications-on-ios%EF%BC%8Dwith-a-catch

genofire commented 1 year ago

See also #867 for non web

RihanArfan commented 1 year ago

Now that we're using Vite, we can use Vite PWA. https://vite-pwa-org.netlify.app/frameworks/react.html

jasikpark commented 1 year ago

web notifs nearly work today on iOS Safari 16.4, except there seems to be a bug in the notif system, where it doesn't think it does have perms?

I have #1231 up to fix the rendering issue, though since there's not a service worker, that PR doesn't fix iOS notifications

jasikpark commented 1 year ago

https://elk.zone is a good example of a PWA w/ web push on iOS: https://github.com/elk-zone/elk/blob/e9740fe693cfec761cce69d47d25dc98825d0ce2/service-worker/web-push-notifications.ts#L4

jasikpark commented 1 year ago

https://developer.apple.com/documentation/usernotifications/sending_web_push_notifications_in_web_apps_safari_and_other_browsers

NovaAndrom3da commented 9 months ago

I would love to have proper iOS notification support, that seems to be the only thing I'm missing

filipesmedeiros commented 9 months ago

This is a low hanging fruit if we just want to enable installation, basically just add a web manifest, right?

MulverineX commented 9 months ago

Features like offline support & web push integration would be great, but yeah just getting the manifest and a dummy service worker in so installs are possible would be great. ( @filipesmedeiros simply adding the manifest isn't enough, browsers will refuse to install the PWA if there is no service worker present )

filipesmedeiros commented 9 months ago

@MulverineX that sounds right. Still easy just to enable installation, imo eheh

RihanArfan commented 9 months ago

Features like offline support & web push integration would be great, but yeah just getting the manifest and a dummy service worker in so installs are possible would be great. ( @filipesmedeiros simply adding the manifest isn't enough, browsers will refuse to install the PWA if there is no service worker present )

Now that we're using Vite, we can use Vite PWA. https://vite-pwa-org.netlify.app/frameworks/react.html

Vite PWA can take care of all of this for us. I'm not familiar with React, otherwise I'd submit a PR to implement it.

likeazir commented 2 months ago

So, I really wanted to use cinny on mobile with true reliable background notification support, so i looked into fcm webpush and hacked some crude notifications into the app. However, I have never touched javascript or anything web related before so it's really messy at the moment and very much work in progress. Maybe I'll do a PR when I have the time to clean it up and do it properly. Just putting it out there if someone else is working on this :)

williamkray commented 2 weeks ago

So, I really wanted to use cinny on mobile with true reliable background notification support, so i looked into fcm webpush and hacked some crude notifications into the app. However, I have never touched javascript or anything web related before so it's really messy at the moment and very much work in progress. Maybe I'll do a PR when I have the time to clean it up and do it properly. Just putting it out there if someone else is working on this :)

you, uh, had any time to put this somewhere that someone else could see it by any chance @likeazir ?