[openstreetmap/openstreetmap-website] Editor color mode preference (PR #6492)

Pablo Brasero notifications at github.com
Mon Nov 3 11:40:14 UTC 2025


@pablobm commented on this pull request.



> @@ -13,7 +13,7 @@
      data[:token] = token.token
    end
    data[:locale] = ID::LOCALES.preferred(preferred_languages).to_s
-   data[:theme] = (preferred_color_scheme(:site) if preferred_color_scheme(:site) != "auto")
+   data[:theme] = (preferred_color_scheme(:editor) if preferred_color_scheme(:editor) != "auto") || (preferred_color_scheme(:site) if preferred_color_scheme(:site) != "auto")

This got too complex here. Let's move it to a helper, preferably with a test.

> @@ -32,5 +32,13 @@
                    :class => "form-select" %>
   </div>
 
+  <div class="mb-3">
+    <%= label_tag "editor_color_scheme", t(".preferred_editor_color_scheme"), :class => "form-label" %>
+    <%= select_tag "editor_color_scheme",
+                   options_for_select(%w[auto light dark].map { |scheme| [t(".editor_color_schemes.#{scheme}"), scheme] },

The user-facing label "auto" is not clear enough here. There can be confusion as to how three dropdowns relate to each other. How about labelling it as "same as Website" on both `:editor` and `:map`?

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

Message ID: <openstreetmap/openstreetmap-website/pull/6492/review/3410599357 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251103/5813cfd9/attachment-0001.htm>


More information about the rails-dev mailing list