[openstreetmap/openstreetmap-website] Add profile location (PR #5302)

David Tsiklauri notifications at github.com
Wed Dec 25 08:46:10 UTC 2024


@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/2522437912 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241225/2258f337/attachment.htm>


More information about the rails-dev mailing list