UPG-100 poster type: scopes are the regions that have zones; the Poster Sections presets regenerated

scopes() now returns only regions some UPG-100 zone falls into, so no section or
preset can exist only to say "No posters". Today that drops 'Other', the same
correction the country type had ("countries-other gone"). With the type file on
the tree, check:poster-sections requires its presets, so
poster-sections.instances.json is regenerated by its own generator
(gen:poster-sections-presets): upg100-all plus one per region, 9 presets, and no
hand edit.
This commit is contained in:
Doxa Maps 2026-10-02 15:52:46 +00:00
parent 519e43d58b
commit 09cf034214
2 changed files with 75 additions and 1 deletions

View file

@ -40,7 +40,9 @@ export function regionTitle(english, t) {
const englishOf = (scope) => REGIONS.find((r) => regionScope(r) === regionScope(scope)) || null
export default {
scopes: () => REGIONS.map(regionScope),
// Only the regions that HAVE zones: an empty region would be a section (and a Poster Sections preset) that can
// only say "No posters". Today that drops 'Other', which no UPG-100 zone falls into.
scopes: () => REGIONS.filter((r) => upg100Zones(null, 'en').some((l) => regionOf(l.id) === r)).map(regionScope),
items(scope, locale) {
return upg100Zones(null, locale).filter((l) => regionScope(regionOf(l.id)) === regionScope(scope))
},

View file

@ -66,6 +66,78 @@
"scope": "oceania"
}
},
{
"id": "upg100-all",
"title": "UPG 100 posters — all regions",
"props": {
"type": "upg100-list",
"scope": "all"
}
},
{
"id": "upg100-india",
"title": "UPG 100 posters — India",
"props": {
"type": "upg100-list",
"scope": "india"
}
},
{
"id": "upg100-china-mongolia",
"title": "UPG 100 posters — China + Mongolia",
"props": {
"type": "upg100-list",
"scope": "china-mongolia"
}
},
{
"id": "upg100-africa",
"title": "UPG 100 posters — Africa",
"props": {
"type": "upg100-list",
"scope": "africa"
}
},
{
"id": "upg100-middle-east",
"title": "UPG 100 posters — Middle East",
"props": {
"type": "upg100-list",
"scope": "middle-east"
}
},
{
"id": "upg100-central-asia",
"title": "UPG 100 posters — Central Asia",
"props": {
"type": "upg100-list",
"scope": "central-asia"
}
},
{
"id": "upg100-southeast-asia-oceania",
"title": "UPG 100 posters — Southeast Asia + Oceania",
"props": {
"type": "upg100-list",
"scope": "southeast-asia-oceania"
}
},
{
"id": "upg100-americas",
"title": "UPG 100 posters — Americas",
"props": {
"type": "upg100-list",
"scope": "americas"
}
},
{
"id": "upg100-europe",
"title": "UPG 100 posters — Europe",
"props": {
"type": "upg100-list",
"scope": "europe"
}
},
{
"id": "configure",
"title": "Configure — make a new preset",