heartwood every commit a ring

Fix map popup visibility and chart tooltip font on server

56710099 by Isaac Bythewood · 2 months ago

Fix map popup visibility and chart tooltip font on server

Replace Bootstrap CSS class dependency in Datamaps popupTemplate with
self-contained inline styles so the popup renders correctly regardless
of CSS cascade issues introduced by the base href tag in production.
Add null guard for states with no session data. Apply fontStack to
Chart.js tooltip title and body fonts for consistency with axes/legend.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
modified properties/static_src/scripts/property_graphs.js
@@ -61,6 +61,8 @@ document.addEventListener("DOMContentLoaded", function () {        tooltip: {          mode: "index",          intersect: false,          titleFont: { family: fontStack },          bodyFont: { family: fontStack },        },        legend: {          position: "top",
modified properties/static_src/scripts/property_map.js
@@ -31,12 +31,11 @@ document.addEventListener("DOMContentLoaded", function () {    geographyConfig: {      highlightFillColor: "#0d6efd",      popupTemplate: function (geo, data) {        const count = data && data.numberOfThings != null ? data.numberOfThings : 0;        return (`          <div class="tooltip show" role="tooltip">            <div class="tooltip-inner text-nowrap">              <strong class="d-block">${geo.properties.name}</strong>              ${data.numberOfThings} session start${data.numberOfThings === 1 ? "" : "s"}            </div>          <div style="position:relative;padding:4px 10px;background:rgba(0,0,0,0.85);color:#fff;border-radius:4px;font-size:0.875rem;white-space:nowrap;pointer-events:none;">            <strong style="display:block;">${geo.properties.name}</strong>            ${count} session start${count === 1 ? "" : "s"}          </div>        `);      },