- From: carlosjeurissen <notifications@github.com>
- Date: Wed, 10 Apr 2024 05:19:26 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/issues/1045/2047395947@github.com>
Quick update on the progress of the discussion in the WebExtensions Community Group ([WECG](https://github.com/w3c/webextensions)). See https://github.com/w3c/webextensions/pull/585 and https://github.com/w3c/webextensions/issues/229. We concluded a new top level member needs to be introduced and I believe this is the moment we can align on a common syntax for both web app manifests and webExtensions.
It seems in above discussion the purpose-built objects and members seems to be the way forward. A potential structure could be the following:
```json
[{
"any": "16.svg",
"type": "image/svg+xml"
}, {
"16": "mono16.png",
"32": "mono32.png",
"type": "image/png",
"purpose": "monochrome"
}, {
"16": "mono16fr.png",
"32": "mono32fr.png",
"type": "image/png",
"purpose": "monochrome",
"lang": "fr"
}, {
"16": "dark16@2x.png",
"32": "dark32@2x.png",
"type": "image/png",
"color_scheme": "dark",
"density": 2
}, {
"16": "light16.png",
"32": "light32.png",
"type": "image/png",
"color_scheme": "light"
}, {
"16": "default16.png",
"32": "default32.png",
"type": "image/png"
}]
```
Some benefits are skipping repeated props (like type). Making the syntax less verbose.
A similar tactic could be used for other properties like `name` and `short_name`. Joining them together to drop ambiguity for which should be applied. Say a translated member for `name` in French exists. But a `short_name` in French is lacking. Ideally the browser would use the `name` in French and truncate it if needed. This could be implied by using a syntax like:
```json
{
"names": [{
"full": "Some amazing app",
"short": "Amazing",
"lang": "en en-US"
}, {
"full": "Une application étonnante",
"lang": "fr"
}]
}
```
We can then restrict the filters (`lang`, `color_scheme`) to the members for which it would make sense.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/issues/1045#issuecomment-2047395947
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/manifest/issues/1045/2047395947@github.com>
Received on Wednesday, 10 April 2024 12:19:30 UTC