Re: [openstreetmap/openstreetmap-website] Get directions using fetch (PR #5642)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > @@ -99,22 +99,18 @@ language: I18n.currentLocale() } }) -}; -return $.ajax({ - url: OSM.FOSSGIS_VALHALLA_URL, - data, - dataType: "json", - success: function ({ tri

Re: [openstreetmap/openstreetmap-website] Get directions using fetch (PR #5642)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 1 commit. 14f5e6345dc4ea14af774d33b41a039483aa8877 Return empty after callback -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5642/files/b4f0af369d005b15525b775d750cf83838077ffe..14f5e6345dc4ea14af774d33b41a039483aa8877 You are receiving this bec

Re: [openstreetmap/openstreetmap-website] Get directions using fetch (PR #5642)

2025-02-09 Thread Holger Jeromin via rails-dev
This pushes json parsing off the js main thread. Hurray -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5642#issuecomment-2647180475 You are receiving this because you are subscribed to this thread. Message ID: __

[openstreetmap/openstreetmap-website] Enable more linting rules (PR #5643)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
Found some that improve legibility. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5643 -- Commit Summary -- * Enable sort-keys for eslint.js * Enable more linting rules -- File Changes -- M app/assets/javas

Re: [openstreetmap/openstreetmap-website] Get directions using fetch (PR #5642)

2025-02-09 Thread Holger Jeromin via rails-dev
@HolgerJeromin commented on this pull request. > @@ -99,22 +99,18 @@ language: I18n.currentLocale() } }) -}; -return $.ajax({ - url: OSM.FOSSGIS_VALHALLA_URL, - data, - dataType: "json", - success: functio

[openstreetmap/openstreetmap-website] Get directions using fetch (PR #5642)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
Start to move from $.ajax to fetch with the thing I recently restructured. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5642 -- Commit Summary -- * Get directions using fetch -- File Changes -- M app/assets/

[openstreetmap/openstreetmap-website] Make API old element show paths resourceful (PR #5641)

2025-02-09 Thread Anton Khorev via rails-dev
Declares `versions` resources with `show` action on these API paths: `node/:id/:version`, `way/:id/:version`, `relation/:id/:version`. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5641 -- Commit Summary -- * Make

Re: [openstreetmap/openstreetmap-website] API element resources (PR #5590)

2025-02-09 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 13 commits. f2ed3c1935610e0409a78c9d4d77b82513048fb4 Make api old element show paths resourceful a72199a79183c66684a35e40ce95eb77217035f3 Move api node version test to integration tests 4c5f7b8913eb4c0c71ecc9dbf9848e6567ca56e7 Test api old node show action without integra

Re: [openstreetmap/openstreetmap-website] Use subqueries to find nested members more efficiently (PR #5636)

2025-02-09 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/5636#issuecomment-2646644395 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev

Re: [openstreetmap/openstreetmap-website] Use subqueries to find nested members more efficiently (PR #5636)

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

Re: [openstreetmap/openstreetmap-website] Move eslint ignore rules to the configuration file (PR #5640)

2025-02-09 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/5640#issuecomment-2646580394 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev

Re: [openstreetmap/openstreetmap-website] Move eslint ignore rules to the configuration file (PR #5640)

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

Re: [openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-02-09 Thread Tom Hughes via rails-dev
This doesn't seem to be an authentication issue? You seem to be reaching the API endpoint (which I don't believe needs authentication) and you're getting a redirect to S3 which is not something we can avoid unless we build our own proxy. The problem is that the redirect is being rejected by COR

[openstreetmap/openstreetmap-website] Move eslint ignore rules to the configuration file (PR #5640)

2025-02-09 Thread Tom Hughes via rails-dev
Following on from @AntonKhorev's observation in #5631 this moves eslint ignore rules to the configuration. Instead of having the rake task select which files to check, we just check the whole tree and have eslint ignore third party files and generated files that we don't control. You can view,

[openstreetmap/openstreetmap-website] Allow getting a GPX in the browser outside openstreetmap.org (Issue #5639)

2025-02-09 Thread Harel M via rails-dev
### Problem My site (and app) are uploading the recording to OSM by default to enrich OSM with the data people are collecting. I would like to avoid the need to go through my backend to fetch a GPX file (private one). Currently the api returns a 302 redirect, which can't be handled by the browse

Re: [openstreetmap/openstreetmap-website] Convert API element history actions to versions resources (PR #5638)

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

Re: [openstreetmap/openstreetmap-website] Convert API element history actions to versions resources (PR #5638)

2025-02-09 Thread Tom Hughes via rails-dev
Looks good to me, thanks. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5638#issuecomment-2646538774 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [openstreetmap/openstreetmap-website] Fix grammar and punctuation in CONTRIBUTING md (PR #5637)

2025-02-09 Thread Tom Hughes via rails-dev
The `involves` is fine, and correct, but there's really no need for a comma after `e.g.` any more than there would be if you spelled it in full - the dictionary example you pointed at is rather different because it's between two commas as an aside. What would probably be good is simply to expan

Re: [openstreetmap/openstreetmap-website] Add button for directions from location (PR #5635)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
How would you integrate directions with the existing button? I based this on my local transport authorities' apps' (which use OSM too) design, which I find uses the available space well. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/

Re: [openstreetmap/openstreetmap-website] Add button for directions from location (PR #5635)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > @@ -11,7 +11,7 @@ OSM.Search = function (map) { e.preventDefault(); var query = $(this).closest("form").find("input[name=query]").val(); if (query) { - OSM.router.route("/directions?from=" + encodeURIComponent(query) + OSM.formatHash(

Re: [openstreetmap/openstreetmap-website] Add button for directions from location (PR #5635)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 1 commit. 4d01a3b9d46986ada51403625d7949de37d128b0 Add button for directions from location -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5635/files/0a63e7cb90f0535a948c5768cb05f07ba87c54f4..4d01a3b9d46986ada51403625d7949de37d128b0 You are recei

[openstreetmap/openstreetmap-website] Convert API element history actions to versions resources (PR #5638)

2025-02-09 Thread Anton Khorev via rails-dev
Declares resources on the following paths: `node/:id/history`, `way/:id/history`, `relation/:id/history`. `history` action becomes a standard `index`. They were named "history" and I keep this name in paths, but later I'll have to refer to each item in "history", and how do you name such item?

Re: [openstreetmap/openstreetmap-website] Replace var in javascript with let/const (PR #5558)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > - url: content_path, + url: path, If you're already cleaning up after me, you can define the function as `function (url, callback)` for even more conciseness. -- Reply to this email directly or view it on GitHub: https://github.com/openstree

Re: [openstreetmap/openstreetmap-website] API element resources (PR #5590)

2025-02-09 Thread Anton Khorev via rails-dev
@AntonKhorev pushed 14 commits. 98af87d1cbe59650bf4880c2e5d46a34230dc11e Convert api element history actions to versions resources c45f6e09843f5f30c8f84fe416dd1e01d0ca1b33 Make api old element show paths resourceful b1300f83b4f4f5786baac97ca2406da83c2b51b3 Move api node version test to integ

Re: [openstreetmap/openstreetmap-website] Set iD map param with array (PR #5632)

2025-02-09 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. >} else if (id.data("lat") && id.data("lon")) { -params.set("map", "16/" + id.data("lat") + "/" + id.data("lon")); +map = [null, id.data("lat"), id.data("lon")]; Yes, the secondary default value that was introduced in https://github.com/openst

[openstreetmap/openstreetmap-website] Fix grammar and punctuation in CONTRIBUTING md (PR #5637)

2025-02-09 Thread Serge Croisé via rails-dev