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

2024-09-25 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. af134de5eb1fa394aa906bc10875eb1bfca1d484 Added two railway svgs -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/a30a89c8dbf28df8377c85196dea68ea351e7fac..af134de5eb1fa394aa906bc10875eb1bfca1d484 You are receiving this becaus

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

2024-09-24 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 6642c0517243448031c2e4f0667aa12da57693ba Added childcare svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/2ff0b3617bde2fe206875ef8bc004fdf41aec894..6642c0517243448031c2e4f0667aa12da57693ba You are receiving this because y

Re: [openstreetmap/openstreetmap-website] Trace import: remove activerecord-import gem (PR #5038)

2024-09-24 Thread mmd via rails-dev
The question is what happens with validations. Do we want to maintain them in two different places (Tracepoint model and trace.rb)? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5038#issuecomment-2371894309 You are receiving thi

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

2024-09-24 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 2b83a6dfc6cf6f9cf574afe8f568404a1de797a0 Added svg symbols for school and car share -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/6642c0517243448031c2e4f0667aa12da57693ba..2b83a6dfc6cf6f9cf574afe8f568404a1de797a0 You are

Re: [openstreetmap/openstreetmap-website] Login screen for OAuth 2 authorization shows "sign up" tab that triggers googles android policy violation bot (Issue #5118)

2024-09-24 Thread mmd via rails-dev
It's been a while. The javascript workaround is in place and appears to be working ok. I haven't seen other projects with similar requirements. Should we keep this open, and assign it to @simonpoole, or close it? Any other ideas? -- Reply to this email directly or view it on GitHub: https://git

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

2024-09-26 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 39a14376de10e1d7eb7a0d8a88422eaab3cdd041 Added railway level_crossing svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/af134de5eb1fa394aa906bc10875eb1bfca1d484..39a14376de10e1d7eb7a0d8a88422eaab3cdd041 You are receiving t

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

2024-09-26 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 97e5251a8064be4f982f12f0fe21d77b78c47cb8 Added amenity university svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/39a14376de10e1d7eb7a0d8a88422eaab3cdd041..97e5251a8064be4f982f12f0fe21d77b78c47cb8 You are receiving this

Re: [openstreetmap/openstreetmap-website] Trace import: remove activerecord-import gem (PR #5038)

2024-09-24 Thread mmd via rails-dev
Tracepoint.import! calls model validations internally, like we discussed above. Try to upload data without timestamp and see what happens. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5038#issuecomment-2373075375 You are receiv

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

2024-09-26 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. dc0863b71f7eea9828a7364f0cb80d5bdad17546 Added historic wreck svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/97e5251a8064be4f982f12f0fe21d77b78c47cb8..dc0863b71f7eea9828a7364f0cb80d5bdad17546 You are receiving this beca

Re: [openstreetmap/openstreetmap-website] Trace import: remove activerecord-import gem (PR #5038)

2024-09-26 Thread mmd via rails-dev
This comment still refers to the previous version where the whole file was added to .rubocop.yml. @tomhughes hasn’t commented on the inline annotation variant yet, and I would suggest to wait for feedback before continuing. Like I said, I don’t really have an issue with this annotation. -- Re

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

2024-09-27 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 7ea4e8b0f6e003abf5097660179713b50b3c62a8 Added historic ruins svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/4a0ab792a46d28ea9f7db5d4114944a9897ede42..7ea4e8b0f6e003abf5097660179713b50b3c62a8 You are receiving this beca

Re: [openstreetmap/openstreetmap-website] add changeset visualisation when seeing a changeset (Issue #5240)

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

Re: [openstreetmap/openstreetmap-website] add changeset visualisation when seeing a changeset (Issue #5240)

2024-09-27 Thread mmd via rails-dev
Changeset visualization is very similar to #1376. Please add your comments there as well. Tag coloring is already covered in #738 -> closing as duplicate -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5240#issuecomment-2378779

Re: [openstreetmap/openstreetmap-website] Change the way changesets are displayed to use achavi (#1376)

2024-09-27 Thread mmd via rails-dev
Alternative approach to Achavi is being proposed here: https://www.openstreetmap.org/user/TrickyFoxy/diary/405188 -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/1376#issuecomment-2378784232 You are receiving this because you a

Re: [openstreetmap/openstreetmap-website] Trace import: remove activerecord-import gem (PR #5038)

2024-09-27 Thread mmd via rails-dev
A few years back, I've introduced both the activerecord-import gem and `import!` method call to speed up Tracepoint imports. Alternative options weren't available then. Now with the recent Rails version, it's a good time to move to the core Rails code. At least today, we have exactly one locati

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

2024-09-27 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 4a0ab792a46d28ea9f7db5d4114944a9897ede42 Added estate agent svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/dc0863b71f7eea9828a7364f0cb80d5bdad17546..4a0ab792a46d28ea9f7db5d4114944a9897ede42 You are receiving this becaus

Re: [openstreetmap/openstreetmap-website] Using osm.org as identity provider for non-"osm.org production" Rails instances (PR #5071)

2024-09-28 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 5b61d54da9b213474b301b18653b007429e9cbdc Using osm.org as identity provider -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5071/files/358d158afb83d6d73aecd92898834eba36d2226c..5b61d54da9b213474b301b18653b007429e9cbdc You are receiving

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

2024-09-28 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 2cd72f00c773845a8c66bcdd042930148a7ad432 Rescale golf svgs to 14 -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/f5302501bec349d46bea6731827c722f3c04bc30..2cd72f00c773845a8c66bcdd042930148a7ad432 You are receiving this becau

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

2024-09-28 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. f387f71ee0d11379f70ce4299af4b9f3ceabf116 Rescale some svgs to 14pt -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/2cd72f00c773845a8c66bcdd042930148a7ad432..f387f71ee0d11379f70ce4299af4b9f3ceabf116 You are receiving this bec

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

2024-09-27 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. f5302501bec349d46bea6731827c722f3c04bc30 Remove white background for amenity bus_station svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/7ea4e8b0f6e003abf5097660179713b50b3c62a8..f5302501bec349d46bea6731827c722f3c04bc30

Re: [openstreetmap/openstreetmap-website] Allow exporting direction path tracks (Issue #5224)

2024-09-19 Thread mmd via rails-dev
I don't think it makes a whole lot of sense to reimplement the GPX export for 3 different routing engines. However, it might be a better idea to add some links underneath the direction results which point to the respective engine demo pages. These pages anyway have much more capabilities, like

Re: [openstreetmap/openstreetmap-website] `/messages/{id}/mark?mark={unread/read}` returns HTML code (Issue #5222)

2024-09-20 Thread mmd via rails-dev
@AntonKhorev : you're right, I checked the response in wireshark, and the POST request returns HTTP 302 without any payload. Closing here, since there's no issue really. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5222#issu

Re: [openstreetmap/openstreetmap-website] `/messages/{id}/mark?mark={unread/read}` returns HTML code (Issue #5222)

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

Re: [openstreetmap/openstreetmap-website] Support Panoramax in feature links (browse tags helper) (Issue #5200)

2024-09-30 Thread mmd via rails-dev
This could probably all be handled automatically by #2621. However, I believe Sophox database is still not up to date with most recent wiki updates. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5200#issuecomment-2384907195 Yo

Re: [openstreetmap/openstreetmap-website] Masks off unused translation keys in activerecord (PR #5242)

2024-09-30 Thread mmd via rails-dev
I was also wondering about this. IMHO the right place to address this issue would be a proper parser in https://github.com/glebm/i18n-tasks, which is able to handle model validation error messages. I didn't find anything in there, maybe we could raise an issue? -- Reply to this email directly

Re: [openstreetmap/openstreetmap-website] Masks off unused translation keys in activerecord (PR #5242)

2024-10-01 Thread mmd via rails-dev
As a follow up, this use case is not (yet) supported by i18n-tasks. The referenced GitHub issue has some comments on how this could be implemented. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5242#issuecomment-2387079370 You a

Re: [openstreetmap/openstreetmap-website] Add short links to OSM objects (Issue #5244)

2024-10-01 Thread mmd via rails-dev
_I'm not covering the question how and where we're generating these links in the first place._ > Links to OSM entities are quite unwieldy, e. g.: > https://www.openstreetmap.org/changeset/157188078. There's still the third option to use `osm.org` along with the current schema: `https://osm.org

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

2024-09-25 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. a30a89c8dbf28df8377c85196dea68ea351e7fac Remove white background for barrier gate svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/3e54397b865318d10591ea4fd559ea78c9cbda22..a30a89c8dbf28df8377c85196dea68ea351e7fac You ar

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

2024-09-25 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 3e54397b865318d10591ea4fd559ea78c9cbda22 Added mini_roundabout svg -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/0836b0caa2f5146ba86857b6f44d3cd9fbfdc3cc..3e54397b865318d10591ea4fd559ea78c9cbda22 You are receiving this bec

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

2024-09-25 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. 0836b0caa2f5146ba86857b6f44d3cd9fbfdc3cc rtl:ignore added for additional transforms -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/2b83a6dfc6cf6f9cf574afe8f568404a1de797a0..0836b0caa2f5146ba86857b6f44d3cd9fbfdc3cc You are

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

2024-10-03 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. b35ceab840fd3e978e735ddb4c8cb8566ce66b31 Unit test to accept filenames with optional # suffix -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/f387f71ee0d11379f70ce4299af4b9f3ceabf116..b35ceab840fd3e978e735ddb4c8cb8566ce66b3

Re: [openstreetmap/openstreetmap-website] Add short links to OSM objects (Issue #5244)

2024-10-03 Thread mmd via rails-dev
Closed #5244 as not planned. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5244#event-14503513509 You are receiving this because you are subscribed to this thread. Message ID: ___ r

Re: [openstreetmap/openstreetmap-website] Add short links to OSM objects (Issue #5244)

2024-10-03 Thread mmd via rails-dev
Ok, let's close this issue. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5244#issuecomment-2391268828 You are receiving this because you are subscribed to this thread. Message ID:

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

2024-10-03 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. be6f334b1698fb919a1e486122b87ac5d3a9d56b Use relative position instead of svg transform -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5080/files/b35ceab840fd3e978e735ddb4c8cb8566ce66b31..be6f334b1698fb919a1e486122b87ac5d3a9d56b You

Re: [openstreetmap/openstreetmap-website] Add user block api call (PR #4301)

2024-10-25 Thread mmd via rails-dev
@mmd-osm 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 => pa

Re: [openstreetmap/openstreetmap-website] Show point that Location Panel is referring to (Issue #5287)

2024-10-25 Thread mmd via rails-dev
Closed #5287 as not planned. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5287#event-14867415806 You are receiving this because you are subscribed to this thread. Message ID: ___ r

Re: [openstreetmap/openstreetmap-website] Show point that Location Panel is referring to (Issue #5287)

2024-10-25 Thread mmd via rails-dev
This seems like the wrong place, you need to report iD topics here: https://github.com/openstreetmap/iD -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5287#issuecomment-2437241652 You are receiving this because you are subscrib

Re: [openstreetmap/openstreetmap-website] Danger isn't working in CI (Issue #5267)

2024-10-17 Thread mmd via rails-dev
One of the links I've posted mentioned "public_repo" scope, that's read only access to public repos. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5267#issuecomment-2420107906 You are receiving this because you are subscribed

Re: [openstreetmap/openstreetmap-website] Danger isn't working in CI (Issue #5267)

2024-10-17 Thread mmd via rails-dev
I wouldn't use my own account to create the token, and rather create some new "OSM Danger Bot" GH account. You could also keep that token secret and reference it by variable name only. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/i

Re: [openstreetmap/openstreetmap-website] Danger isn't working in CI (Issue #5267)

2024-10-17 Thread mmd via rails-dev
I've just created a new PR, let's see how it goes. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5267#issuecomment-2420157110 You are receiving this because you are subscribed to this thread. Message ID: _

[openstreetmap/openstreetmap-website] Unauthenticated session expiry (PR #5270)

2024-10-17 Thread mmd via rails-dev
Follow up for https://github.com/openstreetmap/operations/issues/1107 The goal of this PR is to set the `expiry_after` value for unauthenticated users to a fairly low value (read: a few hours). This way, memcached entries are no longer created with a TTL of 0 (unlimited). Previously, logged one

[openstreetmap/openstreetmap-website] Lazy image loading for user provided content (Issue #5601)

2025-02-03 Thread mmd via rails-dev
Diary and other user provided content frequently includes rather large external images, which slows down page loading. We could force lazy loading of these assets by adding a loading="lazy" attribute to img tags, as described here: https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_lo

[openstreetmap/openstreetmap-website] Add copyright/attribution message to downloaded map images (PR #5607)

2025-02-04 Thread mmd via rails-dev
This PR adds the UI facing parts for https://github.com/openstreetmap/chef/pull/735 and adds WebP as as additional output format, as well as a checkbox to toggle copyright/attribution in the map export. ![image](https://github.com/user-attachments/assets/037f8b7c-a09a-4841-9b8b-8ed9d4667f87) *

[openstreetmap/openstreetmap-website] Introduce lazy image loading for user provided content (PR #5615)

2025-02-05 Thread mmd via rails-dev
See #5601 for discussion --- Closes #5601 You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5615 -- Commit Summary -- * Image lazy loading -- File Changes -- M config/initializers/sanitize.rb (6) -- Patch Li

Re: [openstreetmap/openstreetmap-website] Rename database tables (Issue #5619)

2025-02-05 Thread mmd via rails-dev
> So my proposal is to rename the tables to match the model names. Have you also evaluated the other way around, i.e. change the model names to match the db table names? Assuming that's feasible, that's significantly less risk and effort for anything non-Rails. -- Reply to this email directl

Re: [openstreetmap/openstreetmap-website] Add copyright/attribution message to downloaded map images (PR #5607)

2025-02-05 Thread mmd via rails-dev
@mmd-osm pushed 1 commit. f6f75d6e844f04fcea3b27e604428eb0a883e9b6 Add copyright/attribution message to downloaded map images -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5607/files/68a1ce22dcac71dd1500c190eee34339a83698d4..f6f75d6e844f04fcea3b27e604428eb0a

[openstreetmap/openstreetmap-website] generate_share_url: wrong encoding for email title (Issue #5587)

2025-02-01 Thread mmd via rails-dev
### URL _No response_ ### How to reproduce the issue? 1. Pick random diary entry with spaces in title, e.g. https://www.openstreetmap.org/user/watmildon/diary/406063 2. Click on "Share via Email" button 3. Note that the title in your email client reads as "`OSM+US+Board+Candidate+Statement+202

Re: [openstreetmap/openstreetmap-website] generate_share_url: wrong encoding for email title (Issue #5587)

2025-02-01 Thread mmd via rails-dev
Yes, I was about to post the same link. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5587#issuecomment-2629048488 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [openstreetmap/openstreetmap-website] generate_share_url: wrong encoding for email title (Issue #5587)

2025-02-01 Thread mmd via rails-dev
I forgot to mention, I was seeing this behavior in Thunderbird... -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5587#issuecomment-2629045582 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [openstreetmap/openstreetmap-website] Downloaded map images do not have a copyright/attribution message (#551)

2025-02-01 Thread mmd via rails-dev
I gave it a try and added attribution for *backend* rendering for PS, PDF, SVG, PNG, JPEG and WEBP formats. ![Image](https://github.com/user-attachments/assets/bc33b2b4-813a-4d02-a655-f6c358d96904) Code and some sample images: https://gist.github.com/mmd-osm/fb7b0b53794240315a05369911fc66a2 --

Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-11 Thread mmd via rails-dev
With the latest changes I was able to render Lake Huron locally for the first time (455k nodes). That is definitely a significant speed-up. ![image](https://github.com/user-attachments/assets/78660720-bad3-4434-a35d-7f130316edaf) -- Reply to this email directly or view it on GitHub: https://gi

Re: [openstreetmap/openstreetmap-website] Show notes more often (Issue #3971)

2025-01-19 Thread mmd via rails-dev
The issue here is in osm.js.erb: if mlon and mlat are set, we're not initializing "loc" from the _osm_location cookie. Later on we cannot set mapParams.layers, since "loc" should be nil at this time. This impacts both the notes layer, as well as the map layer. ```javascript } else if (param

Re: [openstreetmap/openstreetmap-website] Add OAuth Refresh token when `openid` scope is used (PR #5497)

2025-01-22 Thread mmd via rails-dev
@DavidKarlas : by the way, are you somehow aware/involved in this discussion? https://gitlab.com/panoramax/server/api/-/issues/227 -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5497#issuecomment-2607157426 You are receiving this

[openstreetmap/openstreetmap-website] Consistent usage of layer information in _osm_location cookie (PR #5529)

2025-01-21 Thread mmd via rails-dev
As reported in #3971, some URLs like https://www.openstreetmap.org/?mlat=53.32607&mlon=-1.49033 reset the currently selected layers. In order to restore the previous setting, a user needs to select both map and overlay layers after click on the link. It seems a bit premature to simply override

Re: [openstreetmap/openstreetmap-website] Show notes more often (Issue #3971)

2025-01-22 Thread mmd via rails-dev
@Cj-Malone : issue should be fixed now. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/3971#issuecomment-2608399376 You are receiving this because you are subscribed to this thread. Message ID:

Re: [openstreetmap/openstreetmap-website] Add eslint-plugin-erb to provide linting of our .js.erb files (PR #5549)

2025-01-24 Thread mmd via rails-dev
According to https://github.com/openstreetmap/openstreetmap-website/blob/master/lib/tasks/eslint.rake#L23 we would need to use `bundle exec rails eslint:fix` instead. This seems to work for me at least. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/ope

[openstreetmap/openstreetmap-website] Added error handling for data layer (PR #5551)

2025-01-24 Thread mmd via rails-dev
As discussed in https://github.com/openstreetmap/openstreetmap-website/pull/5474#issuecomment-2585349128, this PR adds an error handling in case the API request fails. ![image](https://github.com/user-attachments/assets/4d2d2e77-fcb5-43c4-a5ba-a4c3ffaa8b71) You can view, comment on, or merge th

Re: [openstreetmap/openstreetmap-website] Add eslint-plugin-erb to provide linting of our .js.erb files (PR #5549)

2025-01-24 Thread mmd via rails-dev
_✖ 40 problems (31 errors, 9 warnings) 26 errors and 0 warnings potentially fixable with the `--fix` option._ Is `--fix` of any help here, have you tried this out already? -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5549#iss

Re: [openstreetmap/openstreetmap-website] The map doesn't load (Issue #5555)

2025-01-26 Thread mmd via rails-dev
By the way, I checked mdn before using optional chaining: _It’s been available across browsers since July 2015._ That’s close to 10 years… -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/#issuecomment-2615005156 You are rece

Re: [openstreetmap/openstreetmap-website] The map doesn't load (Issue #5555)

2025-01-27 Thread mmd via rails-dev
Well, what about the other issue in turbo.js (:5:154-178)? That's an external dependency we have no control over, and it causes the exact same issue on the (assumed to be) old browser. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/i

Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlayadd/overlayremove instead of layeradd/layerremove (PR #5474)

2025-01-27 Thread mmd via rails-dev
I will create the PR to switch to JSON format shortly: https://github.com/mmd-osm/openstreetmap-website/tree/patch/datalayerjson -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5474#issuecomment-2616458723 You are receiving this b

[openstreetmap/openstreetmap-website] DataLayer to consume JSON format responses (PR #5563)

2025-01-27 Thread mmd via rails-dev
https://github.com/openstreetmap/leaflet-osm/pull/44 introduced OSM JSON support in the underlying leaflet osm package. This PR enables the new feature by requesting application/json format (via Accept header). You can view, comment on, or merge this pull request online at: https://github.com/

Re: [openstreetmap/openstreetmap-website] Refactor embed.js.erb with layers.yml (PR #5571)

2025-01-28 Thread mmd via rails-dev
@mmd-osm commented on this pull request. > <% end %> }; var map = L.map("map"); map.attributionControl.setPrefix(""); map.removeControl(map.attributionControl); - if (args.layer === "cyclosm") { -new L.OSM.CyclOSM().addTo(map); - } else if (args.layer === "cyclemap" || arg

Re: [openstreetmap/openstreetmap-website] Refactor embed.js.erb with layers.yml (PR #5571)

2025-01-29 Thread mmd via rails-dev
@mmd-osm commented on this pull request. > <% end %> }; var map = L.map("map"); map.attributionControl.setPrefix(""); map.removeControl(map.attributionControl); - if (args.layer === "cyclosm") { -new L.OSM.CyclOSM().addTo(map); - } else if (args.layer === "cyclemap" || arg

Re: [openstreetmap/openstreetmap-website] Add linting for .js.erb files (Issue #5523)

2025-01-25 Thread mmd via rails-dev
Maybe create a new issue for this topic. https://github.com/prettier/plugin-ruby could be starting point. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5523#issuecomment-2614086393 You are receiving this because you are subscr

[openstreetmap/openstreetmap-website] Messaging API: deleted messages (Issue #5496)

2025-01-13 Thread mmd via rails-dev
A while back I've noticed that the [Messaging API](https://wiki.openstreetmap.org/wiki/Messaging_API_proposal) allows to retrieve deleted messages via the API (`GET /api/0.6/user/messages/_nnn_`). This seems to be inconsistent to how our UI works, where deleted messages are no longer shown. We

Re: [openstreetmap/openstreetmap-website] Messaging API: deleted messages (Issue #5496)

2025-01-13 Thread mmd via rails-dev
Undeleting messages is fine as a use case, that’s how the trash folder could work. What I’m really missing is a way to permanently remove messages with no way to undelete them. Has this been discussed already at some point? -- Reply to this email directly or view it on GitHub: https://github.co

Re: [openstreetmap/openstreetmap-website] "layeradd layerremove" event handlers dramatically slow down Map data layer rendering (Issue #5466)

2025-01-05 Thread mmd via rails-dev
By the way, if you're looking into map data layer performance, we're also spending some time in XML parsing (DOMParser.parseFromString). Maybe we could switch to /map.json and directly parse the response as json(). Both Rapid and iD are using json for performance reasons. -- Reply to this emai

Re: [openstreetmap/openstreetmap-website] Use baselayerchange/overlaylayerchange instead of layeradd/layerremove (PR #5474)

2025-01-14 Thread mmd via rails-dev
@AntonKhorev 's comment wasn't exactly clear to me either. I think it's the following. Note that once you change the layer in the URL, the share link "layer" attribute is updated accordingly: ![Peek 2025-01-14 22-58](https://github.com/user-attachments/assets/9b801345-a8e2-4a3b-ae1b-11129d9f836

Re: [openstreetmap/openstreetmap-website] Proposal for Messages API (Issue #4509)

2025-01-10 Thread mmd via rails-dev
At least the list of recent API changes on that page has this entry: _In July 2024, the [Messaging API](https://wiki.openstreetmap.org/wiki/Messaging_API_proposal) was added._ -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/4

Re: [openstreetmap/openstreetmap-website] Add OAuth Refresh token when `openid` scope is used (PR #5497)

2025-01-17 Thread mmd via rails-dev
I'm wondering why you want to send id_tokens to a resource server in the first place. That's not really their intended use: https://oauth.net/id-tokens-vs-access-tokens/ -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5497#issuec

Re: [openstreetmap/openstreetmap-website] Filter out invisible nodes and ways during initial selection (PR #5589)

2025-02-16 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5589) > [...] if they were part of an invisible way that had nodes inside the > bounding box [...] Tbh, I don't really understand this use case, and I didn't find a corresponding unit test for this specific scenario. As soon as we de

Re: [openstreetmap/openstreetmap-website] Rename database tables (Issue #5619)

2025-02-16 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5619) > I can see that changeset_subscribers is accessed by cgimap, for example. > Would that be a blocker? I don't think so. The code you've found in cgimap is not used in production. Rails is taking care of the changeset create endp

Re: [openstreetmap/openstreetmap-website] Rename database tables (Issue #5619)

2025-02-16 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5619) > even the question of how much point there is in treating the two > separately but that's another can of worms. The idea to get rid of current tables in one way or another isn't entirely new. Back in 2009, the infamous "Rant

Re: [openstreetmap/openstreetmap-website] Add copyright/attribution message to downloaded map images (PR #5607)

2025-02-15 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5607) It seems there's no need to support optional attribution. I'm going to close this PR and create another one for this webp one liner: ``` diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.

Re: [openstreetmap/openstreetmap-website] Add copyright/attribution message to downloaded map images (PR #5607)

2025-02-15 Thread mmd via rails-dev
Closed #5607. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5607#event-16321975637 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing

Re: [openstreetmap/openstreetmap-website] Show new/modified/deleted count in place of " 🖊" in changeset card (Issue #5758)

2025-04-05 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5758) Yes, that's totally fine for me. I anyway keep the stats per operation (create/modify/delete) and object type (node/way/relation). -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetm

Re: [openstreetmap/openstreetmap-website] Show new/modified/deleted count in place of " 🖊" in changeset card (Issue #5758)

2025-04-05 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5758) @AntonKhorev : I propose to get started with additional columns for the changesets table. It should be similar to the existing `num_changes` column, and ideally supports something like: ```sql UPDATE changesets SE

Re: [openstreetmap/openstreetmap-website] Can we avoid inlining svgs into erb templates? (Issue #5880)

2025-04-05 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5880) By the way: it would be really good, if you could also work out a way to use external SVGs, which is also suitable for https://github.com/openstreetmap/openstreetmap-website/pull/5080 ... as a special requirement: the SVG color n

Re: [openstreetmap/openstreetmap-website] Can we avoid inlining svgs into erb templates? (Issue #5880)

2025-04-10 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5880) For additional context: the "icon" in line 137 of `external_svg` refers to an additional `id="icon"` I had to add to each of the external svgs, like in this example: ```xml http://www.w3.org/2000/svg"; id="icon" width="12" heigh

Re: [openstreetmap/openstreetmap-website] Show new/modified/deleted count in place of " 🖊" in changeset card (Issue #5758)

2025-04-07 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5758) I think i'm mostly done with the cgimap part, including unit tests. For the time being, I have enhanced structure.sql with the following statement: ``` ALTER TABLE public.changesets ADD COLUMN num_created_nodes integer DEFAULT

Re: [openstreetmap/openstreetmap-website] Add message deletion warning (Issue #5891)

2025-04-07 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5891) I think a better solution would be to add a "Deleted items" folder with an option to recover items. The data is anyway still available (see #5496). Confirmation popups are a good fit for mass deletions only (which we don't suppor

Re: [openstreetmap/openstreetmap-website] Arm in registration globe was deleted (Issue #5941)

2025-04-20 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5941) It was removed on purpose: #4696 -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5941#issuecomment-2817098184 You are receiving this because you are subscribed to

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-22 Thread mmd via rails-dev
@mmd-osm commented on this pull request. > @@ -7,7 +7,10 @@ class TracesController < ApiController def index @traces = current_user.traces.reload -render :content_type => "application/xml" +respond_to do |format| + format.xml { render :content_type => "

Re: [openstreetmap/openstreetmap-website] Switch to rails 8.0 defaults (PR #5937)

2025-04-22 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5937) Although I couldn't figure out how "to_time_preserves_timezone = :zone" works, or what "receiver" the documentation talks about, I didn't encounter any obvious issues on a non UTC-time machine. In particular, test cases were work

Re: [openstreetmap/openstreetmap-website] API changeset close resource (PR #5965)

2025-04-29 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5965) In case you’re changing something regarding this endpoint, can you also create an issue for cgimap as well? I can’t commit this will be picked up in the near future, but at least it should be documented. -- Reply to this email d

Re: [openstreetmap/openstreetmap-website] JSON support for /changeset/:id/download (Issue #5970)

2025-04-30 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5970) Changeset download in XML format is currently being served by https://github.com/zerebubuth/openstreetmap-cgimap. That's where the productive implementation for JSON format would have to go as well. -- Reply to this email direct

Re: [openstreetmap/openstreetmap-website] Update to rack 3 (PR #5923)

2025-04-12 Thread mmd via rails-dev
@mmd-osm commented on this pull request. > @@ -247,7 +247,7 @@ def respond_to_timeout # To work round this we call rewind on the body here, which is added # as a filter, to force it to be fetched from Apache into a file. def fetch_body -request.body.rewind +request.body&.rewind

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-02 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5973) I tried a few variations to have `if-unused` on the same level as it is in the XML version. This turned out to be tricky. It would require us to introduce another `elements` array that would have to be added to create and modify

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-02 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5973) > > Changefiles today are usually sorted by (OSM type, OSM id, version). This > > ensures that most(*) dependent changes are already available, when reading > > an object. Consumers may rely on that order. > I think we can keep

Re: [openstreetmap/openstreetmap-website] API versions, capabilities and permissions resources (PR #5979)

2025-05-05 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5979) This seems like a breaking change. As an example, JOSM needs to call /api/versions + /api/0.6/capabilities, instead of /api/capabilities as it is today. -- Reply to this email directly or view it on GitHub: https://github.com/op

Re: [openstreetmap/openstreetmap-website] API versions, capabilities and permissions resources (PR #5979)

2025-05-04 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5979) I'm a bit surprised about "deprecated /api/capabilities". Was there any previous discussion on this topic? How would an api client find out about the current API version? -- Reply to this email directly or view it on GitHub: htt

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-01 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5973) > In my opinion, this format is better because: … Now for the upload, you might have multiple create/modify/delete blocks in random order, including repeating blocks for the same action. How would this work with your proposed for

Re: [openstreetmap/openstreetmap-website] JSON support for /changeset/:id/download (Issue #5970)

2025-04-30 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5970) I would start in this repo with a json version of app/views/api/changesets/downloads/show.xml.builder, then add some test cases. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetma

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-01 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5973) They could in theory, but the xml format today doesn't have any assumptions in that direction. Processing happens from top to bottom in the exact sequence defined in xml, and you're free to do pretty much whatever you like in term

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-01 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5973) I think we can keep the sorting of objects (per action) as is, regardless of the format. Obviously we would have to define in which sequence create/modified/delete actions need to be processed, b/c JSON properties don't have a de

Re: [openstreetmap/openstreetmap-website] CORS issues in Firefox with API (Issue #5983)

2025-05-05 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5983) I see cf-way in the http header, as well as some mix up of different header fields. Could this be Cloudflare related? It would be interesting to see if https://master.apis.dev.openstreetmap.org has the same issue (which doesn't h

Re: [openstreetmap/openstreetmap-website] Implement JSON support for the changeset download API (PR #5973)

2025-05-05 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5973) Indeed, this looks like a good option. It's probably a matter of taste to have "type": "create" or "action": "create", either way should be ok. I can see the benefit of keeping the element objects clean. NB: I plan to use an even

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-24 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5943) Thanks! By the way, I've proposed swagger / openapi a few years ago in #3107... -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5943#issuecomment-2828879487 You are

Re: [openstreetmap/openstreetmap-website] Add support for json traces API (PR #5943)

2025-04-24 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#5943) @HarelM : It would be nice if you could document your API change on the API 0.6 wiki page ( https://wiki.openstreetmap.org/wiki/API_v0.6 ) to help others developers. You can find a bit of change history in the header section. Fur

<    1   2   3   4   >