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

2025-03-21 Thread Nitai Sasson via rails-dev
NeatNit left a comment (openstreetmap/openstreetmap-website#5835) I would like to handle Markdown in this PR as well. Where on the OSM website is Markdown used? I'd like to check if it's already handled by default. -- Reply to this email directly or view it on GitHub: https://github.com/openstr

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

2025-03-21 Thread Marwin Hochfelsner via rails-dev
This PR moves name and attribution i18n from `L.OSM.Map.initialize` to the new `MapLayers` lib from #5809. So I could remove `layerConstructor` redefinitions and simplify the generation of the map's `baseLayers` by using `OSM.LAYER_DEFINITIONS.map()`. There might be a better place for the transla

Re: [openstreetmap/openstreetmap-website] Increase dynamic range of contribution heatmap (Issue #5831)

2025-03-21 Thread Holger Jeromin via rails-dev
HolgerJeromin left a comment (openstreetmap/openstreetmap-website#5831) We can change die type to `linear` and fill the domain array with the min + max: ```ts options.scale.color.type = 'linear'; options.scale.color.domain = [0, options.data.source.reduce((max, item) => { return item.total_cha

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

2025-03-21 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit. 413fcf7ac38231f09d636b7a4f47c06efec9b847 Change heatmap color to sqrt from 0 to max changes -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5833/files/882b060a92d977d9920fb7361ec2fd3c6b88e47d..413fcf7ac38231f09d636b7a4f47c06efec

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

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

Re: [openstreetmap/openstreetmap-website] Increase dynamic range of contribution heatmap (Issue #5831)

2025-03-21 Thread Anton Khorev via rails-dev
Closed #5831 as completed via #5833. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5831#event-16929751374 You are receiving this because you are subscribed to this thread. Message ID: _

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

2025-03-21 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -59,9 +60,10 @@ document.addEventListener("DOMContentLoaded", () => { }, scale: { color: { - type: "threshold", + type: "sqrt", + // reverse mutates the array. But with theme changes we must work

Re: [openstreetmap/openstreetmap-website] Use Date().toLocaleString() to construct month titles (PR #5834)

2025-03-21 Thread Holger Jeromin via rails-dev
@HolgerJeromin approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5834#pullrequestreview-2706118132 You are receiving this because you are subscribed to this thread. Message ID: __

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

2025-03-21 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -11,10 +11,11 @@ document.addEventListener("DOMContentLoaded", () => { return; } + /** @type {{date: string; max_id:number; total_changes: number}[]} */ If you want spaces after `:`, the one after `max_id:` is missing. -- Reply to t

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

2025-03-21 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit. 882b060a92d977d9920fb7361ec2fd3c6b88e47d Change heatmap color to linear from 0 to max changes -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5833/files/85076bd6f336e25140b97f84bbd59350ca4322c5..882b060a92d977d9920fb7361ec2fd3c6

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

2025-03-21 Thread Holger Jeromin via rails-dev
@HolgerJeromin pushed 1 commit. eb93355677444060e8cda2a53468110cfb1390c1 Change heatmap color to linear from 0 to max changes -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5833/files/053b77af54dba55c5941f0f2b685dbed30eb7711..eb93355677444060e8cda2a53468110cf

Re: [openstreetmap/openstreetmap-website] Increase dynamic range of contribution heatmap (Issue #5831)

2025-03-21 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5831) I hadn't realised we were using fixed buckets - that does seem like a poor choice. Is there any benefit to use one of the log types rather than linear, to better capture variation at the low end for people that occasionally do

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

2025-03-21 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > - nodes: "Nodes (%{count})" + nodes_title: "Nodes" nodes_paginated: "Nodes (%{x}-%{y} of %{count})" - ways: "Ways (%{count})" + ways_title: "Ways" ways_paginated: "Ways (%{x}-%{y} of %{count})" - relations: "Relation

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

2025-03-21 Thread Marwin Hochfelsner via rails-dev
Reopened #5832. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5832#event-16935000544 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailin

Re: [openstreetmap/openstreetmap-website] Set dir="auto" on changeset comment bodies (Issue #5785)

2025-03-21 Thread Nitai Sasson via rails-dev
NeatNit left a comment (openstreetmap/openstreetmap-website#5785) @gravitystorm I've opened a pull request now, completely untested but I hope it gets the ball rolling. I honestly don't think it has much distance to roll. -- Reply to this email directly or view it on GitHub: https://github.com/

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Nitai Sasson via rails-dev
NeatNit left a comment (openstreetmap/openstreetmap-website#5835) > Something like this: How about almost exactly that :) I applied it to note comments as well. I'm not sure if any other places need the same treatment. -- Reply to this email directly or view it on GitHub: https://github.com/o

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Nitai Sasson via rails-dev
@NeatNit pushed 1 commit. b4cae9b7a556cc093138fb728b8bced879d8d773 add text-align: start; to comment_text class (inherited individually by each descendant p) -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5835/files/31742c86b49e02483f0bdd01eb910797f1fa0386..b

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

2025-03-21 Thread David Tsiklauri via rails-dev
nertc left a comment (openstreetmap/openstreetmap-website#5121) @AntonKhorev Thank you for the review. PR was updated accordingly. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5121#issuecomment-2743822549 You are receiving this

Re: [openstreetmap/openstreetmap-website] Map key resource (PR #5830)

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

Re: [openstreetmap/openstreetmap-website] Use Date().toLocaleString() to construct month titles (PR #5834)

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

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#5835) > This would not be useful. Each paragraph needs to have dir="auto" separately. If you want a single comment with different language paragraphs, then looks like yes, you need `dir` on paragraphs. > Thanks for the tip though,

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Nitai Sasson via rails-dev
@NeatNit pushed 1 commit. d5b79d81a9ac632607e9484870611f0fd3979d78 add comment_text class to changeset comment div -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5835/files/148ec0a3656f884cc388b8259aa8ef1ec3aa3eb8..d5b79d81a9ac632607e9484870611f0fd3979d78 You

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Nitai Sasson via rails-dev
@NeatNit pushed 1 commit. 31742c86b49e02483f0bdd01eb910797f1fa0386 add comment_text class to note comment div -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5835/files/d5b79d81a9ac632607e9484870611f0fd3979d78..31742c86b49e02483f0bdd01eb910797f1fa0386 You are

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#5835) If you want to modify css, it makes sense to add a class on the entire comment and define properties in `common.scss`, similar to https://github.com/openstreetmap/openstreetmap-website/blob/6af214b2285d3292f214320b7221f7c9a1d7

Re: [openstreetmap/openstreetmap-website] Allow to agree to new terms if already agreed to old terms (PR #5706)

2025-03-21 Thread Anton Khorev via rails-dev
AntonKhorev left a comment (openstreetmap/openstreetmap-website#5706) > There's no need to "accept" changes to the terms though, or rather the terms > says that you're expected to check them when you want and that [continuing to > use the service constitutes acceptance of any > changes](https:/

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

2025-03-21 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > +def truncate_html(html_doc, max_length = nil, empty_tag_length = 1000) + return html_doc if max_length.nil? + + doc = Nokogiri::HTML::DocumentFragment.parse(html_doc) + accumulated_length = 0 + last_child = nil + + doc.traver

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

2025-03-21 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 4 commits. fe48f6980620a2c2d044f6724bc362c787ef6c96 Put layer definitions into map layout 58ee856968a36103af7fdf4956681f317969e159 Translate names in MapLayers lib 5d54c1c6c4a9d3bf01c1eee0427b77fa8e6c1017 Build attribution in MapLayers lib d76b3d5c92c9810c69431e8fc051049c26438477

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

2025-03-21 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 4 commits. 31d1da20c05c6504929ace20bdecd405bf8f9e39 Put layer definitions into map layout 542daea935c13d3590631feefd74cec8f4957485 Translate names in MapLayers lib 46401ffb0775e7c16130dd7df4559c588eb5ceee Build attribution in MapLayers lib 4caa0368462ca8d8ae9163a3b97291b7bdbe712c

Re: [openstreetmap/openstreetmap-website] Add dir=auto to user generated content (PR #3429)

2025-03-21 Thread Nitai Sasson via rails-dev
NeatNit left a comment (openstreetmap/openstreetmap-website#3429) I know this hasn't seen any action in 3 years, but if this is ever picked up again you should know: My PR #5835 applies `dir="auto"` to each paragraph individually in rich text content. This produces better results, in line with

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

2025-03-21 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 4 commits. 71763138d6118e10f0d2d34c513fc572ad4812d7 Put layer definitions into map layout 9158f50843e13f30ff203b25a37bcc79c029d726 Translate names in MapLayers lib 07076cda00eda0f2ff276a1c4586cc16436d96c5 Build attribution in MapLayers lib db0e35079d2d5275f40a5c8eacb53a9799151976

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

2025-03-21 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 4 commits. 7257f21f2e4be5804ab6aef9edd060f031422e56 Put layer definitions into map layout af01461c2a69bf2e77124e7bfc2e8ff9489e5c33 Translate names in MapLayers lib 6fe33b7720ece2c12087a517a0c0d82673aae194 Build attribution in MapLayers lib 35fabd8003cec63f0a89cbb7afbaee92060e9470

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

2025-03-21 Thread David Tsiklauri via rails-dev
@nertc commented on this pull request. > @@ -65,6 +65,32 @@ def description protected +def truncate_html(html_doc, max_length = nil, empty_tag_length = 1000) + return html_doc if max_length.nil? + + doc = Nokogiri::HTML::DocumentFragment.parse(html_doc) + accumulated_

Re: [openstreetmap/openstreetmap-website] Increase dynamic range of contribution heatmap (Issue #5831)

2025-03-21 Thread Holger Jeromin via rails-dev
HolgerJeromin left a comment (openstreetmap/openstreetmap-website#5831) It flatens the peaks a bit. I am not sure if this is better or not. With the linear one we see the deviation more... -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-webs

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

2025-03-21 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request. > + domain: [0, heatmapData.reduce((max, item) => { +return item.total_changes > max ? item.total_changes : max; + }, 0)] I was not was not awake enough to fiddle myself something and trusted copilot to find something

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Nitai Sasson via rails-dev
@NeatNit pushed 1 commit. 148ec0a3656f884cc388b8259aa8ef1ec3aa3eb8 lint fix -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5835/files/6c05f1e9c9757e4d65ec2bef116e5373af71804c..148ec0a3656f884cc388b8259aa8ef1ec3aa3eb8 You are receiving this because you are subs

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

2025-03-21 Thread Tom Hughes via rails-dev
@tomhughes requested changes 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"]

Re: [openstreetmap/openstreetmap-website] Map key resource (PR #5830)

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

Re: [openstreetmap/openstreetmap-website] Use Date().toLocaleString() to construct month titles (PR #5834)

2025-03-21 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5834) It's a bit annoying having to use mix our own translation with the browser's like this bit it seems to work OK so this looks good to me. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/ope

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -86,7 +86,7 @@ def linkify(text, mode = :urls) class HTML < Base def to_html - linkify(sanitize(simple_format(self))) + linkify(sanitize(simple_format(self, dir: "auto"))) [This helper](https://api.rubyonrails.org/classes/Ac

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Nitai Sasson via rails-dev
NeatNit left a comment (openstreetmap/openstreetmap-website#5835) Related to #3432, it seems that in the case of changeset comments, they are arranged in a list, and `text-align` is being set by the browser stylesheet (in Firefox at least) to `` elements: ```css li { display: list-item; tex

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Nitai Sasson via rails-dev
@NeatNit pushed 1 commit. 6c05f1e9c9757e4d65ec2bef116e5373af71804c move the simple_format extra argument to where it actually works -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5835/files/7a263e7cbcbfadc8be0a2797d2480542b2546bd5..6c05f1e9c9757e4d65ec2bef116

Re: [openstreetmap/openstreetmap-website] add dir="auto" to paragraphs of formatted text (PR #5835)

2025-03-21 Thread Nitai Sasson via rails-dev
@NeatNit commented on this pull request. > @@ -86,7 +86,7 @@ def linkify(text, mode = :urls) class HTML < Base def to_html - linkify(sanitize(simple_format(self))) + linkify(sanitize(simple_format(self, dir: "auto"))) Yup, that's what I thought. How about this? (commit I jus

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

2025-03-21 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5829) Well we can allow moderators to see the heatmap even where the user has asked to hide it, and I was assuming that we would, which helps with the review problem. -- Reply to this email directly or view it on GitHub: https://git

Re: [openstreetmap/openstreetmap-website] Allow to agree to new terms if already agreed to old terms (PR #5706)

2025-03-21 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5706) There's no need to "accept" changes to the terms though, or rather the terms says that you're expected to check them when you want and that [continuing to use the service constitutes acceptance of any changes](https://osmfounda

Re: [openstreetmap/openstreetmap-website] Increase dynamic range of contribution heatmap (Issue #5831)

2025-03-21 Thread Marwin Hochfelsner via rails-dev
hlfan left a comment (openstreetmap/openstreetmap-website#5831) The standard log seems out of the question for me due to where 0 maps to, the `symlog` fixes this: [![Image](https://github.com/user-attachments/assets/86d79118-b030-4389-97fb-db45077ad1ef)](https://www.researchgate.net/profile/John-

Re: [openstreetmap/openstreetmap-website] Increase dynamic range of contribution heatmap (Issue #5831)

2025-03-21 Thread Holger Jeromin via rails-dev
HolgerJeromin left a comment (openstreetmap/openstreetmap-website#5831) > Is there any benefit to use one of the log types rather than linear, to > better capture variation at the low end for people that occasionally do large > edits? Perhaps my experiments were not correct, but using `pow` did

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

2025-03-21 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#5121) I think this needs some sort of indication when an entry has been truncated - an ellipsis at the end of the truncated text or something. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/ope

[openstreetmap/openstreetmap-website] Bump eslint from 9.22.0 to 9.23.0 (PR #5836)

2025-03-21 Thread dependabot[bot] via rails-dev
Bumps [eslint](https://github.com/eslint/eslint) from 9.22.0 to 9.23.0.
Release notes

Sourced from eslint's releases.

v9.23.0

Features