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

2024-09-16 Thread Anton Khorev via rails-dev
> Adding icon to the sprite was solely for the accordance with the current > state and practices of the project. Currently we use both `` and css sprite maps. One problem with sprite maps is that it's more difficult to control the colors of the icons. app/assets/images/sprite.svg is mainly used

Re: [openstreetmap/openstreetmap-website] Add the ability to redact changeset comments (Issue #5219)

2024-09-16 Thread Anton Khorev via rails-dev
- changeset comment tags: duplicate of #470 - changeset discussion comments: already implemented -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5219#issuecomment-2352641044 You are receiving this because you are subscribed to th

Re: [openstreetmap/openstreetmap-website] Add the ability to redact changeset comments (Issue #5219)

2024-09-16 Thread Anton Khorev via rails-dev
Closed #5219 as not planned. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5219#event-14271220988 You are receiving this because you are subscribed to this thread. Message ID: ___ r

Re: [openstreetmap/openstreetmap-website] Replace creation_ip with creation_address (PR #5218)

2024-09-16 Thread Anton Khorev via rails-dev
Merged, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5218#issuecomment-2352794799 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev

Re: [openstreetmap/openstreetmap-website] Replace creation_ip with creation_address (PR #5218)

2024-09-16 Thread Anton Khorev via rails-dev
Merged #5218 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5218#event-14272241868 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

Re: [openstreetmap/openstreetmap-website] Order changeset elements for consistent pagination (PR #5209)

2024-09-16 Thread Anton Khorev via rails-dev
This was suggested in https://github.com/openstreetmap/openstreetmap-website/pull/4571#issuecomment-1994856482 but I haven't done it because we don't have appropriate indexes. This requires reading all changeset node/ways/relations and sorting them. We also have counts of changeset elements but

Re: [openstreetmap/openstreetmap-website] Remove classic pagination (PR #5205)

2024-09-16 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 8acfc36fcb94abec9bcbce4152b830f63943a0be Remove classic pagination -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5205/files/2637e79ddbdd4f4e9e04e7b6175c3ff16f2e9ca6..8acfc36fcb94abec9bcbce4152b830f63943a0be You are receiving this

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

2024-09-16 Thread Anton Khorev via rails-dev
When I thought how to do truncated diary entries I first considered doing it server-side. I already go through markdown parse trees in the richtext library to get images and descriptions for Open Graph tags. I can probably extend that to generate truncated entries. Then I thought that ultimatel

Re: [openstreetmap/openstreetmap-website] Drop creation_ip column (PR #5212)

2024-09-17 Thread Anton Khorev via rails-dev
Merged #5212 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5212#event-14290646338 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

Re: [openstreetmap/openstreetmap-website] Drop creation_ip column (PR #5212)

2024-09-17 Thread Anton Khorev via rails-dev
Merged, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5212#issuecomment-2355636900 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev

Re: [openstreetmap/openstreetmap-website] Remove unnecessary comma from several translatable messages (PR #5220)

2024-09-17 Thread Anton Khorev via rails-dev
That comma is from ages ago https://github.com/openstreetmap/openstreetmap-website/commit/e0e849c91c66232c986a54da4a848d77f29bcb5b -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5220#issuecomment-2356278081 You are receiving this

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-15 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > <% else %> + <%= form_tag(url_for("controller" => "notes", "action" => "index"), "method" => :get, "data" => { "turbo" => true, "turbo-frame" => "pagination", "turbo-action" => "advance" }) do %> + + +<%= label_tag :status, t("

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-15 Thread Anton Khorev via rails-dev
About the date pickers: I wanted to add them to our standard pagination because we already have date indexes. Then we wouldn't need them here, specifically in this notes filer. But this plan haven't worked so far because: - I wanted to first add a simpler thing to the standard pagination, namel

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

2024-10-15 Thread Anton Khorev via rails-dev
@AntonKhorev 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 sorting and filtering functionality to user notes page (PR #5255)

2024-10-15 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > <% else %> + <%= form_tag(url_for("controller" => "notes", "action" => "index"), "method" => :get, "data" => { "turbo" => true, "turbo-frame" => "pagination", "turbo-action" => "advance" }) do %> + + +<%= label_tag :status, t("

Re: [openstreetmap/openstreetmap-website] Remove Nominatim prefixes mention in contributors guide (PR #5260)

2024-10-15 Thread Anton Khorev via rails-dev
Merged #5260 into master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5260#event-14655708047 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-

Re: [openstreetmap/openstreetmap-website] Remove Nominatim prefixes mention in contributors guide (PR #5260)

2024-10-15 Thread Anton Khorev via rails-dev
Merged, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5260#issuecomment-2413622660 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev

Re: [openstreetmap/openstreetmap-website] Share button should preserve the node/way/relation id when creating the URL (Issue #5252)

2024-10-15 Thread Anton Khorev via rails-dev
How do you want the html embed to behave in this case? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5252#issuecomment-2413995449 You are receiving this because you are subscribed to this thread. Message ID: _

[openstreetmap/openstreetmap-website] Add older/newer links in front of diary, comment, issue, block pages (PR #5262)

2024-10-15 Thread Anton Khorev via rails-dev
![image](https://github.com/user-attachments/assets/1753052d-07d2-4f4a-8b11-092b327b73f3) You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5262 -- Commit Summary -- * Add older/newer links in front of diary, comment,

Re: [openstreetmap/openstreetmap-website] Add older/newer links in front of diary, comment, issue, block pages (PR #5262)

2024-10-15 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 74be3f8b7c4fa192b8f08dcc6d11d88afbcf3c1a Add older/newer links in front of diary, comment, issue, block pages -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5262/files/53fb10f9cc28a7017e423baa5a09b5376ea2ed47..74be3f8b7c4fa192b8f

Re: [openstreetmap/openstreetmap-website] Add older/newer links in front of diary, comment, issue, block pages (PR #5262)

2024-10-15 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 0b053314fd7f427f2b5c8a0c35b583bda43ce0f3 Add older/newer links in front of diary, comment, issue, block pages -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5262/files/74be3f8b7c4fa192b8f08dcc6d11d88afbcf3c1a..0b053314fd7f427f2b5

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

2024-10-07 Thread Anton Khorev via rails-dev
Looks like the languages you get from `Language` don't quite match the ones expected by `Locale.list`. For example, we have `pt-BR` and `pt` in `Language` but `pt` and `pt-PT` in translations. As a result you can't select European Portuguese. -- Reply to this email directly or view it on GitHu

Re: [openstreetmap/openstreetmap-website] Replace submitted note table colors with created/resolved (PR #5269)

2024-10-18 Thread Anton Khorev via rails-dev
> You say you ignore reopen events but in fact this seems to extend the concept > of submitted/created from who initially opened it to include anybody that > reopens it as well? Are you proposing to treat reopen events exactly like initial open events? That's not what we're currently doing with

Re: [openstreetmap/openstreetmap-website] Replace submitted note table colors with created/resolved (PR #5269)

2024-10-18 Thread Anton Khorev via rails-dev
This is a test only for original open events: > comment.event == "opened" Reopen events are stored as `"reopened"`. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5269#issuecomment-2422613954 You are receiving this because you a

Re: [openstreetmap/openstreetmap-website] Replace submitted note table colors with created/resolved (PR #5269)

2024-10-19 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 7aeafbd890108734b866df1eaac8ef9b595d5cab Replace submitted note table color with created/resolved -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5269/files/4f4212abd012e1c89b5a5c20ebe5459d7dd80101..7aeafbd890108734b866df1eaac8ef9

Re: [openstreetmap/openstreetmap-website] Replace submitted note table colors with created/resolved (PR #5269)

2024-10-19 Thread Anton Khorev via rails-dev
Alright, let's not think about filtering for now. Changed to look only at the last close event. I also wanted the "commented" indication not to be misleading. It includes more than commenting and this change stretches it further by including non-last close events. So I removed the claim that no

Re: [openstreetmap/openstreetmap-website] Remove classic pagination (PR #5205)

2024-10-16 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 45bbc3bbc6c615cb2509e08e36de018fabf987fe Remove classic pagination -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5205/files/1c414a44d49d43389b814e9ed1b3de4dab9f8135..45bbc3bbc6c615cb2509e08e36de018fabf987fe You are receiving this

Re: [openstreetmap/openstreetmap-website] Remove classic pagination (PR #5205)

2024-10-16 Thread Anton Khorev via rails-dev
> These are good reasons why the paginator doesn't have to be cursor-based, but > they aren't reasons why it can't be cursor-based. So I think the > simplification of only having one type of pagination is worthwhile. Those were reasons for why this place is different, why it might be feasible n

Re: [openstreetmap/openstreetmap-website] Share button should preserve the node/way/relation id when creating the URL (Issue #5252)

2024-10-16 Thread Anton Khorev via rails-dev
> > How do you want the html embed to behave in this case? > > Naturally it should look just like the picture I posted. Naturally it can't look just like that because there's no header and no sidebars. The question is do you want the sidebar with the element info or do you just want it rendered

Re: [openstreetmap/openstreetmap-website] Replace submitted note table colors with created/resolved (PR #5269)

2024-10-18 Thread Anton Khorev via rails-dev
Another option is to ignore all close events other than the last one, that's symmetrical to ignoring reopen events. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5269#issuecomment-2422639257 You are receiving this because you ar

Re: [openstreetmap/openstreetmap-website] Share button should preserve the node/way/relation id when creating the URL (Issue #5252)

2024-10-19 Thread Anton Khorev via rails-dev
We could have links to specific versions of elements that don't change but even the actual osm website can't show them currently. There is a pull request for nodes though #4930. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5

Re: [openstreetmap/openstreetmap-website] Replace submitted note table colors with created/resolved (PR #5269)

2024-10-19 Thread Anton Khorev via rails-dev
There are some drawbacks in looking only at the last close event. #5255 tried to do filtering by interaction type but the db queries are ugly. To optimize them we could have a users x notes table where we store among other things interaction flags. When a user closed a note, we set a closed flag

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-10-21 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,27 @@ +// Opening pop-ups with share URL +function openShareUrl(url, initialWidth = 640, initialHeight = 480) { + if (typeof url !== "string" || !url.startsWith("http")) { +console.error("Invalid URL"); // Consider removing this line

[openstreetmap/openstreetmap-website] Don't show older/newer buttons if all items fit on one page (PR #5276)

2024-10-21 Thread Anton Khorev via rails-dev
You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5276 -- Commit Summary -- * Don't show older/newer buttons if all items fit on one page -- File Changes -- M app/views/shared/_pagination.html.erb (4) -- Patch

[openstreetmap/openstreetmap-website] Remove "User's Diary" from diary entry og:title (PR #5274)

2024-10-20 Thread Anton Khorev via rails-dev
You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5274 -- Commit Summary -- * Remove "User's Diary" from diary entry og:title -- File Changes -- M app/controllers/diary_entries_controller.rb (1) M app/helper

Re: [openstreetmap/openstreetmap-website] Always do reverse geocoding when routing (PR #5064)

2024-10-21 Thread Anton Khorev via rails-dev
Updated pull request description. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5064#issuecomment-2427309130 You are receiving this because you are subscribed to this thread. Message ID:

[openstreetmap/openstreetmap-website] Use system font on error pages (PR #5277)

2024-10-21 Thread Anton Khorev via rails-dev
I opened #5131 and put a number of changes to error pages to see which of them are acceptable. The discussion there however has been about making more changes. I guess that means nobody objects to the ones I made and we can have them merged. This PR changes the font of error pages to a default

[openstreetmap/openstreetmap-website] Display old node versions on map view (PR #5278)

2024-10-21 Thread Anton Khorev via rails-dev
Shows node versions like in #4930 but without complications https://github.com/openstreetmap/openstreetmap-website/pull/4930#issuecomment-2198493197 and without saving api calls. ![image](https://github.com/user-attachments/assets/b11c6255-d5ab-440d-ad7a-f1f446233d97) You can view, comment on,

Re: [openstreetmap/openstreetmap-website] Use system font on error pages (PR #5277)

2024-10-21 Thread Anton Khorev via rails-dev
> My PR hasn't been merged in two months so it must be good is an interesting > take. How else can I get changes from that PR to be discussed instead of being asked to make more changes like: > Is there a reason not to use bootstrap here? Yes https://github.com/openstreetmap/openstreetmap-web

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-17 Thread Anton Khorev via rails-dev
> As for the next steps, I’m not sure whether it’s better to get this PR merged > as is and refactor later when the notes move to standard pagination, or if we > should address the pagination issue on user note pages first and then > refactor this PR accordingly. You can make a pull request tha

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-17 Thread Anton Khorev via rails-dev
> On a side note, I’ve managed to implement sortable columns on a table UI end > for created_at and updated_at locally I looked again at why similar things were rejected in the past like #1656 and there doesn't seem to be any clear reason. -- Reply to this email directly or view it on GitHub:

[openstreetmap/openstreetmap-website] Replace submitted note table colors with created/resolved (PR #5269)

2024-10-17 Thread Anton Khorev via rails-dev
Instead of *submitted* and *commented* note colors switch to *created*, *resolved* and *commented*. Reasons: - Close actions were colored as *commented* even if notes were closed without any comments. Now they are going to be colored as *resolved*. - *Submitted* is not a term we use for notes, w

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -6,41 +7,69 @@ :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-body") %> <% end %> -<% if @notes.empty? %> - <%= t ".no_notes" %> +<%= form_tag(url_for("controller" => "notes", "action" => "index"), "me

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-17 Thread Anton Khorev via rails-dev
Besides the [double-join db query](https://github.com/openstreetmap/openstreetmap-website/pull/5255#discussion_r1801064970), there's couple more issues with the interaction type: ["blue on blue" colors](https://github.com/openstreetmap/openstreetmap-website/pull/4700#issuecomment-2221682594) an

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

2024-10-17 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,16 @@ + + + + + <% unless disabled %> + + <% Locale.available + .map { |locale| Language.find_by(:code => locale.to_s) } You'll get a ton of db queries: ``` Language Load (0.2ms) SELECT "languages".* F

Re: [openstreetmap/openstreetmap-website] Display old node versions on map view (PR #5278)

2024-10-22 Thread Anton Khorev via rails-dev
> I believe similar changes to remaining OSM.OldBrowse() occurrences will > enable displaying old ways / relations versions? :-) As soon as https://github.com/openstreetmap/openstreetmap-website/pull/4930#issuecomment-2198793487 is done. > Q: I found one strange behavior with nodes / ways / re

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-10-22 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,27 @@ +// Opening pop-ups with share URL +function openShareUrl(url, initialWidth = 640, initialHeight = 480) { + if (typeof url !== "string" || !url.startsWith("http")) { +console.error("Invalid URL"); // Consider removing this line

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-10-22 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,27 @@ +// Opening pop-ups with share URL +function openShareUrl(url, initialWidth = 640, initialHeight = 480) { + if (typeof url !== "string" || !url.startsWith("http")) { +console.error("Invalid URL"); // Consider removing this line

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

2024-10-25 Thread Anton Khorev via rails-dev
@AntonKhorev 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"

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-24 Thread Anton Khorev via rails-dev
> Adding filters one by one would significantly increase the time required Time for what? For PR review? > and might leave the feature feeling incomplete. Are you sure? Is it complete with exactly the filters you added and not some other filters? -- Reply to this email directly or view it on

Re: [openstreetmap/openstreetmap-website] Note subscriptions (PR #5283)

2024-10-24 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 6 commits. 51187ec2e0bdbe0ae728f4eb37250c4394e376f4 Subscribe users when they interact with notes d67bca8a39a12876c2ab265b0dfdcbf61394c652 Backfill note subscriptions f91f74db2e7fc206ff8a7f349e33f34a1f0871a4 Send notifications to note subscribers instead of commenters fc9e

[openstreetmap/openstreetmap-website] Note subscriptions db table (PR #5284)

2024-10-24 Thread Anton Khorev via rails-dev
Part one of #5283. Creates the note subscription table and starts adding subscriptions for anyone who comments a note. These subscriptions are not yet used for anything, email notifications still go to all note commenters. You can view, comment on, or merge this pull request online at: https:/

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-24 Thread Anton Khorev via rails-dev
> 3. When you mentioned "blue on blue" colors I'm not sure if this is something > I've introduced in this PR Obviously you didn't introduce it. That comment was made in July. > since when I toggle dark mode on my end everything is looking fine. Check it when the note is colored as "submitted".

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-24 Thread Anton Khorev via rails-dev
> Yes, the goal was to implement the filters that were most commonly requested > and improve the feature based on that feedback. Where are these requests? For example #832 wants status filter but doesn't say anything about date ranges. Why would a status filter be incomplete without a date rang

Re: [openstreetmap/openstreetmap-website] Note subscriptions (PR #5283)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 7 commits. e60511f711f36dd87cc8d49cedaec97241db6dbe Create note subscription table and model 9fb8291c9cca0aa97af992c20bd9a908f1a31b3d Subscribe users when they interact with notes 26c426b968f2e80f9845300458d5c15b85a158d6 Backfill note subscriptions cba78ed1105c056a38a1232a

Re: [openstreetmap/openstreetmap-website] Note subscriptions db table (PR #5284)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 2 commits. 001fed4fd7d321a079568f5de9479adfbff21778 Create note subscription table and model 2d7e0a397a1b2dbed74f40439c1305b1b48a063e Subscribe users when they interact with notes -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5284/files

Re: [openstreetmap/openstreetmap-website] Display old node versions on map view (PR #5278)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 0c237c11d2c4b19d1a14324adbb7ca275c554816 Display old node versions on map view -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5278/files/55794cf4cbe16d0b359da647e1a53bdd390a53dd..0c237c11d2c4b19d1a14324adbb7ca275c554816 You are re

Re: [openstreetmap/openstreetmap-website] Use system font on error pages (PR #5277)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. b3f930095408c7678cbd000f6f125463ed462f02 Use system font on error pages -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5277/files/733e160872dfe92230645eb6e7e8f1cf9d221597..b3f930095408c7678cbd000f6f125463ed462f02 You are receiving

Re: [openstreetmap/openstreetmap-website] Remove classic pagination (PR #5205)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. cc319be3414e2d2b94cb10c871cc66b541d87a08 Remove classic pagination -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5205/files/45bbc3bbc6c615cb2509e08e36de018fabf987fe..cc319be3414e2d2b94cb10c871cc66b541d87a08 You are receiving this

Re: [openstreetmap/openstreetmap-website] Replace submitted note table colors with created/resolved (PR #5269)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 837aeea405129719503141350d8b669c03cbd4a3 Replace submitted note table color with created/resolved -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5269/files/7aeafbd890108734b866df1eaac8ef9b595d5cab..837aeea405129719503141350d8b669

Re: [openstreetmap/openstreetmap-website] Note subscriptions db table (PR #5284)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -401,6 +401,8 @@ def add_comment(note, text, event, notify: true) note.comments.map(&:author).uniq.each do |user| UserMailer.note_comment_notification(comment, user).deliver_later if notify && user && user != current_user && user

[openstreetmap/openstreetmap-website] Use resourceful routes for granting/revoking user roles (PR #5293)

2024-10-27 Thread Anton Khorev via rails-dev
Replaces: - `post grant_role_path` with `put user_role_path` - `post revoke_role_path` with `delete user_role_path` You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5293 -- Commit Summary -- * Use resourceful routes f

Re: [openstreetmap/openstreetmap-website] Use resourceful routes for granting/revoking user roles (PR #5293)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. b24d52d5ca30e081ec799880bee6bc32616ad8fa Use resourceful routes for granting/revoking user roles -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5293/files/19da04fa8eb0ce3d665123048f6cb1f62058c369..b24d52d5ca30e081ec799880bee6bc32

Re: [openstreetmap/openstreetmap-website] Note subscriptions (PR #5283)

2024-10-25 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. 6fbca51ccdc1df0ecf32ca0892d2f1762d7811e7 Add subscribe/unsubscribe buttons to note pages -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5283/files/fe7031a6448c291dde482f4b5bc98a855ab2449a..6fbca51ccdc1df0ecf32ca0892d2f1762d7811e7

[openstreetmap/openstreetmap-website] Decrease padding between close button and inputs in directions form (PR #5288)

2024-10-25 Thread Anton Khorev via rails-dev
That space on the top of direction forms is too wasteful. Before/after: ![image](https://github.com/user-attachments/assets/fc1d86e6-4cb4-441a-a305-0d0a792053ef) ![image](https://github.com/user-attachments/assets/d1cbe84f-346d-4046-bace-81a430e1a35d) You can view, comment on, or merge this pul

Re: [openstreetmap/openstreetmap-website] Note subscriptions (PR #5283)

2024-10-25 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. f79120ac3feefa0546b9c2f2b8cded41ddd13e55 Add subscribe/unsubscribe buttons to note pages -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5283/files/df53ca081757f8a2f6e3945df43d6087941848eb..f79120ac3feefa0546b9c2f2b8cded41ddd13e55

[openstreetmap/openstreetmap-website] Remove callback from initialize() in note js controller (PR #5289)

2024-10-25 Thread Anton Khorev via rails-dev
https://github.com/openstreetmap/openstreetmap-website/commit/a796c41881c26e6da8828a71dbfb533613e5a83f added a callback to `function initialize()` in `note.js`. It's called at the very end of the function. Not scheduled in some event, not skipped by early termination, nothing runs after it. Pass

Re: [openstreetmap/openstreetmap-website] Directions need to say "go straight onto road B" (Issue #5280)

2024-10-23 Thread Anton Khorev via rails-dev
This is the Graphhopper instructions for the query: ![image](https://github.com/user-attachments/assets/8b9875cb-379e-4a6c-a51f-5f02c9097540) None of the engines mentions "19" in their instructions. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstree

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

2024-10-23 Thread Anton Khorev via rails-dev
@AntonKhorev 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"

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

2024-10-23 Thread Anton Khorev via rails-dev
@AntonKhorev 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] Add user block api call (PR #4301)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -12,5 +15,33 @@ def show rescue ActiveRecord::RecordNotFound raise OSM::APINotFoundError end + +def create + raise OSM::APIBadUserInput, "No user was given" unless params[:user] + + user = User.visible.find_by(:id =

Re: [openstreetmap/openstreetmap-website] Note subscriptions db table (PR #5284)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > +end + end + assert_response :success + js = ActiveSupport::JSON.decode(@response.body) + assert_not_nil js + assert_equal "Feature", js["type"] + assert_equal "Point", js["geometry"]["type"] + assert_equal

Re: [openstreetmap/openstreetmap-website] Note subscriptions db table (PR #5284)

2024-10-27 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -401,6 +401,8 @@ def add_comment(note, text, event, notify: true) note.comments.map(&:author).uniq.each do |user| UserMailer.note_comment_notification(comment, user).deliver_later if notify && user && user != current_user && user

[openstreetmap/openstreetmap-website] Don't update deactivates_at if block was already viewed (PR #5312)

2024-11-11 Thread Anton Khorev via rails-dev
When a blocked user visits their block page, its deactivation time is recorded. Problem is this only needs to happen if there's no deactivation time set. If it's already set, it should be kept at what it is. The possible bug is that if the user visits their block page after the block is lifted,

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] Provide a truncated view of recent diaries (PR #5121)

2024-11-11 Thread Anton Khorev via rails-dev
@AntonKhorev 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 %>

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

2024-11-11 Thread Anton Khorev via rails-dev
@AntonKhorev 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] 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-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] Show "reporting user" on "issues" screen (PR #4990)

2024-11-11 Thread Anton Khorev via rails-dev
I don't think tooltips were a good idea. You can't interact with the usernames they show. And truncation works fine for individual names, but then you'd have to do it inside the tooltip too. Do you want to make html tooltips? And then there's Turbo cleanup. ![image](https://github.com/user-att

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

2024-11-11 Thread Anton Khorev via rails-dev
I wouldn't try to do a comma-separated list > UserA, UserBB, UserC I'd write them each on a new line and add truncation > UserA > UserB... > UserC And if there's more than say 3, write something like > UserA > UserB... > UserC > and 2 more users -- Reply to t

Re: [openstreetmap/openstreetmap-website] Add the ability to redact changeset comments (Issue #5219)

2024-11-09 Thread Anton Khorev via rails-dev
Actually this issue isn't exactly a duplicate of #470. #470 asks for the ability of users to edit tags of their own changesets. And this issue here asks for the ability of moderators to delete tags of any changesets. -- Reply to this email directly or view it on GitHub: https://github.com/open

Re: [openstreetmap/openstreetmap-website] Add the ability to redact changeset comments (Issue #5219)

2024-11-09 Thread Anton Khorev via rails-dev
Reopened #5219. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5219#event-15237817121 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mail

Re: [openstreetmap/openstreetmap-website] Note subscriptions (PR #5283)

2024-10-25 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 7 commits. 0b9c7c13a1dad7b1528438150f0a94720b2f4323 Create note subscription table and model 954e7b31e1ec0f47ad7000bf2a9a32af9206abd1 Subscribe users when they interact with notes 9bbab0028a9cb40c373af3f97c68ef2f772258ed Backfill note subscriptions 1fba9ddd0dd1f709762c67a3

Re: [openstreetmap/openstreetmap-website] Note subscriptions (PR #5283)

2024-10-25 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. df53ca081757f8a2f6e3945df43d6087941848eb Add subscribe/unsubscribe buttons to note pages -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5283/files/6fbca51ccdc1df0ecf32ca0892d2f1762d7811e7..df53ca081757f8a2f6e3945df43d6087941848eb

[openstreetmap/openstreetmap-website] Note subscriptions API (PR #5314)

2024-11-12 Thread Anton Khorev via rails-dev
Part 4 of #5283 Adds API endpoints to subscribe/unsubscribe from a note. This is like the changeset subscribe/unsubscribe https://wiki.openstreetmap.org/wiki/API_v0.6#Subscribe:_POST_/api/0.6/changeset/#id/subscribe but since we like resourceful routes, instead of `POST .../subscribe` and `POST

Re: [openstreetmap/openstreetmap-website] Don't update deactivates_at if block was already viewed (PR #5312)

2024-11-12 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 1 commit. ff0569829f81f868e054e6430eaf11bf779d1213 Don't update deactivates_at if block was already viewed -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5312/files/f4208862bc1841dc18aa55ce85acad349b6f2b43..ff0569829f81f868e054e6430eaf11bf

Re: [openstreetmap/openstreetmap-website] Don't update deactivates_at if block was already viewed (PR #5312)

2024-11-12 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + get user_block_path(block) + assert_response :success + block.reload + assert_not block.needs_view + assert_equal Time.now.utc - 1.hour, block.deactivates_at +end + end + + ## + # test clearing needs_view by showing

Re: [openstreetmap/openstreetmap-website] Note subscriptions (PR #5283)

2024-11-12 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 3 commits. 3ecf7943b36836b9f0337aa9d7c8f48992293ae8 Add create note subscription api endpoint bc8c005d6186c56054fc68d8281e67ba8efb76cc Add destroy note subscription api endpoint 98a287457e6742a9e625f66b7acbdb8898304737 Add subscribe/unsubscribe buttons to note pages --

[openstreetmap/openstreetmap-website] Remove unused timer from new note js controller (PR #5316)

2024-11-13 Thread Anton Khorev via rails-dev
https://github.com/openstreetmap/openstreetmap-website/commit/51dcf86f40200bf4728097868f45aa2fe12968f3 added the "removenote" timer. Its use was removed in https://github.com/openstreetmap/openstreetmap-website/commit/d380ce79aabcd98ade3eabe8f982e516311f6aee but the `stopTime` cleanup stuck. You

[openstreetmap/openstreetmap-website] Css spinner delay (PR #5315)

2024-11-13 Thread Anton Khorev via rails-dev
Similarly to #5307, we can avoid scheduling/unscheduling js events to show spinners in the richtext preview #5311 and the sidebar loader: ![image](https://github.com/user-attachments/assets/238f7ea7-f2e1-45c7-8ac4-e6f42ac3c2f0) There's a delay to avoid blinking on fast loads, that delay can be

[openstreetmap/openstreetmap-website] Show "node also part of ways" as nested lists on way pages (PR #5317)

2024-11-13 Thread Anton Khorev via rails-dev
Before: ![image](https://github.com/user-attachments/assets/f45776e2-ad93-42f5-bde2-e2a6acd5880c) After: ![image](https://github.com/user-attachments/assets/751e77eb-91d1-45bc-b8e0-30191278d8d4) You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/op

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

2024-11-08 Thread Anton Khorev via rails-dev
> The only downside of the current solution is that there will be only those languages shown, which have shared.language_selector.language key. Those that have translations that are maintained, so not much of a downside. I also had a more defensive version of that key with `language: THIS LANGU

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

2024-09-23 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -76,6 +85,15 @@ <%= link_to t("layouts.copyright"), copyright_path, :class => "dropdown-item" %> <%= link_to t("layouts.help"), help_path, :class => "dropdown-item" %> <%= link_to t("layouts.about"), about_path,

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-09-21 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -0,0 +1,27 @@ +// Opening pop-ups with share URL +function openShareUrl(url, initialWidth = 640, initialHeight = 480) { + if (typeof url !== "string" || !url.startsWith("http")) { +console.error("Invalid URL"); // Consider removing this line

Re: [openstreetmap/openstreetmap-website] Fixed displacing points specified from context menu (PR #4904)

2024-09-21 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > -geocodeCallback(); - }); + if (endpoint.latlng.distanceTo(L.latLng(json.lat, json.lon)) > 200.0) { +input.val(endpoint.value); + } else { +endpoint.value = json.display_name; +inpu

Re: [openstreetmap/openstreetmap-website] Browse icons as svg (PR #5080)

2024-09-21 Thread Anton Khorev via rails-dev
Some icons before/after in dark mode: ![image](https://github.com/user-attachments/assets/585a077d-b0ea-4f40-8558-29d2ef9165c4) ![image](https://github.com/user-attachments/assets/aa5853b5-e7ca-413f-a521-96b19d366b22) ; ![image](https://github.com/user-attachments/assets/9c12e700-99e5-41ed-be4

Re: [openstreetmap/openstreetmap-website] Browse icons as svg (PR #5080)

2024-09-21 Thread Anton Khorev via rails-dev
I still think it's [easier](https://github.com/openstreetmap/openstreetmap-website/pull/5080#issuecomment-2298987792) to switch to ``s first, then start replacing them with svgs, assuming all of the images have the same size. Hopefully we can avoid random pixel offsets in css. -- Reply to thi

Re: [openstreetmap/openstreetmap-website] Browse icons as svg (PR #5080)

2024-09-21 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -945,6 +945,76 @@ img.trace_image { .node, .way, .relation { margin-left: 25px; } + + .svg_icon { +overflow: hidden; +display: inline-block; +margin-left: -25px; +width: 25px; +height: 18px; +/*rtl:ignore*/ tra

  1   2   3   4   5   6   7   8   9   10   >