The typed search is a filter, so it now looks like one
Some checks are pending
build-gate / build (push) Waiting to run
Some checks are pending
build-gate / build (push) Waiting to run
Driver: "I searched Bhutan in the search bar and it did not switch the toggle to show the country was selected in the filters." MEASURED what actually happens: typing narrows the dashboard live through bus.searchTerm (scope 2,107 -> 13) while filterSet stays empty -- the data changed and no control anywhere said why. Invisible state, the same defect class as the silent grey pane. The conventional faceted-search answer: free text is its OWN chip beside the facet chips -- "Search: Bhutan x" -- removable like any of them, and Clear all clears it too. It deliberately does NOT masquerade as a Country selection, because the term matches across ALL searchKeys (name, region, language, religion...) and labelling it a country filter would lie whenever it matches something else. One archaeology note that cost a first attempt: the fix initially landed in DashboardFilterChips.vue, a component the topbar dedup pass had already UNMOUNTED -- its own comments name the filters band as the single source of truth for chips, which is where this now lives. Playwright round trip: type -> chip present, scope 13; Clear all -> chip gone, scope 2,107.
This commit is contained in:
parent
ab83fd4ca7
commit
9bddccbb5e
8 changed files with 61 additions and 45 deletions
|
|
@ -165,12 +165,25 @@ const filters = computed(() => dropdownKeys.value.map((key) => ({
|
|||
// ('Needs Prayer'), so passing it through a code resolver can only fail to find it and fall back —
|
||||
// at best a no-op, at worst a blank chip. The value-is-label axes need no resolution by definition.
|
||||
const { labelFor } = useTreeLegendLabels(cfg, inject('dataStore', null), inject('searchSourceId', null))
|
||||
const activeChips = computed(() =>
|
||||
Object.keys(filterSet).map((k) => {
|
||||
const activeChips = computed(() => {
|
||||
const out = Object.keys(filterSet).map((k) => {
|
||||
const v = filterSet[k]
|
||||
return { name: k, label: `${FACETS.value[k]?.label || k}: ${k === PRAYER_KEY ? v : labelFor(k, v)}` }
|
||||
})
|
||||
)
|
||||
// ★ THE TYPED SEARCH IS A FILTER AND MUST LOOK LIKE ONE (Driver 2026-09-23: "I searched Bhutan
|
||||
// and it did not switch the toggle to show the country was selected"). MEASURED: typing narrows
|
||||
// the scope live via bus.searchTerm (2,107 -> 13) while filterSet stays empty, so the data
|
||||
// changed and no control anywhere said why -- invisible state, the same class as the silent
|
||||
// grey pane. The conventional faceted-search answer is that free text is its OWN chip beside
|
||||
// the facet chips, clearable like any of them. It deliberately does NOT masquerade as a Country
|
||||
// selection: the term matches across ALL searchKeys (name, region, language, religion...), so
|
||||
// labelling it a country filter would lie whenever it matches something else.
|
||||
// (First attempt went into DashboardFilterChips.vue -- a component the topbar dedup pass had
|
||||
// already unmounted; THIS band is the documented single source of truth for chips.)
|
||||
const term = (bus?.searchTerm?.value || '').trim()
|
||||
if (term) out.push({ name: '__search__', label: `Search: ${term}` })
|
||||
return out
|
||||
})
|
||||
|
||||
const searchValue = computed(() => bus?.searchTerm?.value || '')
|
||||
|
||||
|
|
@ -178,8 +191,11 @@ const searchValue = computed(() => bus?.searchTerm?.value || '')
|
|||
function onSearch(payload) { bus?.setSearch(payload?.value ?? '') }
|
||||
function onFilterChange(detail) { bus?.setFilter(detail.name, detail.value) }
|
||||
function onFilterClear(detail) { bus?.setFilter(detail.name, null) }
|
||||
function onRemoveFilter(detail) { bus?.setFilter(detail.name, null) }
|
||||
function onClearAll() { bus?.clearFilters() }
|
||||
function onRemoveFilter(detail) {
|
||||
if (detail.name === '__search__') { bus?.setSearch(''); return }
|
||||
bus?.setFilter(detail.name, null)
|
||||
}
|
||||
function onClearAll() { bus?.clearFilters(); bus?.setSearch('') }
|
||||
|
||||
useShadowStyles(`
|
||||
/* header-2 host: the research-filters band sits in the dashboard's dedicated 'filters' grid row.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <dashboard-plus-grid> custom element. -->
|
||||
<script src="../../dashboard-plus-grid.js" integrity="sha384-yl2t7RiaXtN9JiEX6E/96LPcXR2UKH2QrsDgDGLHjpt5cx5jLkAGlbKCNJvf96vB" crossorigin="anonymous"></script>
|
||||
<script src="../../dashboard-plus-grid.js" integrity="sha384-jKOwLanozR+O6mlmT9pVy5AbBM+fKtvI4UmUsgiolOcrH6/culs82vUmsTOKLNd7" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <dashboard-plus-grid> custom element. -->
|
||||
<script src="../dashboard-plus-grid.js" integrity="sha384-yl2t7RiaXtN9JiEX6E/96LPcXR2UKH2QrsDgDGLHjpt5cx5jLkAGlbKCNJvf96vB" crossorigin="anonymous"></script>
|
||||
<script src="../dashboard-plus-grid.js" integrity="sha384-jKOwLanozR+O6mlmT9pVy5AbBM+fKtvI4UmUsgiolOcrH6/culs82vUmsTOKLNd7" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
2
public/doxa-maps/index.html
generated
2
public/doxa-maps/index.html
generated
File diff suppressed because one or more lines are too long
8
public/doxa-maps/manifest.json
generated
8
public/doxa-maps/manifest.json
generated
|
|
@ -193,7 +193,7 @@
|
|||
"bundle": "dashboard-plus-grid",
|
||||
"scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js",
|
||||
"output": "doxa-maps/dashboard-plus-grid/dashboard-plus-grid.js",
|
||||
"integrity": "sha384-yl2t7RiaXtN9JiEX6E/96LPcXR2UKH2QrsDgDGLHjpt5cx5jLkAGlbKCNJvf96vB",
|
||||
"integrity": "sha384-jKOwLanozR+O6mlmT9pVy5AbBM+fKtvI4UmUsgiolOcrH6/culs82vUmsTOKLNd7",
|
||||
"elements": [
|
||||
"dashboard-plus-grid"
|
||||
],
|
||||
|
|
@ -213,7 +213,7 @@
|
|||
"scriptUrl": "./dashboard-plus-grid/dashboard-plus-grid.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./dashboard-plus-grid/dashboard-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=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-yl2t7RiaXtN9JiEX6E/96LPcXR2UKH2QrsDgDGLHjpt5cx5jLkAGlbKCNJvf96vB\" crossorigin=\"anonymous\"></script>\n<dashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></dashboard-plus-grid>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./dashboard-plus-grid/dashboard-plus-grid.js\" integrity=\"sha384-jKOwLanozR+O6mlmT9pVy5AbBM+fKtvI4UmUsgiolOcrH6/culs82vUmsTOKLNd7\" crossorigin=\"anonymous\"></script>\n<dashboard-plus-grid profile-config='{\"profile\":\"dashboard-plus-grid\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></dashboard-plus-grid>"
|
||||
},
|
||||
"instances": [
|
||||
{
|
||||
|
|
@ -878,7 +878,7 @@
|
|||
"bundle": "research-dashboard",
|
||||
"scriptUrl": "./research-dashboard/research-dashboard.js",
|
||||
"output": "doxa-maps/research-dashboard/research-dashboard.js",
|
||||
"integrity": "sha384-OMWktfdHg6hivE32ReD3LQIwg3SxgBdgdltPhfWFSEUybEPU6fsynv4PP22z4yEn",
|
||||
"integrity": "sha384-2f3/uqetIjziSJf8AGJjFcAyPziq4VsblVOQ0aDxeorpG5Cqf+d2ZtXAKjZY7cxU",
|
||||
"elements": [
|
||||
"research-dashboard-map"
|
||||
],
|
||||
|
|
@ -894,7 +894,7 @@
|
|||
"scriptUrl": "./research-dashboard/research-dashboard.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./research-dashboard/research-dashboard/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-dashboard/research-dashboard.js\" integrity=\"sha384-OMWktfdHg6hivE32ReD3LQIwg3SxgBdgdltPhfWFSEUybEPU6fsynv4PP22z4yEn\" crossorigin=\"anonymous\"></script>\n<research-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-dashboard-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./research-dashboard/research-dashboard.js\" integrity=\"sha384-2f3/uqetIjziSJf8AGJjFcAyPziq4VsblVOQ0aDxeorpG5Cqf+d2ZtXAKjZY7cxU\" crossorigin=\"anonymous\"></script>\n<research-dashboard-map profile-config='{\"profile\":\"research-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></research-dashboard-map>"
|
||||
},
|
||||
"bundle": "research-dashboard"
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <research-dashboard-map> custom element. -->
|
||||
<script src="../research-dashboard.js" integrity="sha384-OMWktfdHg6hivE32ReD3LQIwg3SxgBdgdltPhfWFSEUybEPU6fsynv4PP22z4yEn" crossorigin="anonymous"></script>
|
||||
<script src="../research-dashboard.js" integrity="sha384-2f3/uqetIjziSJf8AGJjFcAyPziq4VsblVOQ0aDxeorpG5Cqf+d2ZtXAKjZY7cxU" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
Loading…
Reference in a new issue