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

2025-06-21 Thread Marwin Hochfelsner via rails-dev
hlfan left a comment (openstreetmap/openstreetmap-website#5439) Possible? Definitely, see #6122 as an example. Will that get merged? That's the point I'm more worried about. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#is

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

2025-06-21 Thread Koreller via rails-dev
Koreller left a comment (openstreetmap/openstreetmap-website#5439) @nertc and @AntonKhorev It is possible to add "How Did You Contribute" (HDYC) and "Humanitarian OpenStreetMap Team" (HOT) links ? For example with my profil : https://www.hdyc.neis-one.org/?Koreller and https://tasks.hotosm.org/u

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

2025-06-13 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > +# +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :mes

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

2025-05-23 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#5439) This got too clever with *label of hidden checkbox styled as a button* with consequences for keyboard navigation. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pu

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

2025-05-22 Thread Tom Hughes via rails-dev
@tomhughes pushed 1 commit. 86dd9bfd6beb490a7680fcbee923fcfa0a52639b Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/c410c5704ac3e3649f3e64293b6628e8becee5b8..86dd9bfd6beb490a7680fcbee923fcfa0a52639b You are receiving this be

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

2025-05-22 Thread Tom Hughes via rails-dev
@tomhughes approved this pull request. I pushed a small change to remove `config/i18-js.yml` which had crept back in here during a rebase and to cleanup trailing whitespace in a few files and with that I think this is good to merge - thanks for working on it. -- Reply to this email directly

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

2025-05-22 Thread Tom Hughes via rails-dev
Merged #5439 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#event-1543339 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

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

2025-05-22 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\A(https?://.+|@([a-zA-Z0-9_]+)@([\w\-\.]+))\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\

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

2025-05-22 Thread David Tsiklauri via rails-dev
nertc left a comment (openstreetmap/openstreetmap-website#5439) PR was updated. `master` was merged and conflicts were resolved. Code was changed according to the reviews. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#issu

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

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

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

2025-05-15 Thread Minh Nguyễn via rails-dev
@1ec5 commented on this pull request. > +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\A(https?://.+|@([a-zA-Z0-9_]+)@([\w\-\.]+))\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.

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

2025-05-15 Thread Minh Nguyễn via rails-dev
@1ec5 commented on this pull request. > +# +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :mess

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

2025-05-15 Thread Tom Hughes via rails-dev
@tomhughes commented on this pull request. > +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\A(https?://.+|@([a-zA-Z0-9_]+)@([\w\-\.]+))\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesky => %r{\Ahttps?://(?:www\.)?b

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

2025-05-15 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +# +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :mes

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

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

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

2025-05-15 Thread David Tsiklauri via rails-dev
nertc left a comment (openstreetmap/openstreetmap-website#5439) Last commits from `master` were merged and `Metrics/ClassLength` was changed to 623. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#issuecomment-2883014297 You

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

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

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

2025-05-15 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\._-]+

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

2025-05-15 Thread David Tsiklauri via rails-dev
nertc left a comment (openstreetmap/openstreetmap-website#5439) PR was updated. `master` was merged. All conflicts were resolved. PR was changed according to the suggestions. Only RuboCop error is about the length of the `User` class (this PR added only 2 necessary lines to it). I can change `Met

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

2025-05-15 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5439) You'll need to bump that value for now - we can't take this with failing lint. See https://github.com/openstreetmap/openstreetmap-website/pull/5988#issuecomment-2859279812 and following comments for recent discussion around thi

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

2025-05-15 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:blues

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

2025-05-15 Thread github-actions[bot] via rails-dev
github-actions[bot] left a comment (openstreetmap/openstreetmap-website#5439) 1 Warning :warning: Number of updated lines of code is too large to be in one PR. Perhaps it should be separated into two or more? Gener

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

2025-05-09 Thread David Tsiklauri via rails-dev
nertc left a comment (openstreetmap/openstreetmap-website#5439) @tomhughes sorry for the delay on this PR. Yes, I am currently focused on this one and will push as soon as possible. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull

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

2025-05-09 Thread Tom Hughes via rails-dev
@tomhughes commented on this pull request. > +# +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z},

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

2025-05-09 Thread Minh Nguyễn via rails-dev
@1ec5 commented on this pull request. > +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesk

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

2025-05-09 Thread Minh Nguyễn via rails-dev
@1ec5 commented on this pull request. > +# +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :mess

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

2025-05-09 Thread Tom Hughes via rails-dev
@tomhughes requested changes on this pull request. I think this is almost there so I'd like to get it merged. Can you rebase it please and also give some consideration to the suggestions @1ec5 made about additional sites and also about a more general recognition of mastodon handles? -- Repl

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

2025-03-15 Thread Minh Nguyễn via rails-dev
@1ec5 commented on this pull request. > + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\._-]+)

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

2025-03-15 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5439) That seems to have been some glitch with the tests. I forced a rerun and they passed fine. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#issuecomment-2711

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

2025-03-15 Thread David Tsiklauri via rails-dev
nertc left a comment (openstreetmap/openstreetmap-website#5439) `master` was rebased. Conflicts were resolved. Tests have these errors: `Selenium::WebDriver::Error::UnknownError: Failed to decode response from marionette` `Selenium::WebDriver::Error::NoSuchWindowError: Browsing context has been

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

2025-03-15 Thread Tom Hughes via rails-dev
@tomhughes commented on this pull request. > + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\.

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

2025-03-14 Thread Tom Hughes via rails-dev
@tomhughes commented on this pull request. > + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\.

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

2025-03-13 Thread Minh Nguyễn via rails-dev
@1ec5 commented on this pull request. > + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\._-]+)

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

2025-03-13 Thread David Tsiklauri via rails-dev
nertc left a comment (openstreetmap/openstreetmap-website#5439) PR was updated. `master` was rebased. Conflicts were resolved. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#issuecomment-2721275936 You are receiving this bec

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

2025-03-13 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 4c88ed958a347124a4068568944e1ae422cf5b17 Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/26406e204ea25ef6ff42a2f5e6ff54c7ea9d468b..4c88ed958a347124a4068568944e1ae422cf5b17 You are receiving this becaus

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

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

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

2025-03-10 Thread David Tsiklauri via rails-dev
nertc left a comment (openstreetmap/openstreetmap-website#5439) > That seems to have been some glitch with the tests. I forced a rerun and they > passed fine. I rebased `master` to https://github.com/openstreetmap/openstreetmap-website/pull/5009 and it has the same exact errors. -- Reply to

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil? ? "other" : social_link.parsed[:platform], + :

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :messag

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -10,6 +10,35 @@ $(document).ready(function () { var defaultHomeZoom = 12; var map, marker, deleted_lat, deleted_lon; + if ($("#social_links").length) { +$("#add-social-link").click(function (event) { + event.preventDefault(); + c

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)}, +:facebook => %r{\Ahttps?://(?:www\.)?facebook\.com/([a-zA-Z0-9.

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + URL_PATTERNS = { +:discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)}, +:facebook => %r{\Ahttps?://(?:www\.)?facebook\.com/([a-zA-Z0-9.]+)}, +:github => %r{\Ahttps?://(?:www\.)?github\.com/([a-zA-Z0-9_-]+)}, +:gitlab => %r{\Ah

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -0,0 +1,8 @@ +<% social_links.each do |social_link| %> + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil? ? "oth

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

2025-02-19 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request. > +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\._-]+)} + }.freeze + + NO_USERNAME_PLATFORMS = %w[discord line skype slack].freeze + + def parsed +URL_PATTERNS.each do |platform, pattern| + names = url.match(patt

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -0,0 +1,8 @@ +<% social_links.each do |social_link| %> + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil? ? "oth

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -0,0 +1,8 @@ +<% social_links.each do |social_link| %> + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", `:size => "16"` was added to the `` tag to avoid text jumps. Thanks

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\._-]+)} + }.freeze + + NO_USERNAME_PLATFORMS = %w[discord line skype slack].freeze + + def parsed +URL_PATTERNS.each do |platform, pattern| + names = url.match(pattern) +

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

2025-02-19 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 418929188fbc31a640defff703b102ddbf354afe Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/6d3d9316d353ab824a9046f2c92dc94039fd23b4..418929188fbc31a640defff703b102ddbf354afe You are receiving this becaus

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

2025-02-17 Thread Tom Hughes via rails-dev
@tomhughes commented on this pull request. > @@ -10,6 +10,35 @@ $(document).ready(function () { var defaultHomeZoom = 12; var map, marker, deleted_lat, deleted_lon; + if ($("#social_links").length) { +$("#add-social-link").click(function (event) { + event.preventDefault(); +

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > +:bluesky => %r{\Ahttps?://(?:www\.)?bsky\.app/profile/([a-zA-Z0-9\._-]+)} + }.freeze + + NO_USERNAME_PLATFORMS = %w[discord line skype slack].freeze + + def parsed +URL_PATTERNS.each do |platform, pattern| + names = url.match(patter

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil? ? "other" : social_link.parsed[:platform], +

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + URL_PATTERNS = { +:discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)}, +:facebook => %r{\Ahttps?://(?:www\.)?facebook\.com/([a-zA-Z0-9.]+)}, +:github => %r{\Ahttps?://(?:www\.)?github\.com/([a-zA-Z0-9_-]+)}, +:gitlab =>

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil? ? "other" : social_link.parsed[:platform], +

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,8 @@ +<% social_links.each do |social_link| %> + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil?

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,8 @@ +<% social_links.each do |social_link| %> + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", If all images are of the same size, you can add `:size => "16

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

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

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

2025-02-17 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -0,0 +1,8 @@ +<% social_links.each do |social_link| %> + +<%= image_tag "/assets/social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", Was fixed accordingly, `/assets/` was removed. -- Reply

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)}, +:facebook => %r{\Ahttps?://(?:www\.)?facebook\.com/([a-zA

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

2025-02-17 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :messag

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,8 @@ +<% social_links.each do |social_link| %> + +<%= image_tag "social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil?

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > +# Indexes +# +# index_social_links_on_user_id (user_id) +# +# Foreign Keys +# +# fk_rails_... (user_id => users.id) +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :

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

2025-02-17 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + URL_PATTERNS = { +:discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)}, +:facebook => %r{\Ahttps?://(?:www\.)?facebook\.com/([a-zA-Z0-9.]+)}, +:github => %r{\Ahttps?://(?:www\.)?github\.com/([a-zA-Z0-9_-]+)}, +:gitlab => %r{\Ah

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

2025-02-17 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -0,0 +1,10 @@ +class CreateSocialLinks < ActiveRecord::Migration[7.2] + def change +create_table :social_links do |t| + t.references :user, :null => false, :foreign_key => true + t.string :url I agree with you, was fixed accordingly. -

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

2025-02-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + URL_PATTERNS = { +:discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)}, +:facebook => %r{\Ahttps?://(?:www\.)?facebook\.com/([a-zA-Z0-9.]+)}, +:github => %r{\Ahttps?://(?:www\.)?github\.com/([a-zA-Z0-9_-]+)}, +:gitlab =>

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

2025-02-17 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +# + +class SocialLink < ApplicationRecord + belongs_to :user + + validates :url, :format => { :with => %r{\Ahttps?://.+\z}, :message => :http_parse_error } + + URL_PATTERNS = { +:discord => %r{\Ahttps?://(?:www\.)?discord\.com/users/(\d+)}, +

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

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

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

2025-02-17 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 50b63a40f2c2842c1f802845dd52edaf507a8cc0 Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/9301c3723675c94f70a3c2d66176aa6a5e9c779b..50b63a40f2c2842c1f802845dd52edaf507a8cc0 You are receiving this becaus

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

2025-02-17 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 9301c3723675c94f70a3c2d66176aa6a5e9c779b Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/698c29697dcf468035de2d270c8f0359e30f4609..9301c3723675c94f70a3c2d66176aa6a5e9c779b You are receiving this becaus

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

2025-02-17 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -10,6 +10,35 @@ $(document).ready(function () { var defaultHomeZoom = 12; var map, marker, deleted_lat, deleted_lon; + if ($("#social_links").length) { +$("#add-social-link").click(function (event) { + event.preventDefault(); + c

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

2025-02-15 Thread Tom Hughes via rails-dev
@tomhughes requested changes on this pull request. > @@ -0,0 +1,10 @@ +class CreateSocialLinks < ActiveRecord::Migration[7.2] + def change +create_table :social_links do |t| + t.references :user, :null => false, :foreign_key => true + t.string :url This should have `:null => fals

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

2025-02-14 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -10,6 +10,35 @@ $(document).ready(function () { var defaultHomeZoom = 12; var map, marker, deleted_lat, deleted_lon; + if ($("#social_links").length) { +$("#add-social-link").click(function (event) { + event.preventDefault(); + c

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

2025-02-14 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 75cdfa75197d927b7723c87a8b79606a5b318130 Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/922a34e9903a0f5ec7dde390d9a225895ef8d1ab..75cdfa75197d927b7723c87a8b79606a5b318130 You are receiving this becaus

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

2025-02-13 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request. > @@ -10,6 +10,35 @@ $(document).ready(function () { var defaultHomeZoom = 12; var map, marker, deleted_lat, deleted_lon; + if ($("#social_links").length) { +$("#add-social-link").click(function (event) { + event.preventDefault();

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

2025-02-12 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-02-12 Thread David Tsiklauri via rails-dev
Thanks for the review -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#issuecomment-2653844962 You are receiving this because you are subscribed to this thread. Message ID: ___ rail

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

2025-02-12 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-02-12 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-02-12 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -40,6 +40,21 @@ + Editor of the social links was moved below the description, as, I think, description has higher priority and should be displayed higher in the editor, and also social links are positioned next to the description and,

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

2025-02-12 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > + +<%= image_tag "/assets/social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil? ? "other" : social_link.parsed[:platform], +

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

2025-02-12 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +:mastodon => %r{mastodon\.social/@([a-zA-Z0-9_]+)}, +:medium => %r{medium\.com/@([a-zA-Z0-9_]+)}, +:quora => %r{quora\.com/profile/([a-zA-Z0-9_-]+)}, +:reddit => %r{reddit\.com/user/([a-zA-Z0-9_-]+)}, +:skype => %r{join\.skype\.com/in

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

2025-02-12 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-02-12 Thread David Tsiklauri via rails-dev
PR was updated according to the comments. Also, master was rebased as a base for this branch. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#issuecomment-2653813177 You are receiving this because you are subscribed to this t

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

2025-02-12 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. 411888ca16b5ae3877497dc607b73bffe3fafaed Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/8263827fa86f1b6a3b21919ee8e016ac5d64b6f2..411888ca16b5ae3877497dc607b73bffe3fafaed You are receiving this becaus

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

2025-02-10 Thread Olivia Appleton via rails-dev
> but it will make `social profile links` too colorful and too much attention > grabbing. Is it possible to use CSS monochrome for these? It might not work for all, but it could reduce asset duplication, which would help a bit with caching -- Reply to this email directly or view it on GitHub:

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

2025-02-10 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -231,10 +231,15 @@ <% end %> -<%= @user.description.to_html %> - -<% if current_user and @user.id == current_user.id %> - -<%= link_to t(".edit_profile"), edit_profile_path, :class => "btn btn-outline-primary" %> + + +<%= render "s

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

2025-02-06 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -40,6 +40,21 @@ + What do you think is a good place for it? Should it be between the description and avatar, before the description or the last one? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetma

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

2025-01-31 Thread Anton Khorev via rails-dev
@AntonKhorev 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-31 Thread Anton Khorev via rails-dev
@AntonKhorev 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-31 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + +<%= image_tag "/assets/social_link_icons/#{social_link.parsed[:platform].nil? ? 'other' : social_link.parsed[:platform]}.svg", + :alt => social_link.parsed[:platform].nil? ? "other" : social_link.parsed[:platform], +

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

2025-01-31 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -40,6 +40,21 @@ + Why is the link editor placed between *avatar* and *home location*? If you don't change the order of other things on this page, this place makes the least sense to me. -- Reply to this email directly or view i

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

2025-01-31 Thread Anton Khorev via rails-dev
@AntonKhorev 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 < ApplicationRecor

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

2025-01-31 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > +:mastodon => %r{mastodon\.social/@([a-zA-Z0-9_]+)}, +:medium => %r{medium\.com/@([a-zA-Z0-9_]+)}, +:quora => %r{quora\.com/profile/([a-zA-Z0-9_-]+)}, +:reddit => %r{reddit\.com/user/([a-zA-Z0-9_-]+)}, +:skype => %r{join\.skype\.

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

2025-01-31 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -231,10 +231,15 @@ <% end %> -<%= @user.description.to_html %> - -<% if current_user and @user.id == current_user.id %> - -<%= link_to t(".edit_profile"), edit_profile_path, :class => "btn btn-outline-primary" %> + + +<%= ren

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

2025-01-31 Thread Anton Khorev via rails-dev
@AntonKhorev 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-27 Thread David Tsiklauri via rails-dev
Merge conflict was fixed. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439#issuecomment-2615292764 You are receiving this because you are subscribed to this thread. Message ID: ___

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

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

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

2025-01-26 Thread David Tsiklauri via rails-dev
@nertc pushed 1 commit. dc9d0cb25294d9b69c78e5cade34a9ca4e38ac3e Add social profile links -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5439/files/bfa37a02549d1a5ee3ffdf5b686141bd8fc60a50..dc9d0cb25294d9b69c78e5cade34a9ca4e38ac3e 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 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" %> +

  1   2   >