Skip to content
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

PWA manifest and push notifications #218

Closed
Tracked by #191
ygupta81 opened this issue Oct 14, 2022 · 5 comments
Closed
Tracked by #191

PWA manifest and push notifications #218

ygupta81 opened this issue Oct 14, 2022 · 5 comments
Labels
focus-area-proposal Focus Area Proposal

Comments

@ygupta81
Copy link

Description

Today there are a few incompatibilities which make working of PWAs (Progressive Web Apps) difficult across browsers

Web app manifests - https://web.dev/add-manifest/

This a JSON file that tells the browser about your Progressive Web App and how it should behave when installed on the user's desktop or mobile device. There are a lot of incompatibilities across browsers even for “standard” web app manifest fields like scope, start_url and display. More details can be seen here - https://developer.mozilla.org/en-US/docs/Web/Manifest#browser_compatibility

Push notifications - https://web.dev/notifications/

This allows service to push messages to browser even when website is not opened. Push API, Notification API: requestPermission and ServiceWorkerRegistration API: showNotification today are not supported by iOS Safari. More details at below links:-

https://caniuse.com/?search=push%20api

https://caniuse.com/mdn-api_notification_requestpermission

https://caniuse.com/mdn-api_serviceworkerregistration_shownotification

Rationale

These incompatibilities make life of web developers difficult with respect to following:-

  1. Implementing features like Add to Home Screen with PWAs cannot be done in a consistent way
  2. Implementing push notifications via service worker is not possible in iOS Safari today

Specification

Tests

https://wpt.fyi/results/push-api?label=stable&label=master&aligned&view=subtest

@ygupta81 ygupta81 added the focus-area-proposal Focus Area Proposal label Oct 14, 2022
This was referenced Oct 20, 2022
@tbondwilkinson
Copy link

This would be useful for Google's server framework.

"We provide out of the box support for manifest features, having consistent handling across browsers seems useful"

@gsnedders
Copy link
Member

gsnedders commented Oct 24, 2022

This a JSON file that tells the browser about your Progressive Web App and how it should behave when installed on the user's desktop or mobile device. There are a lot of incompatibilities across browsers even for “standard” web app manifest fields like scope, start_url and display. More details can be seen here - https://developer.mozilla.org/en-US/docs/Web/Manifest#browser_compatibility

To look at those fields:

  • scope has green ticks or unknown,
  • start_url again has green ticks or unknown,
  • display has green ticks or unknown except for Safari on iOS which is partial and "does not support fullscreen or minimal-ui" (which is debatably true: I believe Safari on iOS correctly implements https://w3c.github.io/manifest/#choosing-a-display-mode, even though it doesn't have distinct UI for all of them).

It's also not clear if any of these can be tested in an automated manner due to many UAs only implementing this on mobile (and WPT not having mobile testing) as well as difficulties in testing what often requires browser UI interaction.

This allows service to push messages to browser even when website is not opened. Push API, Notification API: requestPermission and ServiceWorkerRegistration API: showNotification today are not supported by iOS Safari.

If the goal here is to test Safari on iOS, this similarly struggles with the lack of mobile testing. Even on desktop, however, we're still limited to testing the existence of the API, not whether it does anything useful.

@gsnedders gsnedders reopened this Oct 24, 2022
@gsnedders
Copy link
Member

(not sure how I managed to hit the "close with comment" button there, but apparently I did)

@foolip
Copy link
Member

foolip commented Nov 11, 2022

In the MDN short survey on APIs & JavaScript, "Push notifications" was selected by ~26% of survey takers, putting it in the top third of options. (There is some uncertainty as with any survey data.)

@nairnandu
Copy link
Contributor

Thank you for proposing PWA manifest and push notifications for inclusion in Interop 2023.

We wanted to let you know that this proposal was not selected to be part of Interop this year.

Some aspects of this technology are expected to work differently between implementations (e.g. due to differing OS conventions). As a result, for the technology that is intended to be interoperable, we are unable to automate tests using the current web-platform-tests infrastructure. For example, we have no means for testing push notifications.

We welcome proposals for future years, although as general advice we suggest scoping any future proposals more narrowly, as smaller, clearly scoped proposals are easier to assess and prioritize.

For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023!

Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
No open projects
Status: Proposed
Development

No branches or pull requests

5 participants