- From: hober <notifications@github.com>
- Date: Mon, 14 Feb 2022 14:18:12 -0800
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3ctag/design-reviews/issues/696/1039627876@github.com>
@loubrett [wrote](https://github.com/w3ctag/design-reviews/issues/696#issuecomment-1038549150): > I think it is good to try and keep the structure as simple as possible while allowing for extensibility All things being equal, simpler is better, yes. But I don't think your proposed structure & @plinss' alternative are equal. Specifically: > The keys are based off [css media queries](https://drafts.csswg.org/mediaqueries-5/#mf-user-preferences) by removing the 'prefers' and adding the value at the end. […I]f more color schemes are added these will be color_scheme_x. Using key names that mix names and values together like this suffers from the problem @plinss identified, namely, in order to iterate over these things, you have to parse the microsyntax used for the key names. Using a structure that has one more level of nesting, as @plinss suggested, would avoid this problem. > We also want the structure of this field to match the proposed [translations](https://github.com/WICG/manifest-incubations/blob/gh-pages/translations-explainer.md) structure . But the `translations` structure looks like @plinss' suggestion and not what you ended up with! For instance, see this example from the translations explainer: ``` { "name": "Good dog", "description": "An app for dogs", "icons": [], "screenshots": [], "lang": "en", "translations": { "fr": { "name": "Bon chien", "description": "Une application pour chiens", "icons": [], "screenshots": [] } }, } ``` If the `translations` structure was like yours, we'd see a flatter structure with a `"translations_fr"` key in it. -- Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/696#issuecomment-1039627876 You are receiving this because you are subscribed to this thread. Message ID: <w3ctag/design-reviews/issues/696/1039627876@github.com>
Received on Monday, 14 February 2022 22:18:24 UTC