[openstreetmap/openstreetmap-website] Allow users to hide the heatmap (PR #6606)

Minh Nguyễn notifications at github.com
Thu Dec 18 18:29:37 UTC 2025


@1ec5 commented on this pull request.



> @@ -13,7 +13,7 @@ class HeatmapsController < ApplicationController
     def show
       @user = User.find_by(:display_name => params[:user_display_name])
 
-      if @user && (@user.visible? || current_user&.administrator?)
+      if @user&.public_heatmap? && (@user.visible? || current_user&.administrator?)

I mentioned to @pablobm early on that we could take a conservative approach and hide it from both groups unless someone from either group said they needed it for something. (As long as it’s shown to moderators, it would only make sense for it to be shown to administrators too.)

We could reasonably show the user’s own heatmap even when they opt out, but it really works against the goal of making the profile look similar to what the public sees. Unless we hide it in response to the setting, the setting will appear to have no effect unless the user opens up their profile in private browsing or something. Maybe as tail work, we could consider moving it to the dashboard in that case, so the user can at least still navigate to their own contributions by date?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6606#discussion_r2632163252
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6606/review/3594418737 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251218/cd9a042d/attachment.htm>


More information about the rails-dev mailing list