w3c / manifest

Manifest for web apps
https://www.w3.org/TR/appmanifest/
Other
658 stars 161 forks source link

badge purpose "monochrome" is only supported by Firefox #905

Closed marcoscaceres closed 1 year ago

marcoscaceres commented 4 years ago

As the badge purpose "monochrome" is only supported by Firefox, it is at risk of being removed from the specification. Implementers should express interest in supporting this feature if they would like it to remain in the specification.

mgiuca commented 4 years ago

Chrome: Filed https://crbug.com/1096388

As I said on #833, I can't commit to us actually using this but I think it's useful to have it defined and I'll advocate for it to be used when an appropriate context arises.

marcoscaceres commented 4 years ago

Thanks @mgiuca, the feature is explicitly marked at risk in the spec, so we will await your feedback in #905.

Screenshot 2020-06-18 17 13 01
kenchris commented 4 years ago

@aarongustafson I assume this would also be useful for Edge and the Microsoft design system - maybe something Microsoft would be interested in adding support for?

fahei commented 4 years ago

I find a blank version of the icon very useful. A one-color icon is already needed for the safari mask-icon to display the logo in the touch bar. User agents could do a lot with a blank, standard version of the normal icon e.g. when having a design schema to automatically fit the icon in the design schema: The icon color is red, background is black with a padding of x. It could also be useful for share-icon-generation, so the icon can easily fit to the share-icon-design.

christianliebel commented 3 years ago

Chrome: Filed https://crbug.com/1096388

As I said on #833, I can't commit to us actually using this but I think it's useful to have it defined and I'll advocate for it to be used when an appropriate context arises.

@mgiuca The crbug was marked as Fixed/Closed. Can that be interpreted as your support for this monochrome purpose?

phoglenix commented 3 years ago

I'm the last eng person on Chrome to touch icon purposes (not a PM!). https://crbug.com/1096388 was tracking the rename of purpose "badge" to "monochrome". That part is done. https://crbug.com/1114638 is tracking adding support for icons with purpose "monochrome" (not a commitment to do so).

I believe @mgiuca's comment is still accurate. Chrome is not actually using "monochrome" currently but would support it remaining in the spec because it's likely to be useful in the future.

mgiuca commented 3 years ago

Yeah so this is just in Firefox as far as we can tell.

I think @NotWoods renamed it in Firefox, correct? And it's landed in the spec. So that means it's renamed everywhere that it exists.

It isn't implemented outside of Firefox, so that puts it at risk in the spec, however, Google supports keeping it just because we think we'll want it some day. If it gets taken out of the spec due to only one implementation, c'est la vie. It can come back later.

aarongustafson commented 3 years ago

Just making a note here: Once this has broader adoption, we will need to add it to the Web Platform Tests. I am removing it from #666 so it doesn’t hold up CR.

loyso commented 3 years ago

Chrome M93 recognizes "monochrome" icon purpose for both primary icons and shortcut menus (jump lists). https://bugs.chromium.org/p/chromium/issues/detail?id=1114638

It's not yet exposed in Chrome UI yet, will be used in Notifications in M94-M95.

FluorescentHallucinogen commented 3 years ago

Chrome M93 recognizes "monochrome" icon purpose for both primary icons and shortcut menus (jump lists). https://bugs.chromium.org/p/chromium/issues/detail?id=1114638

It's not yet exposed in Chrome UI yet, will be used in Notifications in M94-M95.

Two questions:

  1. Is it only for Chrome on desktop? What about Chrome on Android?

  2. Are icons declared in web app manifest really used for notifications? 🤔 As far as I know showNotification(title, options) method uses icon property from options argument. See https://web-push-book.gauntface.com/display-a-notification/. If the options object has no icon property, then default browser icon used. Isn't it?

marcoscaceres commented 3 years ago

@dmurph 👆

dmurph commented 3 years ago
  1. I believe this is only ChromeOS - but @loyso is the right person to ask here
  2. I think the goal is to never use the browser icon, and instead use icons from the manifest.
loyso commented 3 years ago

Hi all! Thanks for asking!

  1. Yes - it is ChromeOS only. For Android: ask peter@chromium.org to add a UI support? :)

Aside: you can enable/try it on Linux: https://bugs.chromium.org/p/chromium/issues/detail?id=1236313 (not launched yet). MacOS and Win would require a system notifications explorations, But you can try and enable the flag on other Desktop OSes.

  1. With this change we have the following order of precedence (from low to high): a. Chrome logo (default browser icon). b. Web app icon from the manifest, when available. c. Notification-specific icon, when available (options.badge parameter in SW registration.showNotification() API)

I hope that helps, happy to chat! (For example: #pwas on Chromium Slack https://app.slack.com/client/T039UTRBS/CGK77JY3W)

mkruisselbrink commented 1 year ago

Reopening since this issue is still referenced from the spec. If this is actually no longer an issue, presumably the spec should no longer say it is?

mathix420 commented 1 year ago

I created this issue a while ago https://crbug.com/1468845 It seems to be ongoing.

mgiuca commented 1 year ago

Yes, this should just be removed from the spec. (I'm rushing through my old email right now so I won't do it immediately, leaving this bug open, but just a note for future people that we should just delete the reference to this issue from the spec, and close it.)

christianliebel commented 1 year ago

@mgiuca I will take care of this.

shane-smith commented 1 year ago

Is this not used for Android 13's monochrome themed icons?

https://developer.android.com/develop/ui/views/launch/icon_design_adaptive#user-theming

Attempting to implement for a PWA, and assumed this was the approach to take. But this discussion seems to imply that the two are unrelated.

EDIT: Indeed, with testing it seems that it isn't recognised by Android at the moment.

EDIT 2: I see that @mathix420 has already raised this here as a Chrome on Android bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=1468845

NotWoods commented 1 year ago

Yes, this is intended to be used for the themed icons in Android. Since it's currently used for shortcuts on Android, this issue is about removing the firefox-only warning rather than removing monochrome icons.