@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/2841243...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev