From 0a30c935060eb9f1dd9ed49acdc858f8b7f11074 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sat, 26 Sep 2026 06:44:30 +0000 Subject: [PATCH 1/2] Delete the stat-value shrink: its premise went stale when Bebas was vendored MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rega measured it on main 71858d71 against live: our "43,045,275" rendered at 38.15px where theirs is 47.68px, on a card of the same width, while the other three stats matched exactly. The cause was ours — .rd-stat__value[data-len="long"|"xlong"], stepping the figure down a rung. Their .region-stat__value is font-family-heading + font-size-3xl + line-height:1 and nothing else; no such attribute exists in their markup. ITS OWN COMMENT CONTAINED BOTH REASONS TO DELETE IT. · "our condensed fallback is wider" than Bebas — STALE. Bebas is vendored now (public/dx-maps/assets/fonts/bebas-neue, and the glyph oracle reads 279 = 279 SAME), so there is no wider fallback left to compensate for. useDocumentFont.js records that an uppercase hack and "two font-sizes" were knock-ons of not having the real face; this rule is the third, missed when the others were fixed. · "every value DX-life itself renders keeps their size" — FALSIFIED. "43,045,275" is ten characters, so it hit the 'long' bucket, and DX-life renders exactly that number at full size on /regions/africa. A rule whose own invariant is violated in practice is not protecting anything. Deleted with its mechanism, not just its symptom: both rules, the :data-len binding, and lenBucket() itself. A dead helper left behind is the next reader's puzzle. Found because rega re-measured every over-reach hit against the PREVIOUS tree, which separated "my line-height change did this" from "this was already wrong". Without that control the finding would have looked like my regression, and I would have spent the tick defending the wrong thing. --- .../regions-dashboard/region-dashboards.vue | 23 +-- public/dx-maps/doxa-maps-spa/manifest.json | 8 +- public/dx-maps/manifest.json | 8 +- .../region-dashboards/index.html | 2 +- .../regions-dashboard/regions-dashboard.js | 188 +++++++++--------- .../regions-dashboard/regions-list/index.html | 2 +- .../regions-dashboard/regions-mfe/index.html | 2 +- 7 files changed, 116 insertions(+), 117 deletions(-) diff --git a/plugin-designs/regions-dashboard/region-dashboards.vue b/plugin-designs/regions-dashboard/region-dashboards.vue index ad8dd0c31..78ce88d08 100644 --- a/plugin-designs/regions-dashboard/region-dashboards.vue +++ b/plugin-designs/regions-dashboard/region-dashboards.vue @@ -193,15 +193,6 @@ function formatNumber(n) { try { return v.toLocaleString(`${locale.value || 'en'}-u-nu-latn`) } catch (_) { return v.toLocaleString('en-US') } } -// Which size step a stat value needs so it is never CUT OFF. Their 47.68px fits up to 10 -// characters in the 240px card at Bebas's width; our condensed fallback is wider, so the step -// down starts at 10. Only ever shrinks -- every value DX-life itself renders keeps their size. -function lenBucket(v) { - const n = String(v).length - if (n >= 12) return 'xlong' - if (n >= 10) return 'long' - return '' -} // ── the selected subject ──────────────────────────────────────────────────── const selectedRegion = computed(() => @@ -856,8 +847,16 @@ useShadowStyles( '.rd-stats{ display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));' + ' gap:var(--spacing-md); }' + '.rd-stat{ text-align:center; }' + - '.rd-stat__value[data-len="long"]{ font-size:var(--font-size-2xl); }' + - '.rd-stat__value[data-len="xlong"]{ font-size:var(--font-size-xl); }' + + // ★ THE data-len SHRINK IS GONE, AND ITS OWN COMMENT SHOWED WHY. Their .region-stat__value is + // font-family-heading + font-size-3xl + line-height:1 and nothing else -- no such attribute exists + // in their markup. Ours was a shrink-to-fit workaround whose stated premise was "our condensed + // fallback is wider" than Bebas. That is STALE: Bebas is vendored now (assets/fonts/bebas-neue, + // glyph oracle 279 = 279 SAME), so there is no wider fallback to compensate for. + // Its other claim -- "every value DX-life itself renders keeps their size" -- was FALSIFIED by + // measurement: rega found "43,045,275" (10 chars, so it hit the 'long' bucket) rendered at + // 38.15px against their 47.68px on the same-width card, while the other three stats matched + // exactly. A rule whose own invariant is violated in practice is not protecting anything. + // Deleted WITH its mechanism -- the binding and lenBucket() too, not just the rules. '.rd-stat__value{ margin:0; font-size:var(--font-size-3xl); line-height:1;' + ' font-family:"Bebas Neue","Arial Narrow",BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;' + ' font-weight:400; }' + @@ -1154,7 +1153,7 @@ useShadowStyles(
-

{{ st.value }}

+

{{ st.value }}

{{ st.label }}

diff --git a/public/dx-maps/doxa-maps-spa/manifest.json b/public/dx-maps/doxa-maps-spa/manifest.json index c98192844..8442514d0 100644 --- a/public/dx-maps/doxa-maps-spa/manifest.json +++ b/public/dx-maps/doxa-maps-spa/manifest.json @@ -887,7 +887,7 @@ "bundle": "regions-dashboard", "scriptUrl": "./regions-dashboard/regions-dashboard.js", "output": "dx-maps/regions-dashboard/regions-dashboard.js", - "integrity": "sha384-KrL25wcHjJ2TbXVu6kPSB8hTxD3b+xpGRexh811vSw3KsW7vFF/Vshr/qbGCgRy4", + "integrity": "sha384-/yyyFg2PRW3AhvfyT2rEX6eaZvCpym7lykp/twZVgmPFI7ednM1RAnsk03IN5yeo", "elements": [ "regions-dashboard" ], @@ -907,7 +907,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } }, { @@ -921,7 +921,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -935,7 +935,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } } ] diff --git a/public/dx-maps/manifest.json b/public/dx-maps/manifest.json index c98192844..8442514d0 100644 --- a/public/dx-maps/manifest.json +++ b/public/dx-maps/manifest.json @@ -887,7 +887,7 @@ "bundle": "regions-dashboard", "scriptUrl": "./regions-dashboard/regions-dashboard.js", "output": "dx-maps/regions-dashboard/regions-dashboard.js", - "integrity": "sha384-KrL25wcHjJ2TbXVu6kPSB8hTxD3b+xpGRexh811vSw3KsW7vFF/Vshr/qbGCgRy4", + "integrity": "sha384-/yyyFg2PRW3AhvfyT2rEX6eaZvCpym7lykp/twZVgmPFI7ednM1RAnsk03IN5yeo", "elements": [ "regions-dashboard" ], @@ -907,7 +907,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } }, { @@ -921,7 +921,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -935,7 +935,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } } ] diff --git a/public/dx-maps/regions-dashboard/region-dashboards/index.html b/public/dx-maps/regions-dashboard/region-dashboards/index.html index 90b2d9547..59db5fe08 100644 --- a/public/dx-maps/regions-dashboard/region-dashboards/index.html +++ b/public/dx-maps/regions-dashboard/region-dashboards/index.html @@ -36,7 +36,7 @@ - + - + - + \n\n" + "script": "\n\n\n\n" } }, { @@ -921,7 +921,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -935,7 +935,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } } ] diff --git a/public/dx-maps/manifest.json b/public/dx-maps/manifest.json index 8442514d0..69136dd61 100644 --- a/public/dx-maps/manifest.json +++ b/public/dx-maps/manifest.json @@ -887,7 +887,7 @@ "bundle": "regions-dashboard", "scriptUrl": "./regions-dashboard/regions-dashboard.js", "output": "dx-maps/regions-dashboard/regions-dashboard.js", - "integrity": "sha384-/yyyFg2PRW3AhvfyT2rEX6eaZvCpym7lykp/twZVgmPFI7ednM1RAnsk03IN5yeo", + "integrity": "sha384-vtLU1KzPE5yyGPSDzM/tfowtT8xYy5Q8tKlISnwEt/ZBX6B74UJYsKeUEcByfzZo", "elements": [ "regions-dashboard" ], @@ -907,7 +907,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } }, { @@ -921,7 +921,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n" + "script": "\n\n" } }, { @@ -935,7 +935,7 @@ "scriptUrl": "./regions-dashboard/regions-dashboard.js", "embed": { "iframe": "", - "script": "\n\n\n\n" + "script": "\n\n\n\n" } } ] diff --git a/public/dx-maps/regions-dashboard/region-dashboards/index.html b/public/dx-maps/regions-dashboard/region-dashboards/index.html index 59db5fe08..8225f322d 100644 --- a/public/dx-maps/regions-dashboard/region-dashboards/index.html +++ b/public/dx-maps/regions-dashboard/region-dashboards/index.html @@ -36,7 +36,7 @@ - + - + - +