WICG / background-fetch

API proposal for background downloading/uploading
https://wicg.github.io/background-fetch/
Apache License 2.0
281 stars 42 forks source link

Replace IconDefinition with ImageResource #84

Open rayankans opened 6 years ago

rayankans commented 6 years ago

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.

jakearchibald commented 6 years ago

Excellent, this is exactly what I was looking for.

dbaron commented 6 years ago

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...

mugdhalakhani commented 6 years ago

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).

jakearchibald commented 6 years ago

@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 commented 6 years ago

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