Update Generated Assets¶
Some files in the repository are generated by a make target and committed, so a build never depends on someone else's service being up. After changing their source, regenerate them and commit the result with your change.
App icons¶
The installable-app icons live in app/public/icons/ (#939). icon-192.png and icon-512.png are the free-standing pin; the maskable variants that Android launchers and some desktops cut into a circle are generated from icon-512.png:
Commit the regenerated files. They are served under stable names with a one-day cache, so an installed app picks up a new icon within a day.
Holiday states¶
REGION_STATE is resolved against the state codes and names the opening_hours library knows, extracted into app/src/lib/holidayStates.generated.json. After bumping opening_hours, re-extract it:
A unit test fails while the table's recorded library version differs from the installed one, so a forgotten re-run does not go unnoticed.
Equipment illustrations¶
The device and pitch tables (app/src/lib/objPlaygroundEquipment.js, app/src/lib/equipmentAttributes.js) name illustrations as MediaWiki File: titles. Those names are resolved to real file URLs at build time, so after adding or changing one:
Commit the regenerated file with your change. It is checked in on purpose, like the basemap assets, so a build never depends on someone else's API being up.
Two things to expect:
- A name that resolves on neither Commons nor the OSM wiki fails the target. That is the point: such a name used to render nothing while costing two failing requests. Fix the name, or drop the entry — there is no allow-list for missing files any more (#867).
- The resolved URL is not
Special:FilePath. It is the real file path on a Wikimedia or OSM-wiki host, which the/ext/wikimedia/proxy serves, so the visitor's browser never contacts either wiki. Do not reintroduce aSpecial:FilePathURL in the frontend — CI rejects it.
make check-equipment-images re-resolves and fails if the committed map no longer points at the same files. It is not wired into CI, because it depends on two live APIs; run it by hand if illustrations start disappearing.
Basemap style¶
make basemap-style produces two variants from a single upstream fetch, both vendored copies of OpenFreeMap Bright with the same two edits:
| File | Assets point at | Used by |
|---|---|---|
app/public/basemap/style.json |
tiles.openfreemap.org |
make dev, which has no nginx to proxy through |
app/public/basemap/style.local.json |
/basemap/ on this instance |
the container — this is what visitors get |
One fetch, both outputs: building them in two runs let the upstream rotate in between, leaving the two variants derived from different sources with nothing detecting it.
The two edits, applied by tools/build-basemap-style.py:
- Green landcover fills are desaturated, because spieli draws its playgrounds in green — emerald pins in the default view, a green-to-slate ramp with mapping detail on. A basemap that paints parks green competes with the map's primary signal.
- The
poisymbol layers are dropped, as the strongest competitor for attention.
The second edit is a legibility change only. Dropping a style layer does not reduce render cost — the tile data is still decoded and simply not drawn.
--asset-base is what rewrites the style's tile, glyph and sprite URLs onto one origin, and it is the whole difference between a local style and a local basemap. Without it — which is how style.json is built — those assets are fetched from tiles.openfreemap.org by every visitor, even though the style document itself is served locally.
Only the origin is stripped; the upstream's own paths are preserved verbatim. That 1:1 mapping is what lets a plain prefix proxy serve the result without reversing a mapping it cannot know. The build refuses to write an --asset-base output that still contains a third-party host, and drops any query string it finds, so rebuilding against a keyed provider cannot bake an API key into a committed style.
make basemap-assets runs this together with make basemap-fonts and the world outline for the hub's macro view. How operators configure the basemap: Basemap and external services.
See also¶
- Add a Playground Device: where illustration names come from
- Local Development