@nertc commented on this pull request.


> +      <div id="location_name_warning" class="row align-items-center d-none">
+        <p class="m-0 w-auto fs-6 pe-1"><%= t ".location_name_warning" %></p>
+        <button id="location_default_name" class="btn btn-link p-0 w-auto 
text-sm-start" type="button"></button>
+      </div>

Thanks for suggestions. I agree with you, it seems current solution has some UI 
problems, but adding additional disabled input doesn't align with the UI 
practices we are currently using. Maybe making it more minimalistic will be 
better:
We can remove button and have only following logic:
```
If user has empty `Location Name` field when entering `Profile Edit`:
    Until user changes `Location Name` field manually:
        Autofill will automatically fill `Location Name` field on pin change
Otherwise (if user has already saved `Location Name` and, therefore, field is 
filled, when entering `Profile Edit`):
    If `Location Name` field value exactly matches with the country name of the 
pin:
        Until user changes `Location Name` field manually:
            Autofill will automatically fill `Location Name` field on pin change
    Otherwise:
        Autofill will be deactivated
```

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/5302/review/2522437...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to