[openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)
Emin Kocan
notifications at github.com
Tue Jan 28 09:22:27 UTC 2025
@kcne commented on this pull request.
> +//= require popper
+//= require tooltip
+
+
+/* global CalHeatmap, CalendarLabel, Tooltip */
+document.addEventListener("DOMContentLoaded", () => {
+ const heatmapElement = document.querySelector("#cal-heatmap");
+
+ if (!heatmapElement) {
+ console.warn("Heatmap element not found in the DOM.");
+ return;
+ }
+
+ const heatmapData = heatmapElement.dataset.heatmap ? JSON.parse(heatmapElement.dataset.heatmap) : [];
+ const colorScheme = heatmapElement.dataset.siteColorScheme || "auto";
+ const locale = $("head").data().locale;
I noticed #5538 was merged. I updated the code to use `I18n.locale` here instead. Let me know if I need to improve this further. Thank you.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#discussion_r1931800660
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5402/review/2577576927 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250128/b3e7e88e/attachment.htm>
More information about the rails-dev
mailing list