-
Notifications
You must be signed in to change notification settings - Fork 74
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
Fine-grained notifications support #973
Comments
Some thoughts on feature composition for this:
We could break out SW into separate feature as suggested above. But that makes Notifications baseline false, then in conflict w/ CIU and seems like that's against the spirit of Baseline's theory of availability. Additionally, the bookmark-to-homescreen constraint on Safari iOS seems far more restrictive to availability than Chrome Android's constraint of ServiceWorker. Given a goal of communicating general availability to developers, I recommend:
This results in an outcome that is consistent with both MDN and CIU, and aligns with the goal of communicating availability to developers in a reasonable way: The feature is available but may have platform-specific constraints. Platform variation/constraints likely need a more consistent + programmatically-detectable way of being communicated, perhaps as change in BCD. |
This one is really gnarly—it took me a while to get my head around it. SummaryThe way this feature is reported on caniuse—using two very different entry points to qualify support for the Notifications API—it's very, very difficult to compute a status that aligns with caniuse, even if we do some reasonable changes in BCD. I think option 2 (or 1+2), described below, is the way to go—drop Detailed discussion follows. The status quoThe status quo is this:
Ways to fix thisThe way I see it, there are several plausible routes forward.
|
Notifications are very limited right now. Between them not working outside of a service worker on Chrome Android, not working on iOS without first installing the app, and knowing that not all parameters (such as icon) can be used in Safari, it's a very limited feature set that's currently offered to developers. I think we have a responsibility to tell developers that, yes, notifications is a baseline feature, but (and that's a big one), they only work within specific constraints. We can communicate this by using the feature's name and description for example. But we should also communicate this by adding another, more general, feature that's not baseline. So, I agree with going for option 1 above, which means defining multiple notification features in this repo, ignoring caniuse. My 2 cents:
So, I would create multiple features for notifications in web-features:
|
Ah, OK, I really like this compromise that @captainbrosset has suggested.
We could do this, but I expect it'd be a keyless entry, like JPEG XL. If we pinned it to More sophisticated tooling would be nice, but I'm not sure I want to put a bunch of effort into extremely niche cases. Maybe something simple like, having a |
Makes sense to me.
Yeah, that would work. Mostly, I just want us to be in a place where we can easily find and review the manual features. |
Sounds good, thanks y'all, I'll update the PR to implement as two separate features in this way. |
Updated #1678 with this approach.
|
#960 revealed that support for notifications is complicated:
web-features/feature-group-definitions/notifications.yml
Lines 5 to 29 in 85a63e8
Let's sort that out. Perhaps we should define persistent notifications and non-persistent notifications as separate features, but that seems unlikely to be enough.
The text was updated successfully, but these errors were encountered: