Merge remote-tracking branch 'origin/development' into regions/poster-sections
This commit is contained in:
commit
f9a28bde47
7 changed files with 18 additions and 10 deletions
|
|
@ -8,7 +8,7 @@
|
|||
* GATED. The allow-list lives in src/tabs.js; this gate is what keeps it one.
|
||||
*
|
||||
* WHAT IT ASSERTS (each arm is poisoned by --self-test before a pass is trusted):
|
||||
* A. the rail's rows are exactly the named sets: Posters = upg-100, country-posters, poster-design;
|
||||
* A. the Experimental folder starts open, and the rail's rows are exactly the named sets: Posters = upg-100, country-posters, poster-design;
|
||||
* Experimental = wall-of-people-groups, bible-posters (poster plugins only). Ids unique,
|
||||
* every row in a declared section.
|
||||
* B. no row names a NEVER bundle (key-cities, the shells themselves), and resolving the built
|
||||
|
|
@ -52,6 +52,9 @@ export function checkShelf({ SECTIONS, TABS, NEVER, resolveTabs, manifest, meta,
|
|||
const got = TABS.filter((t) => t.section === sec).map((t) => t.id)
|
||||
if (!sameList(got, want)) errs.push(`A: section ${sec} rows are [${got.join(', ')}], expected [${want.join(', ')}]`)
|
||||
}
|
||||
// The Experimental folder starts OPEN: closed, under one short section, it read as an empty caption.
|
||||
const exp = SECTIONS.find((g) => g.key === 'experimental')
|
||||
if (!exp || !exp.folder || exp.open !== true) errs.push('A: the Experimental folder must be declared folder:true, open:true (closed, it is easy to miss)')
|
||||
const extra = TABS.filter((t) => !EXPECT[t.section]).map((t) => t.id)
|
||||
if (extra.length) errs.push(`A: rows outside the allow-listed sections: ${extra.join(', ')}`)
|
||||
// B. never a gated bundle — by declaration and by resolution over the real manifest
|
||||
|
|
@ -114,6 +117,7 @@ function selfTest(base) {
|
|||
const clone = (o) => JSON.parse(JSON.stringify(o))
|
||||
const cases = [
|
||||
['A: key-cities added to Experimental', (c) => { c.TABS = [...c.TABS, { id: 'key-cities', section: 'experimental', bundle: 'key-cities', profile: 'key-cities' }] }, /^A: section experimental|^B: row key-cities/],
|
||||
['A: the Experimental folder closed again', (c) => { c.SECTIONS = c.SECTIONS.map((g) => g.key === 'experimental' ? { ...g, open: false } : g) }, /^A: the Experimental folder must be/],
|
||||
['A: a row dropped', (c) => { c.TABS = c.TABS.filter((t) => t.id !== 'wall-of-people-groups') }, /^A: section experimental/],
|
||||
['B: resolver that shows whatever the manifest carries', (c) => { c.resolveTabs = (m) => (m.bundles || []).map((b) => ({ id: b.bundle, bundle: b.bundle, profile: b.bundle, tag: b.bundle, scriptUrl: b.scriptUrl })) }, /^B: resolution produced a key-cities row/],
|
||||
['C: a composite row falls back to a leaf', (c) => { c.manifest = clone(c.manifest); const b = c.manifest.bundles.find((x) => x.bundle === 'my-upg-100-list'); b.profiles = b.profiles.filter((p) => p.profile !== 'upg-100-mfe') }, /^C: row upg-100 opens/],
|
||||
|
|
|
|||
|
|
@ -20,10 +20,14 @@
|
|||
* composite is the plugin as its owner designed it (and it is what makes Posterverse capability 5).
|
||||
*/
|
||||
|
||||
// The rail's sections, in order. `folder` renders collapsible and starts closed, like the gallery's.
|
||||
// The rail's sections, in order. Experimental is a collapsible folder, like the gallery's, but it starts
|
||||
// OPEN: the gallery's closed folder sits at the foot of a long rail, while Posterverse has one short
|
||||
// section above it, so a closed folder sat mid-drawer with empty space below and read as a caption with
|
||||
// nothing under it (measured at 390: the heading at y 335 in an 800px drawer, ~500px empty below).
|
||||
// Open, its plugins show like any section's rows; a reader can still collapse it.
|
||||
export const SECTIONS = [
|
||||
{ key: 'posters', i18n: 'sec.posters', icon: 'poster' },
|
||||
{ key: 'experimental', i18n: 'sec.experimental', icon: 'flask', folder: true, open: false },
|
||||
{ key: 'experimental', i18n: 'sec.experimental', icon: 'flask', folder: true, open: true },
|
||||
]
|
||||
|
||||
// Every row Posterverse can show, in rail order.
|
||||
|
|
|
|||
|
|
@ -1345,7 +1345,7 @@
|
|||
"bundle": "posterverse",
|
||||
"scriptUrl": "./posterverse/posterverse.js",
|
||||
"output": "dx-maps/posterverse/posterverse.js",
|
||||
"integrity": "sha384-ymAlpF3AiStPvnMzBJXPb3e5cBzsnNEGAlcy8Q+FwJhFrT5McyPEjPHFLjuuXWTn",
|
||||
"integrity": "sha384-Eu6xYVd6sm1N+Jmlt9wMiWk/f3TdS/KyyTmkKu6ClKdwwFzRGenJTXpLGgFxGHrV",
|
||||
"elements": [
|
||||
"posterverse-app"
|
||||
],
|
||||
|
|
@ -1371,7 +1371,7 @@
|
|||
"scriptUrl": "./posterverse/posterverse.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./posterverse/posterverse/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./posterverse/posterverse.js\" integrity=\"sha384-ymAlpF3AiStPvnMzBJXPb3e5cBzsnNEGAlcy8Q+FwJhFrT5McyPEjPHFLjuuXWTn\" crossorigin=\"anonymous\"></script>\n<!-- provider: \"maplibre\" is the default; change it to \"mapbox\" and fill tk to use Mapbox. -->\n<posterverse-app profile-config='{\"profile\":\"posterverse\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></posterverse-app>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./posterverse/posterverse.js\" integrity=\"sha384-Eu6xYVd6sm1N+Jmlt9wMiWk/f3TdS/KyyTmkKu6ClKdwwFzRGenJTXpLGgFxGHrV\" crossorigin=\"anonymous\"></script>\n<!-- provider: \"maplibre\" is the default; change it to \"mapbox\" and fill tk to use Mapbox. -->\n<posterverse-app profile-config='{\"profile\":\"posterverse\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></posterverse-app>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1345,7 +1345,7 @@
|
|||
"bundle": "posterverse",
|
||||
"scriptUrl": "./posterverse/posterverse.js",
|
||||
"output": "dx-maps/posterverse/posterverse.js",
|
||||
"integrity": "sha384-ymAlpF3AiStPvnMzBJXPb3e5cBzsnNEGAlcy8Q+FwJhFrT5McyPEjPHFLjuuXWTn",
|
||||
"integrity": "sha384-Eu6xYVd6sm1N+Jmlt9wMiWk/f3TdS/KyyTmkKu6ClKdwwFzRGenJTXpLGgFxGHrV",
|
||||
"elements": [
|
||||
"posterverse-app"
|
||||
],
|
||||
|
|
@ -1371,7 +1371,7 @@
|
|||
"scriptUrl": "./posterverse/posterverse.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./posterverse/posterverse/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./posterverse/posterverse.js\" integrity=\"sha384-ymAlpF3AiStPvnMzBJXPb3e5cBzsnNEGAlcy8Q+FwJhFrT5McyPEjPHFLjuuXWTn\" crossorigin=\"anonymous\"></script>\n<!-- provider: \"maplibre\" is the default; change it to \"mapbox\" and fill tk to use Mapbox. -->\n<posterverse-app profile-config='{\"profile\":\"posterverse\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></posterverse-app>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./posterverse/posterverse.js\" integrity=\"sha384-Eu6xYVd6sm1N+Jmlt9wMiWk/f3TdS/KyyTmkKu6ClKdwwFzRGenJTXpLGgFxGHrV\" crossorigin=\"anonymous\"></script>\n<!-- provider: \"maplibre\" is the default; change it to \"mapbox\" and fill tk to use Mapbox. -->\n<posterverse-app profile-config='{\"profile\":\"posterverse\",\"provider\":\"maplibre\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></posterverse-app>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <posterverse-app> custom element. -->
|
||||
<script src="../../posterverse.js" integrity="sha384-ymAlpF3AiStPvnMzBJXPb3e5cBzsnNEGAlcy8Q+FwJhFrT5McyPEjPHFLjuuXWTn" crossorigin="anonymous"></script>
|
||||
<script src="../../posterverse.js" integrity="sha384-Eu6xYVd6sm1N+Jmlt9wMiWk/f3TdS/KyyTmkKu6ClKdwwFzRGenJTXpLGgFxGHrV" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <posterverse-app> custom element. -->
|
||||
<script src="../posterverse.js" integrity="sha384-ymAlpF3AiStPvnMzBJXPb3e5cBzsnNEGAlcy8Q+FwJhFrT5McyPEjPHFLjuuXWTn" crossorigin="anonymous"></script>
|
||||
<script src="../posterverse.js" integrity="sha384-Eu6xYVd6sm1N+Jmlt9wMiWk/f3TdS/KyyTmkKu6ClKdwwFzRGenJTXpLGgFxGHrV" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
Loading…
Reference in a new issue