A preset page loads only poster-sections.js, so a preset of a poster type
registered by another plugin's script (upg100-list) could only say No
posters. The generator now gives no presets to a type whose file is not on
the tree, and check:poster-sections fails on any such preset: 9 presets
remain (7 regions, all regions, configure).
The tree generator writes a page per preset but never deletes one, so the
dropped presets' pages (the 10 upg100 ones and countries-other) are removed,
and a new arm holds the built preset pages to exactly the presets.
The pilot's country data now places every country in a real region, so the
country type has 7 regions. gen:poster-sections-presets regenerated the list
(19 presets); check:poster-sections had failed on the stale countries-other
preset and passes now. Bundle, tree and SRI rebuilt.
gen:poster-sections-presets writes poster-sections.instances.json from each
type's scopes() (all regions, then one preset per region titled by the type's
own section title in the site's English, then configure), the same list
check:poster-sections holds the file to. Today it reproduces the 20 presets
exactly, in the data's region order; when the data's regions change, running
it is the whole fix.
The presets file now has to hold, per poster type, exactly an all-regions
preset plus one per region the type's adapter returns from scopes(). A region
the data drops (a stale "other") or gains then fails the check, instead of
lingering as a preset. 'country' is measured always; 'upg100-list' once its
type file is on the tree. Self-test: a preset for a region the type does not
have must fail.
Poster Sections becomes a parameterized profile like doxa-simple-map: its
props (type, scope with 'all' = every region, locale, columns, collapsed)
choose the <dxm-poster-section> sections it renders, and
poster-sections.instances.json lists 20 presets, each built into its own page
and embed snippet in manifest.json:
- country posters: all regions + each of DX Life's /regions regions (8);
- UPG 100 posters: all regions + each of its 9 regions (they show once the
upg100-list type is registered on the page);
- configure: the panel of choices and Copy embed, for making new presets.
The element's columns attribute now comes from the library (landing
separately), so this commit drops its library edits; check:poster-sections
reads columns back through that attribute and passes once it is on the pilot.
A new bundle, plugin-designs/poster-sections, with one profile, Poster Sections.
A panel of choices (poster type from the registry at runtime, region or All
regions, language, posters per row, start collapsed) drives the library's
<dxm-poster-section> elements shown live below it, and Copy embed gives the
bundle script plus the exact tags for those choices, with absolute URLs so they
work on another site. The bundle also registers <dxm-poster-section>, so a site
that loads only poster-sections.js can place the tags.
Library: the element takes a columns attribute (posters per row, 1-5), passed
to the wall's existing columns prop; absent keeps today's default, so existing
importers are unchanged. New catalogue area posterSections in all 11 locales.
check:poster-sections (in gates:pre) reads every panel choice back through the
element's own attribute reader; its self-test proves a builder that drops
columns, drops collapsed, or repeats a region under All regions fails.