Repository navigation
Release v1.15.0
v1.15.0
Changelog
Optional brand consumer (spec 220 S4). No change for hosts without a nowo-tech/brand-contracts brand provider. See
UPGRADING.
Added
- Brand from a
BrandProviderInterfaceservice (nowo-tech/brand-contracts^1.0, optional): when the app has a
brand provider (InstanceSettingsBundle's opt-in brand bridge, or a small host class), the manifest and the head tags
read the brand. Thenowo_pwaconfiguration stays the fallback for everything the brand does not give, and for
everything when there is no provider or the provider fails (the error is logged, the manifest and the page never
fail because of the brand).- Manifest (new
BrandManifestOverlayProvider, tagnowo_pwa.manifest_overlay_provider, priority 1024, so host
overlays still run after it):theme_colorfrom the lightprimary,background_colorfrom the lightpaper,
andiconsfrom theapp_iconslot (after the contract's fallback chain to a squaremarkof 512 px or more)
when it is PNG, JPEG or WebP, square and at least 192 px: oneanyentry and, for anapp_iconof 512 px or
more, onemaskableentry. SVG, ICO and other images are never used as icons; the configuredmanifest.icons
then stay.nameandshort_namecome from the brand only when it is not the default brand (Beacon's rule),
unlessbrand.override_name: true. - Head (
nowo_pwa_head()and the context of the install prompt and links): the twotheme-colormeta tags from
the light and darkpaper, the same manifest values, the Apple title from the brand short name when the name
applies, the brand icon asapple-touch-iconwhere the configuration declares one, and the manifest URL with
?v=<Brand::$version>, so browsers fetch the new manifest as soon as the brand changes. - Manifest HTTP cache: with a brand, the response carries an
ETagbuilt fromBrand::$versionand a hash of the
body, and a matchingIf-None-Matchgets a304.Cache-Controlis unchanged.
- Manifest (new
nowo_pwa.brand:mode: auto(default) oroff,override_name: false(default).brand: offis accepted as a
shorthand.nowo-tech/brand-contractsinrequire-devandsuggest, with aconflicton<1.0 || >=2.0.
Security
- The brand values reach the manifest only through
JsonResponse's escaping (<,>,&, quotes as\u00XX) and the
head only through Twig auto-escaping; colours are#rrggbb(contract-checked); icon URLs are re-checked with
BrandAsset::isSafeUrl()(root-relative orhttps://only); only raster icons are used. Audited: Appendix IU,
Pass-Low. IU-L2: the icons use the full-size original upload until BrandContracts 1.1 adds variant URLs; IU-I6 / IU-I7
(overlay scope and per-session providers) are documented in USAGE and SECURITY.
What's Changed
- feat(brand): optional brand-contracts consumer for the manifest and head tags (spec 220 S4) by @HecFranco in #66
Full Changelog: v1.14.1...v1.15.0