Re: [openstreetmap/openstreetmap-website] Shorten matching urls in linkify (PR #5844)

2025-03-24 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > @@ -76,11 +76,13 @@ def sanitize(text) end def linkify(text, mode = :urls) - if text.html_safe? -Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow noopener noreferrer")).html_safe - else -Rinku.au

Re: [openstreetmap/openstreetmap-website] Fix "undefined" comment when hiding resolved notes (PR #5842)

2025-03-24 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > +const textarea = content.find("textarea"); +if (textarea.length) { + data.set("text", textarea.val()); +} The API returns the same 400 error if data="" or data.text="". Therefore the change can be simplified to this: ```

Re: [openstreetmap/openstreetmap-website] Add dir="auto" to Markdown content for bidi (PR #5840)

2025-03-24 Thread Nitai Sasson via rails-dev
@NeatNit pushed 1 commit. 2a24d8abe8bf6b049dfe3e5726884a0f4eec0d5b make markdown bidirectional with dir="auto" -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5840/files/618df632c8509e5367ae990494c7418465dd2439..2a24d8abe8bf6b049dfe3e5726884a0f4eec0d5b You are

Re: [openstreetmap/openstreetmap-website] Overhaul markers (PR #5764)

2025-03-24 Thread Marwin Hochfelsner via rails-dev
hlfan left a comment (openstreetmap/openstreetmap-website#5764) I've experimented with joining the arc and the line with a curve so the curvature matches. While this makes insetting the paths more difficult, this can be replaced with a `clip-path`. Instead of a direct join ``` M12.5 41 L1.2664 1

[openstreetmap/openstreetmap-website] Shorten matching urls in linkify (PR #5844)

2025-03-24 Thread Anton Khorev via rails-dev
After looking at #844 and #5780 I think that first we can do something with full osm urls. Before trying to match patterns like `key=value` or `changeset 12345` or `n12345` we need to check them for false positives/negatives among existing comments. And the first to do with urls that makes sense

Re: [openstreetmap/openstreetmap-website] Add dir="auto" to Markdown content for bidi (PR #5840)

2025-03-24 Thread Nitai Sasson via rails-dev
NeatNit left a comment (openstreetmap/openstreetmap-website#5840) I guess I should have mentioned that I did improve handling of `` tags. Ready for your scathing reviews :P -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5840#iss

[openstreetmap/openstreetmap-website] Fix "undefined" comment when hiding resolved notes (PR #5842)

2025-03-24 Thread Anton Khorev via rails-dev
There's no comment textarea on resolved note pages, but pressing *Hide* if you're a moderator still tries to read a value and submit it as a comment. ![image](https://github.com/user-attachments/assets/5d91489d-977e-4e58-a6e5-dd889cb4a6d5) With this PR the value is read only if the textarea is p

Re: [openstreetmap/openstreetmap-website] Move more map layer logic to MapLayers lib to simplify JS (PR #5832)

2025-03-24 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > @@ -3,6 +3,10 @@ def self.full_definitions(layers_filename) YAML.load_file(Rails.root.join(layers_filename)) .reject { |layer| layer["apiKeyId"] && !Settings[layer["apiKeyId"]] } .map do |layer| + layer["name"] = I18n.t("si

Re: [openstreetmap/openstreetmap-website] Move more map layer logic to MapLayers lib to simplify JS (PR #5832)

2025-03-24 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 1 commit. a8f088911ec139aa3a25971a93de7d2628bbec33 Fix quotes -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5832/files/35fabd8003cec63f0a89cbb7afbaee92060e9470..a8f088911ec139aa3a25971a93de7d2628bbec33 You are receiving this because you are subs

[openstreetmap/openstreetmap-website] Bump @types/leaflet from 1.9.16 to 1.9.17 (PR #5843)

2025-03-24 Thread dependabot[bot] via rails-dev
Bumps [@types/leaflet](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/leaflet) from 1.9.16 to 1.9.17.
Commits

Re: [openstreetmap/openstreetmap-website] Fix typo in comment about Gravatar setting (PR #5841)

2025-03-24 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#5841) Merged, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5841#issuecomment-2749743057 You are receiving this because you are subscribed to this thread.

Re: [openstreetmap/openstreetmap-website] Fix typo in comment about Gravatar setting (PR #5841)

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

[openstreetmap/openstreetmap-website] Fix typo in comment about Gravatar setting (PR #5841)

2025-03-24 Thread Mateusz via rails-dev
### Description Fixed a minor typo in a comment to reflect correct spelling and proper noun usage. No functional changes to the codebase. ### How has this been tested? No tests were necessary, as this change only affects a code comment and does not alter runtime behavior. You can view, comment

Re: [openstreetmap/openstreetmap-website] Bidi support for texts of diaries and changeset discussions (#1943)

2025-03-24 Thread Nitai Sasson via rails-dev
NeatNit left a comment (openstreetmap/openstreetmap-website#1943) FWIW, this has finally been fixed for discussions yesterday in my PR #5835 and may soon be fixed for diary entries by #5840 if accepted. This issue is more-or-less a duplicate of #3428. -- Reply to this email directly or view it

Re: [openstreetmap/openstreetmap-website] dead link in /copyright (Issue #3998)

2025-03-24 Thread Paul Norman via rails-dev
pnorman left a comment (openstreetmap/openstreetmap-website#3998) I emailed the LWG about removing the link > Thanks for the helpful links, Paul. The wiki page says the data's under > CC-BY-SA, which takes "[appropriate > credit](https://creativecommons.org/licenses/by-sa/4.0/deed.en#ref-approp

Re: [openstreetmap/openstreetmap-website] Change heatmap color to linear from 0 to max changes (PR #5833)

2025-03-24 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > + domain: [0, heatmapData.reduce((max, item) => { +return item.total_changes > max ? item.total_changes : max; + }, 0)] Well, it's faster, but we're not exactly doing massive-scale data science here. -- Reply to this email

Re: [openstreetmap/openstreetmap-website] Show heatmap only to logged in users (PR #5829)

2025-03-24 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5829) Look I don't want to remove it but it legally we have no choice but to offer that option then so be it - it would be good to get an actual statement from the current LWG rather than comments from a former member of course. My c

Re: [openstreetmap/openstreetmap-website] Show heatmap only to logged in users (PR #5829)

2025-03-24 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#5829) If users can remove the heatmap, it can't be used for navigation. > Well we can allow moderators to see the heatmap even where the user has asked > to hide it This implies that it's moderators' job to review all changesets.

Re: [openstreetmap/openstreetmap-website] Show heatmap only to logged in users (PR #5829)

2025-03-24 Thread Emin Kocan via rails-dev
kcne left a comment (openstreetmap/openstreetmap-website#5829) I've already started working on adding opt-out settings for users and will be making a PR in the next few days. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5829#i

[openstreetmap/openstreetmap-website] Add dir="auto" to Markdown content for bidi (PR #5840)

2025-03-24 Thread Nitai Sasson via rails-dev
### Description 1. Derive a kramdown converter subclass that adds `dir="auto"` to HTML elements where appropriate. 2. Call this new converter instead of the default HTML converter 3. Add `dir="auto"` to changeset comment tag (unrelated, should have been part of #5835) This solves the last (to my

Re: [openstreetmap/openstreetmap-website] Add UserActivities module for structured user activity history (PR #5761)

2025-03-24 Thread Emin Kocan via rails-dev
kcne left a comment (openstreetmap/openstreetmap-website#5761) Refactored the code according to suggestions. Please let me know if you have any further suggestions. Thank you. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5761#

Re: [openstreetmap/openstreetmap-website] Add UserActivities module for structured user activity history (PR #5761)

2025-03-24 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + SELECT DATE_TRUNC('day', diary_comments.created_at) AS day FROM > diary_comments WHERE user_id = :user_id AND visible = true + UNION ALL + SELECT DATE_TRUNC('day', gpx_files.timestamp) AS day FROM gpx_files WHERE user_id = :user_id +

Re: [openstreetmap/openstreetmap-website] Add UserActivities module for structured user activity history (PR #5761)

2025-03-24 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + # Common SQL for activity days + private_class_method def self.activity_days_sql(_user_id) +<<~SQL.squish + SELECT DATE_TRUNC('day', changesets.created_at) AS day FROM changesets WHERE user_id = :user_id + UNION ALL + SELECT DATE_TR

Re: [openstreetmap/openstreetmap-website] Add UserActivities module for structured user activity history (PR #5761)

2025-03-24 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. e7ad35d6215e3a40f8d56ebaed2391b51cf704fe Add UserActivities module for structured user activity history b8fc12062bddec2dd01c5f936643fa8a53f7eecc Add tests for UserActivities module -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5761/f

Re: [openstreetmap/openstreetmap-website] Show changeset element counts using badges (PR #4872)

2025-03-24 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > +<% if pages.page_count == 1 %> + +<%= t ".#{type.pluralize}_title" %> + + <%= pages.item_count %> + + +<% elsif pages.page_count > 1 %> + +<%= t ".#{type.pluralize}_title" %> + + <%= t ".range", :x => pages.current_pag

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs in rich_text.rb (PR #5835)

2025-03-24 Thread Nitai Sasson via rails-dev
@NeatNit pushed 1 commit. 83575bd9baee1e49d3e3d822d8fd01a423cb1596 Merge branch 'master' into rtl-fixes -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5835/files/b4cae9b7a556cc093138fb728b8bced879d8d773..83575bd9baee1e49d3e3d822d8fd01a423cb1596 You are receivi

Re: [openstreetmap/openstreetmap-website] Add OpenMapTiles vector map (PR #4042)

2025-03-24 Thread Jachym Cepicky via rails-dev
jachym left a comment (openstreetmap/openstreetmap-website#4042) > Just FYI I've left MapTiler and so I will no longer update this PR. Feel free > to update it to your needs yourselves. Good luck and best regards. Yes, I confirm that. Many thanks @zdila to push this PR. We may take over it. -

Re: [openstreetmap/openstreetmap-website] Remove unused options argument from user_image_url (PR #5839)

2025-03-24 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5839) Looks good to me, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5839#issuecomment-2746302387 You are receiving this because you are subscribed to this t

Re: [openstreetmap/openstreetmap-website] Add dir="auto" to Markdown content for bidi (PR #5840)

2025-03-24 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#5840) > I thought the previous PR was handling all rich text... If it doesn't handle > markdown then it's of limited use - any HTML content is limited to legacy > material from many years ago so it's really only things that are limi