PACKETSEL, found by exp-shepherd: the prayer packet printed the first 50 of EVERY people group whatever was selected, so a reader who had narrowed the map to one language family got a packet about somebody else. I carried that behaviour through verbatim when I moved the packet to the shared printer — it was already wrong and I preserved it, which is worth saying plainly. The rows now come from the pins currently SELECTED: the layer's own filter decides which pins render, `_pinMatchExpr` decides which of those are lit (the affinity tab dims rather than filters), and both must match — a pin at opacity 0 is not what the reader is looking at. ★ ASKED OF THE MAP'S FEATURES, NOT OF THE ROWS, and this is the part that had to be got right rather than guessed. Pin properties are DERIVED from rows: useMapLayers fills languageFamily in when the API returns null for all 2,069 groups, and canonicalizes doxaRegion onto the palette's key forms precisely so setFilter matches. So evaluating a pin filter against a raw data row is wrong in a way that NEVER THROWS — it just selects a different, plausible-looking subset. The features the map holds are the only place the two vocabularies agree. Answering that question already existed, privately, inside useMapFly: zoomToLegendRow has to solve it to fit the camera to a legend row, including the reason it cannot use querySourceFeatures (viewport-clipped, so an off-screen region silently selects nothing). Those three functions move VERBATIM to library/maps/pin-selection.js and useMapFly imports them, so there is one evaluator rather than two — and country-posters, which prints the same kind of packet from the same kind of selection, has the same helper to reach for instead of a second copy. Two failure modes are distinguished rather than collapsed: pins selected but NO row matching them is an id mismatch, so it prints the full list and warns; a genuinely empty selection still reaches the shared printer's own "that list resolved to no records", which is honest. And when the 50-row safety cap bites, the cover now says "— 50 of 214" instead of quietly being a different packet than the one asked for. Verified: gates:pre 13/13, check:composite-interop PASS. Needs eyes: rega — select one language family, print, and check the cards are that family and the cover carries the count. |
||
|---|---|---|
| .. | ||
| api | ||
| colors | ||
| components | ||
| composables | ||
| constants | ||
| data | ||
| i18n | ||
| layouts | ||
| lists | ||
| maps | ||
| packet | ||
| scripts | ||
| stores | ||
| styles | ||
| utils | ||
| vendor/cldr | ||
| index.js | ||
| ProfileLoader.vue | ||
| README.md | ||
library/ (@map) — the shared map template
The other half of the architecture (see ../plugin-designs/README.md):
every map in plugin-designs/<your-map>/ composes the reusable, parameterized pieces that live here.
Fix something here and every map benefits on the next build; break something here and every map
breaks — read components/WARNING.md before touching shared pieces.
| Folder | What lives there |
|---|---|
ProfileLoader.vue |
The root of every bundle: parses profile-config, loads the profile, provides the stores + config |
components/ |
Shared UI — map, legends, controls, popup (PeopleGroupDetail), tables, charts, hints (README) |
composables/ |
Shared logic — map engine (useMapInstance), provider switch, shadow-DOM styles, theming |
stores/ |
Per-instance Pinia stores (ui / map / data) — provided by ProfileLoader, injected by children |
api/ |
Data-source registry (sources.json) + fetch layer — the JAMstack runtime wiring |
colors/ |
Color sets maps opt into via profile-config.colorSet |
i18n/ |
The shared string catalogs (all maps speak the same languages) |
data/ |
Small shared datasets baked at build time (big served data lives in ../data/) |
constants/ |
Shared constants |
scripts/ |
Maintainer pipelines (posters, research) — not part of any bundle |
The rule of thumb (same as WARNING.md): custom code in your app-profile, reusable code here — and things only move from the first to the second once they've earned it.