w3c / miniapp-manifest

MiniApp Manifest
https://w3c.github.io/miniapp-manifest/
Other
7 stars 8 forks source link

Added two attributes to support the selection of color mode and device types #23

Closed MichaelWangzitao closed 3 years ago

MichaelWangzitao commented 3 years ago

Propose to adding two attributes: color_mode and device_type. For color_mode, it allows developers to define the default theme color, e,.g. light, dark, or automatically adjust with the system. Can be used for branding, improved visibility for people with poor vision and strong light, and better use of MiniApp in low light environments. For device_type, it allows developers to specify the type of devices on which the MiniApp can be installed to support cross-platform capabilities of the same app, reducing repeated development. The device types may include mobile phones, tablets, vehicle-mounted devices, wearable devices, TVs, and IoT devices.


Preview | Diff

zhangyongjing commented 3 years ago

It's better to clarify the usage of the 'device_type' member, e.g. how should the platform react if the hosting device doesn't match the configured value.

xfq commented 3 years ago

The explainer and JSON schema also need to be updated.

awentzel commented 3 years ago

I'd like to understand if this is really needed given the capability of Progressive Web Apps. Web tech should always support running across platforms, more about screen size?

Ternence commented 3 years ago

I prefer using API to describe the device type if it doesn't need getting the device info before the runtime prepareation. link to (API-getSystemInfo) API is more suitable for any MiniApp to obtain the user agent info it needs.