background-fetch icon indicating copy to clipboard operation
background-fetch copied to clipboard

Replace IconDefinition with ImageResource

Open rayankans opened this issue 6 years ago • 5 comments

Use the ImageResource dictionary defined in the Web App Manifest spec (https://www.w3.org/TR/appmanifest/#imageresource-and-its-members) to pass the icons.

rayankans avatar Jun 18 '18 20:06 rayankans

Excellent, this is exactly what I was looking for.

jakearchibald avatar Jun 19 '18 12:06 jakearchibald

So IconDefinition in background-fetch currently says it's derived from ImageResource in manifest, but it's actually a bit different: in the last 2 members of the latter, in the types (DOMString vs USVString), and in the presence of "" defaults. In some ways it looks a lot like ImageObject from payment-handler which is also missing the last 2 members.

I got here from w3ctag/design-reviews#279... and I'm also wondering if I'm now the TAG member who always says "hey, look, another way to specify icons". It would certainly be nice to sort this out at some point...

dbaron avatar Jul 25 '18 22:07 dbaron

Background Fetch code uses ImageResource, the spec just needs to be updated. The plan is to replace IconDefinition with ImageResouce in the spec, which will support USVString instead. (Payment Handler code also uses ImageResource in some of its logic, i.e., icon selection. We should look into why we can't use it everywhere).

mugdhalakhani avatar Jul 26 '18 08:07 mugdhalakhani

@dbaron

I'm also wondering if I'm now the TAG member who always says "hey, look, another way to specify icons". It would certainly be nice to sort this out at some point...

😀

Really appreciate the pointers here. I don't particularly want to maintain yet another icon definition.

jakearchibald avatar Jul 26 '18 09:07 jakearchibald

@beverloo gonna pick this up. The UI bits are some of the last TODOs.

jakearchibald avatar Aug 20 '18 15:08 jakearchibald