<p></p>
<p><b>@tomhughes</b> commented on this pull request.</p>

<p dir="auto">This isn't a complete review because I need to refresh my memory of how the language changes work and the changes this is making to that because it all looks horrible to me and I want to see if there's a better way to do it so this is just a few initial thoughts.</p><hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412#discussion_r2370153738">app/controllers/languages_controller.rb</a>:</p>
<pre style='color:#555'>> @@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class LanguagesController < ApplicationController
+  before_action :authorize_web
+  before_action :set_locale
+  authorize_resource :class => false
+
+  def show
+    @source_page = params[:source]
+    render :partial => "layouts/select_language_list_frame"
</pre>
<p dir="auto">Why not use the standard rails view name of <code class="notranslate">languages/show</code> for this, then you would just need <code class="notranslate">render :layout => false</code> like the other panes?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412#discussion_r2370158670">config/routes.rb</a>:</p>
<pre style='color:#555'>> @@ -208,6 +208,7 @@
   post "/login" => "sessions#create"
   match "/logout" => "sessions#destroy", :via => [:get, :post]
   get "/offline" => "site#offline"
+  resource :language, :path => "/select_language_list", :only => :show
</pre>
<p dir="auto">Maybe we should use the same naming as the other panes?</p>
⬇️ Suggested change
<pre style="color: #555">-  resource :language, :path => "/select_language_list", :only => :show
+  resource :languages_pane, :path => "/panes/languages", :only => :show
</pre>


<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412#discussion_r2370189715">app/views/layouts/_header.html.erb</a>:</p>
<pre style='color:#555'>> @@ -116,15 +116,21 @@
         <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="<%= t "javascripts.close" %>"></button>
       </div>
       <div class="modal-body px-1">
-        <% if current_user&.id %>
-          <%= form_tag basic_preferences_path, :method => "PUT" do %>
-            <%= hidden_field_tag "referer", request.fullpath %>
-            <%= hidden_field_tag "language", I18n.locale %>
-            <%= render "layouts/select_language_list" %>
-          <% end %>
-        <% else %>
-          <%= render "layouts/select_language_list" %>
-        <% end %>
+        <div class="mb-3 px-2">
</pre>
<p dir="auto">What's the logic behind rendering the search form in the main page instead of as part of the turbo frame?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6412#pullrequestreview-3254980074">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJRJTOFYIDS4NLXJUT3UBJXTAVCNFSM6AAAAACHGBLHKCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTENJUHE4DAMBXGQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMOFE4HPPFACRQUEHT3UBJXTA5CNFSM6AAAAACHGBLHKCWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTWCAMG6U.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6412/review/3254980074</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6412#pullrequestreview-3254980074",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6412#pullrequestreview-3254980074",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>