GithubHelp home page GithubHelp logo

Comments (6)

prtk418 avatar prtk418 commented on August 18, 2024 5

Agree with @leo-petrucci , more details on how to enable push notifications on the doc would really be helpful.

from docs.

userquin avatar userquin commented on August 18, 2024

Push notifications is out of scope from vite-plugin-pwa, check this workbox entry about using strategies: https://developer.chrome.com/docs/workbox/the-ways-of-workbox#when_to_use_injectmanifest

The elk.zone repo has push notifications and web shared target api PWA capabilities, check also the PWA cookbook in the docs for some impl. details:

You also need to deal with permissions and push notification backend registration: https://github.com/elk-zone/elk/tree/main/composables/push-notifications.

Since Elk should deal with multiple backend, the logic has some complex logic (you cannot register multiple push notification from the same app, the browser will prevent multiple registrations, will be treated as spam: https://docs.elk.zone/pwa#push-notifications-subscription-logic).

You can also check mastodon sw impl. (and the logic there using react instead vue): https://github.com/mastodon/mastodon/tree/787279ad67cb9bd06b4628943f19ae8054a60b33/app/javascript/mastodon/service_worker

from docs.

leo-petrucci avatar leo-petrucci commented on August 18, 2024

Hey @userquin, thank you for the quick reply.

Push notifications is out of scope from vite-plugin-pwa

That's absolutely understandable, that's why it's not supported by default. However, they are important enough to be mentioned in the documentation.

Is there a specific reason as to why the docs on Push implementation shouldn't be expanded?

As I said I've looked at all the resources and browsed the Discord for a bit, there were quite a few people that were confused by how to do Push. You were there to help them, thankfully, but wouldn't it be better if that info was somewhere official and accessible to all without joining the Discord?

As good as Elk is I don't think linking to the repo and telling people to figure it out is great DX.

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.