Skip to content

Conversation

@Elchi3
Copy link
Collaborator

@Elchi3 Elchi3 commented Nov 29, 2024

No description provided.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Nov 29, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we deal with the lack of support in Edge and Chrome here?

BCD says it's partial, and I think that's because you're first required to install the app as a PWA on desktop. Then it works. See the LMC docs and MDN docs about this.

Developers who want to use badges most likely want to do so in context of an installed PWA. That's because badges don't do anything in standard browser tabs otherwise.

One option: add a new BCD subfeature called something like api.Navigator.setAppBadge.on_installed_desktop_pwa and set it as fully supported on Chrome and Edge desktop, and then use that subfeature here. Or, perhaps define two features: one like the one you have here, unchanged, and another one called app-badging.yml, which uses the new api.Navigator.setAppBadge.on_installed_desktop_pwa.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're ok with creating two features, then we can merge this PR as is, and then create a follow-up PR for the PWA-specific feature.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think BCD has set this to partial because it is Windows and macOS only, missing Linux.

https://chromestatus.com/feature/6068482055602176 says:

Shipped on Windows, macOS and ChromeOS.
Android and Linux support are unlikely as those platforms don't have a comparable badge API. (Linux has one on some window managers but nothing universal; Android's Badge API is tied to notifications and only allows badges to be suppressed, not activated.)

So, I would say BCD should set it to full support for Chrome Desktop and Edge Desktop given it is implemented as much as the current operating systems allow it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mdn/browser-compat-data#25375 updated the Chromium status for setAppBadge (no longer partial). I guess I should have set the same for clearAppBadge.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ready to land, now that the changes have been merged upstream.

I did have one (optional) suggestion for the description, but I think you're free to merge when it's ready.

Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
@Elchi3 Elchi3 merged commit 51555a2 into web-platform-dx:main Dec 17, 2024
3 checks passed
@Elchi3 Elchi3 deleted the badging branch December 17, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants