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

2025-01-05 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +if (!locationInput.dirty || > locationName.includes(locationInput.countryName)) { + $("#location_name_warning").addClass("d-none"); +} else { + $("#location_name_warning").removeClass("d-none"); +} As we updated logic, this code b

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

2025-01-05 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +http://www.w3.org/2000/svg"; width="16" > height="16" fill="currentColor" class="bi bi-geo-alt-fill" viewBox="0 0 16 > 16"> + + `<%= t ".home location" %>` was added to the svg. -- Reply to this emai

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

2025-01-03 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 777eb643422fcd5267c647b388e14144e8f5fe09 Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/aac929d79e91cb554655a60b1a2cc81a364d6d7f..777eb643422fcd5267c647b388e14144e8f5fe09 You are receiving this because yo

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

2025-01-03 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. aac929d79e91cb554655a60b1a2cc81a364d6d7f Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/135ca1badb8f21f0047153547def0a954e6f7037..aac929d79e91cb554655a60b1a2cc81a364d6d7f You are receiving this because yo

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

2025-01-03 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. defb24f00bf08f00b778c0270b9887502b48a340 Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/77e3f39bdf29c9a41475e1ea1347560add9c65d3..defb24f00bf08f00b778c0270b9887502b48a340 You are receiving this because yo

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

2025-01-03 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 77e3f39bdf29c9a41475e1ea1347560add9c65d3 Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/ead1ba9ab27dd2ca00c395a36cf99403792e2be2..77e3f39bdf29c9a41475e1ea1347560add9c65d3 You are receiving this because yo

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

2025-01-03 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. ead1ba9ab27dd2ca00c395a36cf99403792e2be2 Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/5fd8b6165732618de7d8ef987d170809eacfb59a..ead1ba9ab27dd2ca00c395a36cf99403792e2be2 You are receiving this because yo

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

2024-12-25 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + +<%= t ".location_name_warning" %> + + Yes, either on page load, or if we want to avoid an additional call on the page load, we can call Nominatim twice on the first change of the pin (one for the previous value and one fo

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

2024-12-25 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + +<%= t ".location_name_warning" %> + + > If `Location Name` field value exactly matches with the country name of the > pin That requires fetching the country from Nominatim before the location changes, possibly on p

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

2024-12-25 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + +<%= t ".location_name_warning" %> + + 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 usi

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

2024-12-07 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + +<%= t ".location_name_warning" %> + + and the button can become too large ![image](https://github.com/user-attachments/assets/17439310-4dc1-4a26-bf60-3143cb4cbaf2) -- Reply to this email directly or view it on GitH

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

2024-12-07 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + +<%= t ".location_name_warning" %> + + Maybe we want something like this? ![image](https://github.com/user-attachments/assets/22f241ab-8afe-4031-9854-f0cf33c01b27) "Autofill %{country}" is probably not going to look g

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

2024-12-07 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > +http://www.w3.org/2000/svg"; width="16" > height="16" fill="currentColor" class="bi bi-geo-alt-fill" viewBox="0 0 16 > 16"> + + We probably want `` in this svg. -- Reply to this email directly

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

2024-12-07 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + +<%= t ".location_name_warning" %> + + The language of %{country} is currently based on the browser settings / Accept-Language header. Is it what we want? -- Reply to this email directly or view it on GitHub: https:

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

2024-12-07 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > +if (!locationInput.dirty || > locationName.includes(locationInput.countryName)) { + $("#location_name_warning").addClass("d-none"); +} else { + $("#location_name_warning").removeClass("d-none"); +} Wouldn't using jQuery's `s

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

2024-11-25 Thread David Tsiklauri via rails-dev
Thank you for the review. PR was updated according to the comments. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302#issuecomment-2497515015 You are receiving this because you are subscribed to this thread. Message ID: __

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

2024-11-25 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -178,6 +220,42 @@ $(document).ready(function () { } } + function updateHomeLocation() { +const lat = $("#home_lat").val().trim(); +const lon = $("#home_lon").val().trim(); +if (!lat || !lon) { + return; +} + +const g

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

2024-11-25 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + +<%= t ".location_name_warning" %> + + Was changed with the button named "Autofill %{country}". -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302#discuss

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

2024-11-25 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -178,6 +220,42 @@ $(document).ready(function () { } } + function updateHomeLocation() { +const lat = $("#home_lat").val().trim(); +const lon = $("#home_lon").val().trim(); +if (!lat || !lon) { + return; +} + +const g

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

2024-11-25 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -0,0 +1,22 @@ +require "application_system_test_case" + +class UserLocationChangeTest < ApplicationSystemTestCase + def setup +stub_request(:get, /.*gravatar.com.*d=404/).to_return(:status => 404) + end + + test "User can change their location"

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

2024-11-25 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 5fd8b6165732618de7d8ef987d170809eacfb59a Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/9f8d33b3d3b972ab4e653f2e9aefb18606d8b2f6..5fd8b6165732618de7d8ef987d170809eacfb59a You are receiving this because yo

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

2024-11-25 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 9f8d33b3d3b972ab4e653f2e9aefb18606d8b2f6 Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/91030dc47f1b2e1d1fcc1475e9c2c8e109a9108e..9f8d33b3d3b972ab4e653f2e9aefb18606d8b2f6 You are receiving this because yo

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

2024-11-25 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 91030dc47f1b2e1d1fcc1475e9c2c8e109a9108e Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/e5de62853b9ff5e5bb99572d38a2f5d1c0a37eda..91030dc47f1b2e1d1fcc1475e9c2c8e109a9108e You are receiving this because yo

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

2024-11-11 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -178,6 +220,42 @@ $(document).ready(function () { } } + function updateHomeLocation() { +const lat = $("#home_lat").val().trim(); +const lon = $("#home_lon").val().trim(); +if (!lat || !lon) { + return; +} + +c

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

2024-11-11 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + +<%= t ".location_name_warning" %> + + This looks like a sentence and it's not obvious that it ends with a button I'm supposed to click to update the value: ![image](https://github.com/user-attachments/assets/7b05903

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

2024-11-11 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -178,6 +220,42 @@ $(document).ready(function () { } } + function updateHomeLocation() { +const lat = $("#home_lat").val().trim(); +const lon = $("#home_lon").val().trim(); +if (!lat || !lon) { + return; +} + +c

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

2024-11-11 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,22 @@ +require "application_system_test_case" + +class UserLocationChangeTest < ApplicationSystemTestCase + def setup +stub_request(:get, /.*gravatar.com.*d=404/).to_return(:status => 404) + end + + test "User can change their loca

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

2024-11-08 Thread David Tsiklauri via rails-dev
@tomhughes Thank you for the comment. I agree with you about the complexity of the code, but there are several reasons for both methods. Changing location name manually solves cases like: 1. Disputed areas - someone living in the area A may not want to show that area is part of country B and no

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

2024-11-05 Thread Tom Hughes via rails-dev
This seems like an awful lot of complication... It seems to me that we have the option of either allowing the user to input freetext, or of generating something from the location with Nominatim but this tries to do both at once which just makes things very complicated and probably quite confus

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

2024-11-05 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. e5de62853b9ff5e5bb99572d38a2f5d1c0a37eda Add profile location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5302/files/d20e90d5a8e55b94805cbe21c3c0633ddea36cc6..e5de62853b9ff5e5bb99572d38a2f5d1c0a37eda You are receiving this because yo

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

2024-11-05 Thread David Tsiklauri via rails-dev
PR adds location name info on the user profile page. Location name can be changed from "Edit Profile" page either by manual typing or auto-filling according to the home location. One column was added to the user table to save user's location. JS logics are responsible for handling: 1) Delete-Und