Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2025-01-15 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + if accumulated_length >= max_length +node.remove unless !last_child.nil? && last_child.ancestors.include?(node) +next + end + + next unless node.children.empty? + + accumulated_length += node.text? ? node.text.length

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2025-01-15 Thread David Tsiklauri via rails-dev
PR was updated. Truncation logic was moved to `RichText::Base` and now `.to_html` can take truncation length as an argument (if not provided, full content will be displayed). -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5121#i

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2025-01-15 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 09f4fb63448798f0698efa82052576005ab6a533 Provide a truncated view of recent diaries -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5121/files/f5a5cfc94be4aa89137401a308a7716effa640f5..09f4fb63448798f0698efa82052576005ab6a533 You are re

Re: [openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)

2025-01-14 Thread David Tsiklauri via rails-dev
> > I think tooltips are quite handy even if user can't click on the profile > > links (to just take a glance at reporting users' names) > > Can't you don this already by looking at the link location that the browse > shows? If there is no tooltip on the issues, which has more than 3 reporters,

Re: [openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)

2025-01-14 Thread David Tsiklauri via rails-dev
@AntonKhorev I'll update this PR to have vertical list of `Reporting users`. Do you also suggest to completely remove tooltips? I think tooltips are quite handy even if user can't click on the profile links (to just take a glance at reporting users' names), but it introduces additional complexit

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-13 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + follow: +heading: "Do you want to follow %{user}?" +button: "Follow User" + unfollow: +heading: "Do you want to unfollow %{user}?" +button: "Unfollow" `Unfollow` was changed to `Unfollow User` -- Reply to thi

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-13 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > - <%= link_to t(".remove as friend"), > remove_friend_path(:display_name => @user.display_name), :method => :post %> + <%= link_to t(".unfollow"), follow_path(:display_name => @user.display_name), :method => :delete %>

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-13 Thread David Tsiklauri via rails-dev
@nertc pushed 2 commits. 2b7a48029bff06c190544f91c5969b09aeae552b Modify the way Friends are added be11f2075e8bbde0a1e0640fd254c64ee0c94f25 Refactor friendships controller and model -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5261/files/9fcfc1af4cd0c32958

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-13 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 9fcfc1af4cd0c32958e18ba35e228aa7a055e423 Refactor friendships controller and model -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5261/files/a153faf0010fdf2b977a4f35f49bdaf3814c6fbc..9fcfc1af4cd0c32958e18ba35e228aa7a055e423 You are rec

Re: [openstreetmap/openstreetmap-website] Use resourceful route for user status (PR #5437)

2025-01-13 Thread David Tsiklauri via rails-dev
@nertc approved this pull request. Tested and code works properly. I like this change, this kind of separation of functionalities make code more readable and easier to work with. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/

Re: [openstreetmap/openstreetmap-website] Use turbo for the settings page to stop the URL changing (PR #5453)

2025-01-13 Thread David Tsiklauri via rails-dev
@nertc approved this pull request. Code works properly and solves the issue raised in the comment mentioned in the description. There is also a different idea to solve the problem (https://github.com/openstreetmap/openstreetmap-website/pull/5449#issuecomment-2578415862), but this PR has other

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-10 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + has_many :follows, -> { joins(:following).where(:users => { :status => > %w[active confirmed] }) } + has_many :followings, :through => :follows, :source => :following > Maybe use "Following" instead of "Followed users" for better clarity. It > alig

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-10 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + follow: +heading: "Do you want to follow %{user}?" +button: "Follow User" + unfollow: +heading: "Do you want to unfollow %{user}?" +button: "Unfollow" I tried to stick to the formulations from the `friendship`

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-10 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > - <%= link_to t(".remove as friend"), > remove_friend_path(:display_name => @user.display_name), :method => :post %> + <%= link_to t(".unfollow"), follow_path(:display_name => @user.display_name), :method => :delete %>

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-10 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + before_action :check_database_writable, :only => [:create, :destroy, :edit] + before_action :lookup_friend, :only => [:create, :destroy, :edit] `:only` was removed -- Reply to this email directly or view it on GitHub: https://github.com/openstreetm

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-10 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + scope "/user/:display_name" do +resource :follow, :only => [:create, :destroy, :edit], :path => "follow" + end Redirections were added from `/make_friend` and `/remove_friend` to `/follow/edit` -- Reply to this email directly or view it on Git

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-10 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + belongs_to :befriender, :class_name => "User", :foreign_key => :user_id, > :inverse_of => :follows + belongs_to :befriendee, :class_name => "User", :foreign_key => :friend_user_id, :inverse_of => :follows `:befriender` was changed to `:follower` an

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-10 Thread David Tsiklauri via rails-dev
@nertc pushed 2 commits. 9f615bd98e9aba76eb0c712fce430109d8212575 Modify the way Friends are added a153faf0010fdf2b977a4f35f49bdaf3814c6fbc Refactor friendships controller and model -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5261/files/5c9c7b818519080ba9

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-10 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 5c9c7b818519080ba96106e5cf8c0b92abba2874 Refactor friendships controller and model -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5261/files/36fba94eaa196762872d337975836625a65c107e..5c9c7b818519080ba96106e5cf8c0b92abba2874 You are rec

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2025-01-08 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + belongs_to :befriender, :class_name => "User", :foreign_key => :user_id, > :inverse_of => :follows + belongs_to :befriendee, :class_name => "User", :foreign_key => :friend_user_id, :inverse_of => :follows I tried to change as few things in DB as po

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2025-01-08 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -225,4 +225,27 @@ $(document).ready(function () { $("#read_tou").on("click", function () { $("#continue").prop("disabled", !($(this).prop("checked") && $("#read_ct").prop("checked"))); }); + + $("#add-social-link").click(function (event) {

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2025-01-08 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +# created_at :datetime not null +# updated_at :datetime not null +# +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + b

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2025-01-08 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -40,6 +40,21 @@ + +<%= t ".social_links.legend" %> + + <%= f.fields_for :social_links do |social_link_form| %> + + <%= social_link_form.text_field :url, :hide_label => true, :wrapper_class => "col-sm-8" %> +

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2025-01-08 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +:substack => %r{substack\.com/@([a-zA-Z0-9_-]+)}, +:telegram => %r{t\.me/([a-zA-Z0-9_]+)}, +:threads => %r{threads\.net/@([a-zA-Z0-9_]+)}, +:tiktok => %r{tiktok\.com/@([a-zA-Z0-9_]+)}, +:twitch => %r{twitch\.tv/([a-zA-Z0-9_]+)}, +

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2025-01-08 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. bfa37a02549d1a5ee3ffdf5b686141bd8fc60a50 Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/a1b03f9f696183d5bee5d9355ceae48a806db130..bfa37a02549d1a5ee3ffdf5b686141bd8fc60a50 You are receiving this becaus

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2025-01-08 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. a1b03f9f696183d5bee5d9355ceae48a806db130 Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/55c89e6cc0cf41327059dff1ddf1b8116d4580e6..a1b03f9f696183d5bee5d9355ceae48a806db130 You are receiving this becaus

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2025-01-08 Thread David Tsiklauri via rails-dev
> Do we need another set of icons in addition to > `app/assets/images/social_icons`? They have different design. They are more colorful and more like logos which should gain users' attention (for example as share buttons), but icons added by this PR are one color, simple icons, which should not

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2025-01-08 Thread David Tsiklauri via rails-dev
> When I'm making a site for myself and there's this kind of UI with _Add_ > buttons adding an input and _Remove_ buttons next to added inputs, I don't > bother doing it. I just put a ``, it's easier to edit. In this case > I'd have a textarea with each nonempty line corresponding to a link. Why

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 social profile links (PR #5439)

2024-12-27 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -40,6 +40,21 @@ + +<%= t ".social_links.legend" %> + + <%= f.fields_for :social_links do |social_link_form| %> + + <%= social_link_form.text_field :url, :hide_label => true, :wrapper_class => "col-sm-8" %> +

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2024-12-27 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +:substack => %r{substack\.com/@([a-zA-Z0-9_-]+)}, +:telegram => %r{t\.me/([a-zA-Z0-9_]+)}, +:threads => %r{threads\.net/@([a-zA-Z0-9_]+)}, +:tiktok => %r{tiktok\.com/@([a-zA-Z0-9_]+)}, +:twitch => %r{twitch\.tv/([a-zA-Z0-9_]+)}, +

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 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] Modify the way "Friends" are added (PR #5261)

2024-12-24 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -280,8 +280,10 @@ resource :profile, :only => [:edit, :update] # friendships - match "/user/:display_name/make_friend" => "friendships#make_friend", :via => [:get, :post], :as => "make_friend" - match "/user/:display_name/remove_friend" => "

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-12-24 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 36fba94eaa196762872d337975836625a65c107e Refactor friendships controller and model -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5261/files/02bede750de8a388d0ef378e2c2c583bfba1ca4a..36fba94eaa196762872d337975836625a65c107e You are rec

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2024-12-23 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 55c89e6cc0cf41327059dff1ddf1b8116d4580e6 Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/46f7da62f4bad5b672fb9193644a64c1c8c72083..55c89e6cc0cf41327059dff1ddf1b8116d4580e6 You are receiving this becaus

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2024-12-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + if accumulated_length >= max_length +node.remove unless !last_child.nil? && last_child.ancestors.include?(node) +next + end + + next unless node.children.empty? + + accumulated_length += node.text? ? node.text.length

Re: [openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)

2024-12-23 Thread David Tsiklauri via rails-dev
> > It will make Reporter Users cells too high which will cause additional > > whitespaces in other cells. > > Is that additional whitespace going to be a problem? Sorry for the late answer. I think it will be a problem in terms of UI and UX: UI - visually, additional whitespaces in the table ma

Re: [openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2024-12-23 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 46f7da62f4bad5b672fb9193644a64c1c8c72083 Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/471cbf6462bf835a1a3e35dbd72862d4a6e75b3c..46f7da62f4bad5b672fb9193644a64c1c8c72083 You are receiving this becaus

[openstreetmap/openstreetmap-website] Add social profile links (PR #5439)

2024-12-23 Thread David Tsiklauri via rails-dev
This PR addresses "Please make contact information fields, how to contact the user, email address, telegrams, various social networks https://www.openstreetmap.org"; issue mentioned in the https://github.com/openstreetmap/openstreetmap-website/issues/2245 ### Description This PR adds: - DB: Soc

[openstreetmap/openstreetmap-website] Profile Page Redesign (Issue #5438)

2024-12-23 Thread David Tsiklauri via rails-dev
### Problem There are issues and PRs opened about adding new features and designs to the profile page. On the one hand, to maintain easier management over them and, on the other hand, to see and discuss whole picture and long-run results this page should achieve, it will be great if there is an

Re: [openstreetmap/openstreetmap-website] Please make contact information fields, how to contact the user, email address, telegrams, various social networks https://www.openstreetmap.org (#2245)

2024-12-09 Thread David Tsiklauri via rails-dev
I agree with the issue, current User Profile page provides functionalities for social interactions like Friendship, Messaging, Profile Description and etc. But to strengthen up community beyond the website and ease communication, it would be great if Social Profile Links could be added to the pr

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] Show "reporting user" on "issues" screen (PR #4990)

2024-11-18 Thread David Tsiklauri via rails-dev
@AntonKhorev It will make `Reporter Users` cells too high which will cause additional whitespaces in other cells. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/4990#issuecomment-2484796738 You are receiving this because you are

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2024-11-18 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. e13e04e4bcaa5749f543b5e5d15bc96b8d69f808 Provide a truncated view of recent diaries -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5121/files/2f6e72a8c8f2215847fc23e6afd70fe1e7ce0d0c..e13e04e4bcaa5749f543b5e5d15bc96b8d69f808 You are re

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2024-11-18 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + def truncate_html(html, max_length, empty_tag_length = 500) +doc = Nokogiri::HTML::DocumentFragment.parse(html) +accumulated_length = 0 +truncated_node = nil + +doc.traverse do |node| + if accumulated_length >= max_length +

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2024-11-18 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. f5a5cfc94be4aa89137401a308a7716effa640f5 Provide a truncated view of recent diaries -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5121/files/e13e04e4bcaa5749f543b5e5d15bc96b8d69f808..f5a5cfc94be4aa89137401a308a7716effa640f5 You are re

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2024-11-18 Thread David Tsiklauri via rails-dev
PR was updated. Paragraph truncation was removed. Max length of the diary entry in the list was changed to 2000. Images now take size of 1000 character. Additional parsing to the RichText was removed and now HTML is directly sanitized and marked as safe. -- Reply to this email directly or vi

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-11-18 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -280,8 +280,10 @@ resource :profile, :only => [:edit, :update] # friendships - match "/user/:display_name/make_friend" => "friendships#make_friend", :via => [:get, :post], :as => "make_friend" - match "/user/:display_name/remove_friend" => "

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2024-11-18 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -2,7 +2,7 @@ <%= render :partial => "diary_entry_heading", :object => diary_entry, :as => "diary_entry" %> -<%= diary_entry.body.to_html %> +<%= truncated ? diary_entry.truncated_body(1000).to_html : diary_entry.body.to_html %> Addi

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2024-11-18 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + def truncate_html(html, max_length, empty_tag_length = 500) +doc = Nokogiri::HTML::DocumentFragment.parse(html) +accumulated_length = 0 +truncated_node = nil + +doc.traverse do |node| + if accumulated_length >= max_length +

Re: [openstreetmap/openstreetmap-website] Provide a summary view of recent diaries (PR #5103)

2024-11-14 Thread David Tsiklauri via rails-dev
Closing this PR in favor of #5121 PR -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5103#issuecomment-2475654591 You are receiving this because you are subscribed to this thread. Message ID: _

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-11-14 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -280,8 +280,8 @@ resource :profile, :only => [:edit, :update] # friendships - match "/user/:display_name/make_friend" => "friendships#make_friend", :via => [:get, :post], :as => "make_friend" - match "/user/:display_name/remove_friend" => "f

Re: [openstreetmap/openstreetmap-website] Provide a summary view of recent diaries (PR #5103)

2024-11-13 Thread David Tsiklauri via rails-dev
Closed #5103. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5103#event-15294308158 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-11-13 Thread David Tsiklauri via rails-dev
PR was updated. Now friendship controller and model are refactored to be named as "follow" and also implement standard CRUD architecture using `create` and `destroy`. Old controllers, models, views and tests were removed, and new ones were added with the new names and architecture. -- Reply to

Re: [openstreetmap/openstreetmap-website] Provide a truncated view of recent diaries (PR #5121)

2024-11-13 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + def truncate_html(html, max_length, empty_tag_length = 500) +doc = Nokogiri::HTML::DocumentFragment.parse(html) +accumulated_length = 0 +truncated_node = nil + +doc.traverse do |node| + if accumulated_length >= max_length +

Re: [openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)

2024-11-13 Thread David Tsiklauri via rails-dev
> And if there's more than say 3, write something like > > > UserA > > UserB... > > UserC > > and 2 more users @AntonKhorev do you mean to make this kind of truncation in the tooltip? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-we

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-11-13 Thread David Tsiklauri via rails-dev
@nertc pushed 2 commits. aaffdaadbf13fff043f9171e815161a079014b11 Modify the way Friends are added 02bede750de8a388d0ef378e2c2c583bfba1ca4a Refactor friendships controller and model -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5261/files/8393857518195d145a

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 older/newer links in front of diary, comment, issue, block pages (PR #5262)

2024-11-06 Thread David Tsiklauri via rails-dev
@nertc approved this pull request. Tested and works perfectly. Every occurrence of "shared/pagination" has its own pair on top of the page. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5262#pullrequestreview-2418102474 You a

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

Re: [openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

2024-10-29 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -0,0 +1,6 @@ +$(document).ready(function () { + $(".language-change-trigger").on("change", function () { Code was updated according to the recommendation. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openst

Re: [openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

2024-10-28 Thread David Tsiklauri via rails-dev
This PR was updated according to the suggestion of @AntonKhorev. As described in the `CONTRIBUTING.md` only updated language config was `en`: > ## i18n > > If you make a change that involve the locale files (in `config/locales`) then > please only submit changes to the `en.yml` file. The other fi

Re: [openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

2024-10-28 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 25fd157b9ce6e7945bf5d5e9871d04388e9e5f19 Add locale selector -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5201/files/80708ff796458168ebb1060bcb16e07ecf2e6fb5..25fd157b9ce6e7945bf5d5e9871d04388e9e5f19 You are receiving this because you

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-24 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -280,8 +280,8 @@ resource :profile, :only => [:edit, :update] # friendships - match "/user/:display_name/make_friend" => "friendships#make_friend", :via => [:get, :post], :as => "make_friend" - match "/user/:display_name/remove_friend" => "f

Re: [openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -60,6 +61,13 @@ <%= link_to t(".reports_count", :count => issue.reports_count), issue %> <%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %> <%= link_to issue.reported_user.display_name

Re: [openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -60,6 +61,13 @@ <%= link_to t(".reports_count", :count => issue.reports_count), issue %> <%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %> <%= link_to issue.reported_user.display_name

Re: [openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -60,6 +61,13 @@ <%= link_to t(".reports_count", :count => issue.reports_count), issue %> <%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %> <%= link_to issue.reported_user.display_name

Re: [openstreetmap/openstreetmap-website] Map Data checkbox: perhaps use toggle slider instead (PR #5009)

2024-10-23 Thread David Tsiklauri via rails-dev
If there are no other change requests for this PR, I'll create a new PR for the [leaflet-osm](https://github.com/openstreetmap/leaflet-osm) to merge changes done in the `vendor/assets/leaflet/leaflet.osm.js`. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap

Re: [openstreetmap/openstreetmap-website] Map Data checkbox: perhaps use toggle slider instead (PR #5009)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -86,6 +86,16 @@ OSM.initializeDataLayer = function (map) { if (dataLoader) dataLoader.abort(); +let spanLoading = $("#layers-data-loading"); + +if (!spanLoading.length) { + spanLoading = $("") +.attr("id", "layers-data-loa

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > -remove_friend: - heading: "Unfriend %{user}?" - button: "Unfriend" - success: "%{name} was removed from your friends." - not_a_friend: "%{name} is not one of your friends." +follow_user: + heading: "Do you want to follow

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -27,19 +27,19 @@ - <%= t ".my friends" %> + <%= t ".followed users" %> I agree with you. Wording was changed from `followed users` to `followings`. I was also thinking about it. `followed users` is more understandable, but `f

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > - heading: "Add %{user} as a friend?" - button: "Add as friend" - success: "%{name} is now your friend!" - failed: "Sorry, failed to add %{name} as a friend." - already_a_friend: "You are already friends with %{name}." - limi

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -1603,12 +1603,12 @@ en: footer_html: "You can also read the message at %{readurl} and you can send a message to the author at %{replyurl}" friendship_notification: hi: "Hi %{to_user}," - subject: "[OpenStreetMap] %{user} added

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > - heading: "Unfriend %{user}?" - button: "Unfriend" - success: "%{name} was removed from your friends." - not_a_friend: "%{name} is not one of your friends." +follow_user: + heading: "Do you want to follow %{user}?" + but

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > - <%= render :partial => "contact", :collection => friends, :locals => { :type => "friend" } %> + <%= render :partial => "contact", :collection => friends, :locals => { :type => "followed user" } %> `fo

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -91,7 +91,7 @@ en: support_url: Support URL allow_read_prefs: read their user preferences allow_write_prefs: modify their user preferences -allow_write_diary: create diary entries, comments and make friends +

Re: [openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

2024-10-23 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + <% Locale.available + .map { |locale| Language.find_by(:code => locale.to_s) } + .select { |locale| locale } + .sort_by { |locale| locale[:english_name] } + .each do |language| %> +><%

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-22 Thread David Tsiklauri via rails-dev
Thank you for the review. This PR was updated according to recommendations. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5261#issuecomment-2428445343 You are receiving this because you are subscribed to this thread. Message ID:

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-22 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -280,8 +280,8 @@ resource :profile, :only => [:edit, :update] # friendships - match "/user/:display_name/make_friend" => "friendships#make_friend", :via => [:get, :post], :as => "make_friend" - match "/user/:display_name/remove_friend" => "f

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-22 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 8393857518195d145a5f1e8252b939f731cff25c Modify the way Friends are added -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5261/files/e1a1b87211fde02664d5a16a970a98c6df5d061a..8393857518195d145a5f1e8252b939f731cff25c You are receiving thi

Re: [openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

2024-10-17 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 80708ff796458168ebb1060bcb16e07ecf2e6fb5 Add locale selector -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5201/files/41cb49e6a084607132ed9818e9139925f924a19b..80708ff796458168ebb1060bcb16e07ecf2e6fb5 You are receiving this because you

Re: [openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

2024-10-17 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 41cb49e6a084607132ed9818e9139925f924a19b Add locale selector -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5201/files/f5754b8cd7e4c60add5abc9b7f7b247a1b77..41cb49e6a084607132ed9818e9139925f924a19b You are receiving this because you

[openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-15 Thread David Tsiklauri via rails-dev
This PR addresses "Modify the way 'Friends' are added" issue mentioned in https://github.com/openstreetmap/openstreetmap-website/issues/3310 This PR replaces all occurrences of "friends" to "followers", including texts, tests and URLs. This PR was not broken down to smaller pieces to maintain c

Re: [openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

2024-10-07 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -0,0 +1,12 @@ + + + + + <% unless disabled %> + + <% Language.order(:english_name).each do |language| %> +><%= language.name %> If there was not a cookie, none of the options would be preselected. But for the better UX this

Re: [openstreetmap/openstreetmap-website] Add locale selector (PR #5201)

2024-10-07 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -78,6 +78,15 @@ <%= link_to t("layouts.about"), about_path, :class => "dropdown-item" %> + +<% if current_user && current_user.id %> + <%= link_to(preferences_path, :class => "nav-link text-secondary

  1   2   >