From c65e1a5f9c047dbf77925e4932df0b52effafab5 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sun, 27 Sep 2026 19:37:09 +0000 Subject: [PATCH] Gospel x Internet shares a tree family by its id alone A family click wrote ?tree= AND its whole language list (hundreds of codes for a big family), a link that breaks in chat apps and SMS. The board's writer now runs after the kit's and removes 'language' while a tree node is active; ?tree= alone restores the node and its languages. --- .../scripts/check-gospel-internet-model.mjs | 8 +++++++ .../gospel-internet/src/useBoard.js | 10 ++++++-- public/dx-maps/doxa-maps-spa/manifest.json | 4 ++-- .../gospel-internet/board/board/index.html | 2 +- .../dx-maps/gospel-internet/board/index.html | 2 +- .../board/india-china/index.html | 2 +- .../board/language-tree/index.html | 2 +- .../board/platforms/index.html | 2 +- .../board/project-700/index.html | 2 +- .../gospel-internet/board/zero/index.html | 2 +- .../gospel-internet/gospel-internet.js | 24 +++++++++---------- public/dx-maps/manifest.json | 4 ++-- 12 files changed, 39 insertions(+), 25 deletions(-) diff --git a/plugin-designs/gospel-internet/scripts/check-gospel-internet-model.mjs b/plugin-designs/gospel-internet/scripts/check-gospel-internet-model.mjs index c50673f30..e0abc2019 100644 --- a/plugin-designs/gospel-internet/scripts/check-gospel-internet-model.mjs +++ b/plugin-designs/gospel-internet/scripts/check-gospel-internet-model.mjs @@ -157,6 +157,14 @@ ok(w.includes('access=bridge') && w.includes('view=zero') && w.includes('utm_sou const mine = M.buildQuery({ view: 'zero', filterSet: { band: 'yes' }, keep: '?band=yes,partial', filters: false }) ok(mine.includes('band=yes%2Cpartial') && mine.includes('view=zero'), 'the board\'s own writer leaves the filter params to the kit (filters:false)') +// 13. a tree node is shared by its id alone: the board's writer drops the kit's long language list +{ + const kitUrl = SV.serializeQuery({ language: ['abf', 'ayh', 'bwi'], band: 'yes' }, '', '', { facetKeys: M.SHARE_FACETS }) + const q = new URLSearchParams(kitUrl); q.delete('language') + const final = M.buildQuery({ view: 'board', filterSet: {}, keep: '?' + q.toString(), tree: 'araw1281', filters: false }) + ok(final.includes('tree=araw1281') && final.includes('band=yes') && !final.includes('language=') && !POISON, `a tree-family link is ?tree= without its language list (${final})`) +} + // 11. translation readiness: current against its snapshot, every roster language present, the no-NT set is // the tree's, the 31 codes Glottolog lacks read as UNKNOWN (null) not "none", and the signal count is a // recount of the five named facts (no hidden weighting) diff --git a/plugin-designs/gospel-internet/src/useBoard.js b/plugin-designs/gospel-internet/src/useBoard.js index a7a4022b0..de94f1588 100644 --- a/plugin-designs/gospel-internet/src/useBoard.js +++ b/plugin-designs/gospel-internet/src/useBoard.js @@ -188,14 +188,20 @@ export function useBoard() { }) function syncUrl() { if (!writeUrl.value || typeof history === 'undefined') return - const qs = M.buildQuery({ view: view.value, filterSet: bus.filterSet, group: openSlug.value, keep: location.search, + let keep = location.search + // A tree node is shared as ?tree= ALONE: its language list (hundreds of codes for a big + // family) made links that break in chat apps and SMS, the field's channel (dx-shepherd GOFAM). The + // kit writes `language` from the bus; this writer runs after it (flush:'post') and removes it while a + // node is active. On load, ?tree= restores the node, which re-applies its languages itself. + if (treeNode.value) { const q = new URLSearchParams(keep); q.delete('language'); keep = q.toString() ? '?' + q.toString() : '' } + const qs = M.buildQuery({ view: view.value, filterSet: bus.filterSet, group: openSlug.value, keep, panel: centre.value, tree: treeNode.value, filters: false }) const next = location.pathname + (qs ? '?' + qs : '') + location.hash if (next !== location.pathname + location.search + location.hash) { try { history.replaceState(history.state, '', next) } catch (_) { /* sandboxed */ } } } - watch([view, openSlug, centre, treeNode, () => JSON.stringify(bus.filterSet)], syncUrl) + watch([view, openSlug, centre, treeNode, () => JSON.stringify(bus.filterSet)], syncUrl, { flush: 'post' }) /** A link to one group, for "Copy link to this group" — the board's own page, ?group=. */ function groupLink(slug) { diff --git a/public/dx-maps/doxa-maps-spa/manifest.json b/public/dx-maps/doxa-maps-spa/manifest.json index 466d7d26a..4d09e75d8 100644 --- a/public/dx-maps/doxa-maps-spa/manifest.json +++ b/public/dx-maps/doxa-maps-spa/manifest.json @@ -604,7 +604,7 @@ "bundle": "gospel-internet", "scriptUrl": "./gospel-internet/gospel-internet.js", "output": "dx-maps/gospel-internet/gospel-internet.js", - "integrity": "sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k", + "integrity": "sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq", "elements": [ "gospel-internet-board" ], @@ -623,7 +623,7 @@ "scriptUrl": "./gospel-internet/gospel-internet.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" }, "instances": [ { diff --git a/public/dx-maps/gospel-internet/board/board/index.html b/public/dx-maps/gospel-internet/board/board/index.html index a9c5e0022..8f96d232e 100644 --- a/public/dx-maps/gospel-internet/board/board/index.html +++ b/public/dx-maps/gospel-internet/board/board/index.html @@ -36,7 +36,7 @@ - + - + - + - + - + - + - + \n\n" + "script": "\n\n\n\n" }, "instances": [ {