w3c / manifest-app-info

Web App Manifest - Application Information
https://w3c.github.io/manifest-app-info/
Other
27 stars 14 forks source link

Standardize members for "screenshots" member #25

Closed FluorescentHallucinogen closed 3 years ago

FluorescentHallucinogen commented 3 years ago

See https://twitter.com/mariusclaret/status/1350764987556519937 for context (request).

Browsers expose more fields (including screenshots) from web app manifest to PWA install prompt. See https://twitter.com/firt/status/1350161036897300484 for implementation in Chrome on Android. I expect the same for desktop.

So there is a need to distinguish screenshots by platform to display e.g. only mobile screenshots on mobile, desktop screenshots on desktop, etc.

I've seen "platform" and "label" for screenshots in https://sadchonks.com/manifest.json, but it seems they are not in the spec.

(IMO, "description" instead of "label" is a better name for text that is displayed on screenshot hover.)

Is the "purpose" member (with "mobile", "tablet", "desktop" values) valid member of "screenshots" member?

Anyway, I believe that "purpose" member alone isn't enough. E.g. there are Andoid phones and Android tablets. "platform" is more about OS ("xbox", "android", etc.), "purpose" is more about form-factor.

BTW, currently, there is the "platform" member for "related_applications", but it represents a software distribution ecosystem ("play", "itunes", "chrome_web_store", etc,) (see https://github.com/w3c/manifest/wiki/Platforms).

So maybe it makes sense to name them "os" and "form_factor"?

Also, what about optional "orientation" member with ("landscape" and "portrait" values) for screenshots?

This should also helps app stores opened for PWAs (Samsung Galaxy Store, Microsoft Store, etc.) to check requirements and publish PWA by manifest URL.

E.g, here are the Google Play’s screenshot requirements:

  • If you have an app for different devices (think: Tablet, Android Wear, etc.) you must upload screenshots specific to each device
  • Images must be in JPEG or 24-bit PNG
  • A minimum of 2 screenshots is required
  • Minimum dimension: 320px, maximum dimension: 3840px
FluorescentHallucinogen commented 3 years ago

@finnurbreki @rayankans @beverloo @b1tr0t @aarongustafson @torgo PTAL.

kenchris commented 3 years ago

https://www.w3.org/TR/manifest-app-info/#platform-member

aarongustafson commented 3 years ago

Since screenshots have moved to App Info, I’m transferring this there…

mgiuca commented 3 years ago

It looks like this has already happened (per the link @kenchris posted above) so maybe we can close it.

However, this doesn't seem right to me and I'd prefer if we can get rid of it if it hasn't already been implemented. This runs counter to the "avoid OS-specific metadata" advice in my Manifest design philosophy doc. While "screenshots" is just store metadata, not core manifest data, I think the same idea still holds.

We're trying to build a fully portable platform here. Developers ideally should not have to care at all about which "platform" their application runs on, other than "the Web platform". (Obviously it's still a good idea to test it on as many host platforms as possible, because bugs, but we shouldn't be designing around the idea that developers need to add platform-specific metadata.)

If certain stores or platforms have specific requirements (like "Images must be in JPEG or 24-bit PNG"), we should not be passing on those requirements to the web app developer. Whatever tool scrapes the manifest should perform the appropriate conversions.

It would be fine to have categories, form factors, etc. I wouldn't be opposed to having an "orientation" (portrait or landscape) or a "form_factor" (desktop, mobile, tablet) field, which you can use to provide screenshots showing how your app looks in different logical screen shapes and sizes. I don't want to ask developers to provide screenshots for "android", "chromeos", "kaios", "xbox", etc. That is unsustainable, and in theory the only difference between them should be the different store constraints such as min/max image size and format. That's something that the tool that scrapes the manifest and converts it into a store listing should deal with, not the developer.

I've seen "platform" and "label" for screenshots in https://sadchonks.com/manifest.json, but it seems they are not in the spec.

I took "platform" out of the manifest spec awhile ago due to breaking the above philosophy. I see it's back. :(

Can we remove it again, if this hasn't yet been implemented anywhere?

b1tr0t commented 3 years ago

form_factor & orientation members seem like the right approach.

aarongustafson commented 3 years ago

I took "platform" out of the manifest spec a while ago due to breaking the above philosophy. I see it's back. :(

That may have been a factor of the time at which this branched from the manifest spec. I’d always thought of platform as a member of last resort, for use if you were highlighting something specific to only one platform (without wide adoption), but I understand your concerns @mgiuca. I’m cool with removing platform from the App Info spec as well.

I like the idea of orientation & form_factor, however I think implementors should also be able to infer both from sizes. What would be the added benefit of explicitly calling that out?

aarongustafson commented 3 years ago

I've seen "platform" and "label" for screenshots in https://sadchonks.com/manifest.json, but it seems they are not in the spec.

The label will be is in the ImageResource spec.

FluorescentHallucinogen commented 3 years ago

What about description instead of label?

aarongustafson commented 3 years ago

What about description instead of label?

@FluorescentHallucinogen See the discussion in #7.