-
Notifications
You must be signed in to change notification settings - Fork 64
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
Adding the Badging API feature #1376
Open
tropicadri
wants to merge
3
commits into
web-platform-dx:main
Choose a base branch
from
tropicadri:badging
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: Badging | ||
description: Using `navigator.setAppBadge()` and `navigator.clearAppBadge` installed web applications can set or remove (respectively) an application badge, which is usually shown alongside the application's icon on the device's home screen or application dock. | ||
spec: https://w3c.github.io/badging/ | ||
compat_features: | ||
- api.Navigator.clearAppBadge | ||
- api.Navigator.setAppBadge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated from: badging.yml | ||
# Do not edit this file by hand. Edit the source file instead! | ||
|
||
status: | ||
baseline: false | ||
support: | ||
safari: "17" | ||
safari_ios: "16.4" | ||
compat_features: | ||
# baseline: false | ||
# support: | ||
# chrome_android: "81" | ||
# safari: "17" | ||
# safari_ios: "16.4" | ||
- api.Navigator.clearAppBadge | ||
|
||
# ⬇️ Same status as overall feature ⬇️ | ||
# baseline: false | ||
# support: | ||
# safari: "17" | ||
# safari_ios: "16.4" | ||
- api.Navigator.setAppBadge |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unfortunate and due to the fact that BCD shows Chromium as partially implemented only.
Badging does work on Chrome and Edge, for installed apps on Windows and macOS, and is documented in multiple places. So, having web-features saying otherwise is a bit of a shame.
@foolip do you have any suggestions? How have we delt with this in the past? Should we allow some wiggle room for editorial overrides for this type of things where, yes, it's not all green, but making it red gives the wrong idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the problem is here in BCD:
https://github.com/mdn/browser-compat-data/blob/3b8d8ea67b2a4bd03e8b1aaac80cb54475e221e8/api/Navigator.json#L4229-L4233
And using
partial_implementation
there is in line with BCD guidelines:https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines/index.md#operating-system-limitations-imply-partial_implementation
This is very similar to Web Bluetooth, which is also not supported on Linux. I used a status override for that in web-features:
web-features/features/web-bluetooth.yml
Lines 19 to 21 in 9189c4c
I think we can do that here too.
Unfortunately, the dist files still have the data derived from BCD, blessed as correct:
web-features/features/web-bluetooth.yml.dist
Lines 5 to 7 in 9189c4c
@ddbeck any ideas for how we can solve this last problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so there's some distinctions to make here:
The comments don't follow the override. Would it be helpful if they did? Or at least made it clear that the overall status wasn't derived from what's shown in the comments?
Do we want to override the per-key statuses, to the value of the parent feature override? Or do we want to override the BCD key statuses, then use that to calculate the full feature status?
If we do want to be able to override per-key statuses, do want want that to happen on a per-feature basis (e.g., it's part of the feature authoring and the scope is limited to that feature)? Or on a per-key basis (e.g., we override BCD once and for all, even once we solve the keys in multiple features problem)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed #1690.