diff --git a/library/i18n/locales/ar/connectivity.json b/library/i18n/locales/ar/connectivity.json index 2d5402e9d..66f2ceb89 100644 --- a/library/i18n/locales/ar/connectivity.json +++ b/library/i18n/locales/ar/connectivity.json @@ -64,5 +64,6 @@ "rural": "الريف", "source": "المسح NFHS-5 (2019–2021)، الأشخاص من 15 إلى 49 عامًا: نسبة من سبق لهم استخدام الإنترنت. مسح للأشخاص، لا عدد للاشتراكات.", "missing": "لا توجد بعد حدود ولاية لـ {names}: أرقامها موجودة في البيانات، لا على الخريطة." - } + }, + "loading": "جارٍ رسم الخريطة…" } diff --git a/library/i18n/locales/de/connectivity.json b/library/i18n/locales/de/connectivity.json index 7d755ea09..782e6297e 100644 --- a/library/i18n/locales/de/connectivity.json +++ b/library/i18n/locales/de/connectivity.json @@ -64,5 +64,6 @@ "rural": "Land", "source": "NFHS-5 (2019–21), Personen im Alter von 15–49 Jahren: Anteil derer, die das Internet schon einmal genutzt haben. Eine Befragung von Menschen, keine Zählung von Anschlüssen.", "missing": "Noch keine Staatsgrenze für {names}: Ihre Werte stehen in den Daten, nicht auf der Karte." - } + }, + "loading": "Karte wird gezeichnet…" } diff --git a/library/i18n/locales/en/connectivity.json b/library/i18n/locales/en/connectivity.json index fb72fdf42..4839f85f5 100644 --- a/library/i18n/locales/en/connectivity.json +++ b/library/i18n/locales/en/connectivity.json @@ -64,5 +64,6 @@ "rural": "Rural", "source": "NFHS-5 (2019–21), people aged 15–49: the share who have ever used the internet. A survey of people, not a count of subscriptions.", "missing": "No state boundary yet for {names}: their figures are in the data, not on the map." - } + }, + "loading": "Drawing the map…" } diff --git a/library/i18n/locales/es/connectivity.json b/library/i18n/locales/es/connectivity.json index 5a68d35e5..f455b7168 100644 --- a/library/i18n/locales/es/connectivity.json +++ b/library/i18n/locales/es/connectivity.json @@ -64,5 +64,6 @@ "rural": "Rural", "source": "NFHS-5 (2019–21), personas de 15 a 49 años: proporción que ha usado internet alguna vez. Una encuesta a personas, no un recuento de suscripciones.", "missing": "Aún no hay límite estatal para {names}: sus cifras están en los datos, no en el mapa." - } + }, + "loading": "Dibujando el mapa…" } diff --git a/library/i18n/locales/fr/connectivity.json b/library/i18n/locales/fr/connectivity.json index 71488ebbe..189281d3e 100644 --- a/library/i18n/locales/fr/connectivity.json +++ b/library/i18n/locales/fr/connectivity.json @@ -64,5 +64,6 @@ "rural": "Rural", "source": "NFHS-5 (2019–21), personnes de 15 à 49 ans : part de celles qui ont déjà utilisé Internet. Une enquête auprès des personnes, pas un décompte d’abonnements.", "missing": "Pas encore de limite d’État pour {names} : leurs chiffres figurent dans les données, pas sur la carte." - } + }, + "loading": "Tracé de la carte…" } diff --git a/library/i18n/locales/hi/connectivity.json b/library/i18n/locales/hi/connectivity.json index 49202a9be..bb0605a33 100644 --- a/library/i18n/locales/hi/connectivity.json +++ b/library/i18n/locales/hi/connectivity.json @@ -64,5 +64,6 @@ "rural": "ग्रामीण", "source": "NFHS-5 (2019–21), 15–49 वर्ष के लोग: जिन्होंने कभी इंटरनेट का उपयोग किया है उनका प्रतिशत। यह लोगों का सर्वेक्षण है, सब्सक्रिप्शन की गिनती नहीं।", "missing": "{names} की राज्य सीमा अभी उपलब्ध नहीं है: उनके आँकड़े डेटा में हैं, नक्शे पर नहीं।" - } + }, + "loading": "मानचित्र बनाया जा रहा है…" } diff --git a/library/i18n/locales/it/connectivity.json b/library/i18n/locales/it/connectivity.json index e527d6de5..706246914 100644 --- a/library/i18n/locales/it/connectivity.json +++ b/library/i18n/locales/it/connectivity.json @@ -64,5 +64,6 @@ "rural": "Rurale", "source": "NFHS-5 (2019–21), persone di 15–49 anni: quota di chi ha mai usato internet. Un’indagine sulle persone, non un conteggio di abbonamenti.", "missing": "Ancora nessun confine statale per {names}: i loro dati sono nel dataset, non sulla mappa." - } + }, + "loading": "Disegno della mappa…" } diff --git a/library/i18n/locales/pt/connectivity.json b/library/i18n/locales/pt/connectivity.json index c319ee630..8a150d3fd 100644 --- a/library/i18n/locales/pt/connectivity.json +++ b/library/i18n/locales/pt/connectivity.json @@ -64,5 +64,6 @@ "rural": "Rural", "source": "NFHS-5 (2019–21), pessoas de 15 a 49 anos: proporção que já usou a internet. Uma pesquisa com pessoas, não uma contagem de assinaturas.", "missing": "Ainda não há limite estadual para {names}: os números estão nos dados, não no mapa." - } + }, + "loading": "Desenhando o mapa…" } diff --git a/library/i18n/locales/ro/connectivity.json b/library/i18n/locales/ro/connectivity.json index 7fad2d97e..f71ae3139 100644 --- a/library/i18n/locales/ro/connectivity.json +++ b/library/i18n/locales/ro/connectivity.json @@ -64,5 +64,6 @@ "rural": "Rural", "source": "NFHS-5 (2019–21), persoane de 15–49 de ani: ponderea celor care au folosit vreodată internetul. Un sondaj despre oameni, nu o numărătoare de abonamente.", "missing": "Încă nu există limită de stat pentru {names}: cifrele lor sunt în date, nu pe hartă." - } + }, + "loading": "Se desenează harta…" } diff --git a/library/i18n/locales/ru/connectivity.json b/library/i18n/locales/ru/connectivity.json index aa89b1cec..b7f652740 100644 --- a/library/i18n/locales/ru/connectivity.json +++ b/library/i18n/locales/ru/connectivity.json @@ -64,5 +64,6 @@ "rural": "Село", "source": "NFHS-5 (2019–21), люди 15–49 лет: доля тех, кто когда-либо пользовался интернетом. Опрос людей, а не подсчёт подписок.", "missing": "Для {names} ещё нет границы штата: их данные есть в таблице, но не на карте." - } + }, + "loading": "Отрисовка карты…" } diff --git a/library/i18n/locales/zh/connectivity.json b/library/i18n/locales/zh/connectivity.json index 7666f9290..2aa6d0833 100644 --- a/library/i18n/locales/zh/connectivity.json +++ b/library/i18n/locales/zh/connectivity.json @@ -64,5 +64,6 @@ "rural": "农村", "source": "NFHS-5(2019–21),15–49 岁人群:曾经使用过互联网的比例。这是对人的调查,而不是订阅数统计。", "missing": "{names} 尚无邦界:其数据在数据集中,但未显示在地图上。" - } + }, + "loading": "正在绘制地图…" } diff --git a/plugin-designs/cities-internet/connectivity-map.vue b/plugin-designs/cities-internet/connectivity-map.vue index d62361533..71a311d09 100644 --- a/plugin-designs/cities-internet/connectivity-map.vue +++ b/plugin-designs/cities-internet/connectivity-map.vue @@ -86,6 +86,10 @@ const rows = ref([]) const selected = ref(null) const aiNoticeOpen = ref(true) // dismissible AI-research disclaimer in the detail sheet const err = ref(null) +// Starts TRUE: the notice must be on screen for the first frame, not switched on after a tick. rega +// measured 7-30s to the first data paint, and for that whole window the map was an empty basemap with +// nothing to say it was still working — indistinguishable from a broken embed. +const loading = ref(true) // India by state (data/tables/internet-by-adm1.json, NFHS-5): the one country with sub-national data. const adm1 = shallowRef(null) // { meta, byArea: { [adm1]: { name, women: {total,urban,rural}, men: {…} } } } const adm1Sex = ref('women') // which half of the survey the fill shows; both are in the sheet @@ -438,8 +442,13 @@ onMounted(async () => { paintGroups(map) const geo = await adm1Loaded if (geo && !unmounted) paintAdm1(map, geo) + // ★ CLEARED HERE, NOT ON 'load'. rega measured 7-30s from mount to the first data paint under + // SwiftShader: the style fires 'load' early, while the shaded countries, the adm1 provinces and + // the 2,105 dots all arrive later. Clearing on 'load' would retire the notice during exactly the + // wait it exists to explain, leaving the reader with an empty basemap and no reason for it. + loading.value = false }) - } catch (e) { err.value = String(e.message || e) } + } catch (e) { err.value = String(e.message || e); loading.value = false } }) onBeforeUnmount(() => { // ★ RELEASE THE TEST HOOKS. Each pins whatever it closes over — a map instance pins its @@ -462,6 +471,14 @@ const fmt = (n) => (Number(n) || 0).toLocaleString() const groupOpen = computed(() => !!uiStore?.selectedPeopleGroup) useShadowStyles( + // ⚠ THE MAP MUST FILL ITS HOST, NOT THE VIEWPORT. This element had NO :host rule at all, so a + // custom element defaults to display:inline with no height of its own, and .gm's absolute inset:0 + // resolved against whatever ancestor happened to be positioned. rega measured the result in the + // /embed-test re-shoot at 1440: a 1198x900 canvas inside a 1198x560 embed card — ~340px, the + // attribution among it, drawn below the card and clipped. Same class as the board's, and the same + // fix it already carries: height:100% so a height-bounded slot decides, min-height as a floor so an + // AUTO-height host still gets a usable map instead of a zero-height one that renders nothing. + ':host{display:block;width:100%;height:100%;min-height:420px}' + '.gm{position:absolute;inset:0;overflow:hidden}' + '.gm-map{position:absolute;inset:0}' + // LEGEND: a BOUNDED, left-anchored panel — NOT a full-width strip. @@ -523,6 +540,9 @@ useShadowStyles( '.gm-list ul{margin:0;padding-left:17px;font-size:12px;line-height:1.5}' + '.gm-note{margin-top:9px;font-size:11px;line-height:1.5;opacity:.75}' + '.gm-err{position:absolute;top:50%;left:0;right:0;text-align:center;font-size:13px;opacity:.7}' + + // Same geometry as .gm-err so the two never disagree about where a message belongs. inset-inline, + // not left/right: this string is translated, and under ar it reads from the other edge. + '.gm-wait{position:absolute;top:50%;inset-inline:0;text-align:center;font-size:13px;opacity:.7}' + '.gm-dot{width:10px;height:10px;border-radius:50%;flex:none;box-sizing:border-box;border:1.5px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.25)}' + // The group panel uses Prayer Progress's two wrappers, switched at the same breakpoint. '.gm-pg-mobile{display:none}' + @@ -576,7 +596,11 @@ useShadowStyles( +
{{ err }}
+
{{ t('connectivity.loading') }}