[openstreetmap/openstreetmap-website] Prerender heatmap in partial (PR #5998)
    Tom Hughes 
    notifications at github.com
       
    Wed May 14 19:16:02 UTC 2025
    
    
  
@tomhughes commented on this pull request.
> -
-    cal.on("mouseover", (event, timestamp, value) => {
-      if (!displayName || !value) return;
-      if (event.target.parentElement.nodeName === "a") return;
+    }
+    if (weekColumn === 1) {
+      $day.addClass("d-none");
+      continue;
+    }
+    const count = $day.data("count") ?? 0;
+    const tooltipText = getTooltipText(date, count);
+    $day
+      .css("grid-area", getWeekdayRow(date.getUTCDay()) + " / " + weekColumn)
+      .attr("aria-label", tooltipText)
+      .tooltip({
+        title: tooltipText,
Currently the tooltips are prone to line wrapping which doesn't look very good so I'd suggest adding a custom class here like:
```js
customClass: "heatmap-tooltip"
```
and then a CSS rule to allow wider tooltips:
```css
.heatmap-tooltip {
  --bs-tooltip-max-width: 300px;
}
```
-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5998#pullrequestreview-2841243314
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5998/review/2841243314 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250514/52f606c0/attachment.htm>
    
    
More information about the rails-dev
mailing list