The map's own filter state now actually reaches the grid
Simple Research's map → grid link was dead. emitFilterState() read getCurrentInstance() INSIDE the function, and the function is only ever called from a watcher — where Vue returns null. So `host` was null on every call, the guard returned early, and the `map-filtered` event this map owes its composite was never dispatched. Selecting on the map changed nothing in the list. The instance is captured at setup top level now, where Vue will give it, and resolved to the host element lazily so it also survives a call before mount. ★ WHY THIS SHIPPED AS "VERIFIED". The check that proved the link DISPATCHED THE EVENT ITSELF and then asserted the grid narrowed. That tests the composite's listener and the grid — both of which work — and never tests the one line that emits. A synthetic event does not prove an emitter fires; it replaces it. The same shape as the free-identifier bug beside it: evidence that could not distinguish working from dead. The honest proof moves the map's own filter state and waits for the event, which needs a browser. NEEDS EYES: Simple Research, both engines — pick a religion family or a region on the map and watch the grid below narrow.
This commit is contained in:
parent
7ff65526c2
commit
9384c1ba49
9 changed files with 81 additions and 62 deletions
|
|
@ -2136,10 +2136,29 @@ if (typeof window !== 'undefined') {
|
|||
}
|
||||
}
|
||||
|
||||
// ★ THE INSTANCE IS CAPTURED IN SETUP, BECAUSE A WATCHER IS NOT SETUP.
|
||||
// This read getCurrentInstance() INSIDE the function, and the function is only ever called from a
|
||||
// watcher callback (just below). Vue only returns an instance during setup — from a watcher it is
|
||||
// null — so `host` was null on every call, emitFilterState returned at the guard, and the
|
||||
// `map-filtered` event this map owes its composite was NEVER dispatched. The whole map -> grid
|
||||
// direction was dead.
|
||||
//
|
||||
// It looked verified because the check that "proved" it DISPATCHED THE EVENT ITSELF and then
|
||||
// asserted the grid reacted. That tested the composite's listener and the grid, which do work; it
|
||||
// never tested the one line that emits. A synthetic event cannot prove an emitter fires — it
|
||||
// replaces it.
|
||||
//
|
||||
// Captured here, at setup top level, and resolved to the host lazily so it also survives being
|
||||
// called before mount.
|
||||
const _selfInstance = getCurrentInstance()
|
||||
function selfHostElement() {
|
||||
try { return _selfInstance?.proxy?.$el?.getRootNode?.()?.host || null } catch (_) { return null }
|
||||
}
|
||||
|
||||
// Report OUR filter state upward, so a composite can drive its other half with it.
|
||||
function emitFilterState() {
|
||||
if (applyingExternal || typeof window === 'undefined') return
|
||||
const host = getCurrentInstance()?.proxy?.$el?.getRootNode?.()?.host
|
||||
const host = selfHostElement()
|
||||
if (!host) return
|
||||
// Report in the vocabulary a HOST speaks: the family NAME, not the legend's letter key. Same
|
||||
// shared RELIGION_FAMILIES table the inbound direction reads, used the other way round.
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@
|
|||
"bundle": "doxa-research-map",
|
||||
"scriptUrl": "./doxa-research-map/doxa-research-map.js",
|
||||
"output": "dx-maps/doxa-research-map/doxa-research-map.js",
|
||||
"integrity": "sha384-E/9wPeCVKfJRE0Oh2yOw3aHvEtVUFiBTtr3MpcUQ+U27nv7X81s+Y9UqAJM5IVDd",
|
||||
"integrity": "sha384-GgCN0nGHKw8J7FGSbGz2bt24VSYJ46wvwqoS+K6av+vkMKt9laxtButs/bY0GNtp",
|
||||
"elements": [
|
||||
"doxa-research-map"
|
||||
],
|
||||
|
|
@ -370,7 +370,7 @@
|
|||
"scriptUrl": "./doxa-research-map/doxa-research-map.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./doxa-research-map/research-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-research-map/doxa-research-map.js\" integrity=\"sha384-E/9wPeCVKfJRE0Oh2yOw3aHvEtVUFiBTtr3MpcUQ+U27nv7X81s+Y9UqAJM5IVDd\" crossorigin=\"anonymous\"></script>\n<doxa-research-map profile-config='{\"profile\":\"research-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-research-map>"
|
||||
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-research-map/doxa-research-map.js\" integrity=\"sha384-GgCN0nGHKw8J7FGSbGz2bt24VSYJ46wvwqoS+K6av+vkMKt9laxtButs/bY0GNtp\" crossorigin=\"anonymous\"></script>\n<doxa-research-map profile-config='{\"profile\":\"research-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-research-map>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
@ -971,7 +971,7 @@
|
|||
"bundle": "research-map-plus-grid",
|
||||
"scriptUrl": "./research-map-plus-grid/research-map-plus-grid.js",
|
||||
"output": "dx-maps/research-map-plus-grid/research-map-plus-grid.js",
|
||||
"integrity": "sha384-q6MGCvQSGtk5CaASt5uu1mD7qDGoBwo17PDg3lW9jDzBQ5hMGj56TngLR/o6fc05",
|
||||
"integrity": "sha384-aj0uswLaW5kBIl9SnBhgVZvgyxMXx8udCKlSjmZjDB0gGvOV+HqdK8i1Fhu8Ywd1",
|
||||
"elements": [
|
||||
"research-map-plus-grid"
|
||||
],
|
||||
|
|
@ -991,7 +991,7 @@
|
|||
"scriptUrl": "./research-map-plus-grid/research-map-plus-grid.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./research-map-plus-grid/research-map-plus-grid/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=\"./research-map-plus-grid/research-map-plus-grid.js\" integrity=\"sha384-q6MGCvQSGtk5CaASt5uu1mD7qDGoBwo17PDg3lW9jDzBQ5hMGj56TngLR/o6fc05\" crossorigin=\"anonymous\"></script>\n<research-map-plus-grid profile-config='{\"profile\":\"research-map-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-map-plus-grid>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-map-plus-grid/research-map-plus-grid.js\" integrity=\"sha384-aj0uswLaW5kBIl9SnBhgVZvgyxMXx8udCKlSjmZjDB0gGvOV+HqdK8i1Fhu8Ywd1\" crossorigin=\"anonymous\"></script>\n<research-map-plus-grid profile-config='{\"profile\":\"research-map-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-map-plus-grid>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <doxa-research-map> custom element. -->
|
||||
<script src="../doxa-research-map.js" integrity="sha384-E/9wPeCVKfJRE0Oh2yOw3aHvEtVUFiBTtr3MpcUQ+U27nv7X81s+Y9UqAJM5IVDd" crossorigin="anonymous"></script>
|
||||
<script src="../doxa-research-map.js" integrity="sha384-GgCN0nGHKw8J7FGSbGz2bt24VSYJ46wvwqoS+K6av+vkMKt9laxtButs/bY0GNtp" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <doxa-research-map> custom element. -->
|
||||
<script src="../../doxa-research-map.js" integrity="sha384-E/9wPeCVKfJRE0Oh2yOw3aHvEtVUFiBTtr3MpcUQ+U27nv7X81s+Y9UqAJM5IVDd" crossorigin="anonymous"></script>
|
||||
<script src="../../doxa-research-map.js" integrity="sha384-GgCN0nGHKw8J7FGSbGz2bt24VSYJ46wvwqoS+K6av+vkMKt9laxtButs/bY0GNtp" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@
|
|||
"bundle": "doxa-research-map",
|
||||
"scriptUrl": "./doxa-research-map/doxa-research-map.js",
|
||||
"output": "dx-maps/doxa-research-map/doxa-research-map.js",
|
||||
"integrity": "sha384-E/9wPeCVKfJRE0Oh2yOw3aHvEtVUFiBTtr3MpcUQ+U27nv7X81s+Y9UqAJM5IVDd",
|
||||
"integrity": "sha384-GgCN0nGHKw8J7FGSbGz2bt24VSYJ46wvwqoS+K6av+vkMKt9laxtButs/bY0GNtp",
|
||||
"elements": [
|
||||
"doxa-research-map"
|
||||
],
|
||||
|
|
@ -370,7 +370,7 @@
|
|||
"scriptUrl": "./doxa-research-map/doxa-research-map.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./doxa-research-map/research-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-research-map/doxa-research-map.js\" integrity=\"sha384-E/9wPeCVKfJRE0Oh2yOw3aHvEtVUFiBTtr3MpcUQ+U27nv7X81s+Y9UqAJM5IVDd\" crossorigin=\"anonymous\"></script>\n<doxa-research-map profile-config='{\"profile\":\"research-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-research-map>"
|
||||
"script": "<!-- Mapbox engine, fetched early; remove this line if you set \"provider\":\"maplibre\" -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./doxa-research-map/doxa-research-map.js\" integrity=\"sha384-GgCN0nGHKw8J7FGSbGz2bt24VSYJ46wvwqoS+K6av+vkMKt9laxtButs/bY0GNtp\" crossorigin=\"anonymous\"></script>\n<doxa-research-map profile-config='{\"profile\":\"research-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></doxa-research-map>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
@ -971,7 +971,7 @@
|
|||
"bundle": "research-map-plus-grid",
|
||||
"scriptUrl": "./research-map-plus-grid/research-map-plus-grid.js",
|
||||
"output": "dx-maps/research-map-plus-grid/research-map-plus-grid.js",
|
||||
"integrity": "sha384-q6MGCvQSGtk5CaASt5uu1mD7qDGoBwo17PDg3lW9jDzBQ5hMGj56TngLR/o6fc05",
|
||||
"integrity": "sha384-aj0uswLaW5kBIl9SnBhgVZvgyxMXx8udCKlSjmZjDB0gGvOV+HqdK8i1Fhu8Ywd1",
|
||||
"elements": [
|
||||
"research-map-plus-grid"
|
||||
],
|
||||
|
|
@ -991,7 +991,7 @@
|
|||
"scriptUrl": "./research-map-plus-grid/research-map-plus-grid.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./research-map-plus-grid/research-map-plus-grid/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=\"./research-map-plus-grid/research-map-plus-grid.js\" integrity=\"sha384-q6MGCvQSGtk5CaASt5uu1mD7qDGoBwo17PDg3lW9jDzBQ5hMGj56TngLR/o6fc05\" crossorigin=\"anonymous\"></script>\n<research-map-plus-grid profile-config='{\"profile\":\"research-map-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-map-plus-grid>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-map-plus-grid/research-map-plus-grid.js\" integrity=\"sha384-aj0uswLaW5kBIl9SnBhgVZvgyxMXx8udCKlSjmZjDB0gGvOV+HqdK8i1Fhu8Ywd1\" crossorigin=\"anonymous\"></script>\n<research-map-plus-grid profile-config='{\"profile\":\"research-map-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-map-plus-grid>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <research-map-plus-grid> custom element. -->
|
||||
<script src="../../research-map-plus-grid.js" integrity="sha384-q6MGCvQSGtk5CaASt5uu1mD7qDGoBwo17PDg3lW9jDzBQ5hMGj56TngLR/o6fc05" crossorigin="anonymous"></script>
|
||||
<script src="../../research-map-plus-grid.js" integrity="sha384-aj0uswLaW5kBIl9SnBhgVZvgyxMXx8udCKlSjmZjDB0gGvOV+HqdK8i1Fhu8Ywd1" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <research-map-plus-grid> custom element. -->
|
||||
<script src="../research-map-plus-grid.js" integrity="sha384-q6MGCvQSGtk5CaASt5uu1mD7qDGoBwo17PDg3lW9jDzBQ5hMGj56TngLR/o6fc05" crossorigin="anonymous"></script>
|
||||
<script src="../research-map-plus-grid.js" integrity="sha384-aj0uswLaW5kBIl9SnBhgVZvgyxMXx8udCKlSjmZjDB0gGvOV+HqdK8i1Fhu8Ywd1" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
Loading…
Reference in a new issue