safe-react icon indicating copy to clipboard operation
safe-react copied to clipboard

Usage tweaks to Safe Apps manifest

Open mmv08 opened this issue 3 years ago • 0 comments

Title/Description

Safe Apps manifest usage is not following standards for no reason - https://web.dev/add-manifest/#create

Examples of a wrong usage

The manifest file can have any name, but is commonly named manifest.json and served from the root (your website's top-level directory)

We fetch the app manifest relative to the app URL, for example, if the URL is app.com/nested/app, we'll try to fetch app.com/nested/app/manifest.json but according to specification, it should be app.com/manifest.json Proposed solution: Try to fetch manifest.json relatively, then fall back to the root. This way because if we change only to the root it will break existing apps like https://apps.gnosis-safe.io/tx-builder/

Proprietary iconPath prop for an icon

Manifest.json prop icons with an array of icons we can use Proposed solution: Look into icons prop first, then fallback to our proprietary prop.

.webmanifest extension can be used

We don't support this. Proposed solution: Introduce support for this file

Nice to haves

A developer asked if we could add support for the start_url prop. They have manifest deployed at the root, but the app is hosted under a nested path.

mmv08 avatar Apr 30 '21 11:04 mmv08