Re: [openstreetmap/openstreetmap-website] Add Shortbread-based vector tile layer (PR #6137)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. On app/assets/javascripts/leaflet.map.js: What do you think of swapping the hierarchy of the new files, with `leaflet.shortbread.js` required in `leaflet.maplibregl.js`? The current way would need to require `leaflet.maplibregl.js` twice, once in `leafle

Re: [openstreetmap/openstreetmap-website] Add user preferences support to iD editor via server-side rendering (PR #6199)

2025-07-15 Thread mmd via rails-dev
@mmd-osm commented on this pull request. > @@ -15,7 +15,15 @@ data[:token] = token.token end data[:locale] = ID::LOCALES.preferred(preferred_languages).to_s - data[:asset_map] = assets("iD").to_json %> + data[:asset_map] = assets("iD").to_json + + # Include user preferences fo

Re: [openstreetmap/openstreetmap-website] Add user preferences support to iD editor via server-side rendering (PR #6199)

2025-07-15 Thread Martin Raifer via rails-dev
@tyrasd commented on this pull request. > @@ -15,7 +15,15 @@ data[:token] = token.token end data[:locale] = ID::LOCALES.preferred(preferred_languages).to_s - data[:asset_map] = assets("iD").to_json %> + data[:asset_map] = assets("iD").to_json + + # Include user preferences for

Re: [openstreetmap/openstreetmap-website] Add user preferences support to iD editor via server-side rendering (PR #6199)

2025-07-15 Thread Martin Raifer via rails-dev
tyrasd left a comment (openstreetmap/openstreetmap-website#6199) > enables the iD editor to access user-specific preferences Just for clarity: this is not quite yet implemented in the current version of iD, but @Deeptanshu-sankhwar is working on it right now. This means that the code will only

Re: [openstreetmap/openstreetmap-website] Add user preferences support to iD editor via server-side rendering (PR #6199)

2025-07-15 Thread Martin Raifer via rails-dev
@tyrasd commented on this pull request. > +window.OSM = window.OSM || {}; +window.OSM.userPreferences = userPreferences; This could probably better handled in method of the `idContext` object, instead of as a new global variable. -- Reply to this email directly or view it on GitHub:

[openstreetmap/openstreetmap-website] Add user preferences support to iD editor via server-side rendering (PR #6199)

2025-07-15 Thread Deeptanshu Sankhwar via rails-dev
## Add User Preferences Support to iD Editor ### Summary This PR implements server-side rendering of user preferences for the iD editor, making them accessible in the client-side JavaScript context. ### Technical Changes **Server-side (`app/views/site/id.html.erb`):** - Added user preference co

Re: [openstreetmap/openstreetmap-website] Add Shortbread-based vector tile layer (PR #6137)

2025-07-15 Thread Paul Norman via rails-dev
@pnorman pushed 1 commit. 7a80c3c3b57f5568b6bc06f83e5f51364f137b62 Add Shortbread-based Vector Tile layer -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6137/files/63e13015955d7b9272950e6a4f8491add46c98c0..7a80c3c3b57f5568b6bc06f83e5f51364f137b62 You are recei

Re: [openstreetmap/openstreetmap-website] Add Shortbread-based vector tile layer (PR #6137)

2025-07-15 Thread Paul Norman via rails-dev
pnorman left a comment (openstreetmap/openstreetmap-website#6137) > Did you plan to integrate the language selector as well No. I don't plan to look at any language stuff until that stuff has been defined in the shortbread spec -- Reply to this email directly or view it on GitHub: https://gith

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 1 commit. 78d0571781958d9747d7f22b925d8dadb128cb12 Add human-readable wikidata explainations -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6127/files/63c4b8712bd3c1e11826f44e40fddf22349c805d..78d0571781958d9747d7f22b925d8dadb128cb12 You are rec

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > +if (data.icon && OSM.WIKIMEDIA_COMMONS_URL) { + let src = OSM.WIKIMEDIA_COMMONS_URL + "Special:Redirect/file/" + encodeURIComponent(data.icon); + if (!data.icon.endsWith(".svg")) src += "?width=128"; + $("") +.attr("href", OSM

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
@hlfan pushed 1 commit. 63c4b8712bd3c1e11826f44e40fddf22349c805d Add human-readable wikidata explainations -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6127/files/19e739716360bf69d3ab06abbf4109f2ab549fb7..63c4b8712bd3c1e11826f44e40fddf22349c805d You are rec

Re: [openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread Tom Hughes via rails-dev
@tomhughes commented on this pull request. > +TAG2LINK = lambda { + # the JSON data is an array with duplicate entries, which is not efficient for lookups. + # So, convert it to a hash and only keep the item with the best rank. + array = JSON.parse(Rails.root.join("node_modules/tag2link/inde

Re: [openstreetmap/openstreetmap-website] Add Shortbread-based vector tile layer (PR #6137)

2025-07-15 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#6137) Did you plan to integrate the language selector as well, to show the `lang_en` text version? I think this would be a nice addition, and frequently requested since about 1872. https://github.com/user-attachments/assets/b00ccc41-7b

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > +.appendTo(cell); +} +if (data.label) { + const label = $btn +.siblings(`a[href*="wikidata.org/entity/${data.qid}"]`) +.clone() +.text(data.label.value) +.attr("dir", "auto"); + cell.append($("").a

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > + $("") +.attr("href", OSM.WIKIMEDIA_COMMONS_URL + "File:" + encodeURIComponent(data.icon)) +.append($("").attr({ src, height: "32" })) +.addClass("float-end mb-1 ms-2") +.appendTo(cell); +} +if (data.label) {

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
@hlfan commented on this pull request. > @@ -101,4 +112,108 @@ scrollableList.scrollLeft = scrollableList.scrollWidth - scrollableList.offsetWidth; } } + + function previewWikidataValue($btn) { +if (!OSM.WIKIDATA_API_URL) return; +const items = $btn.data("qids"); +if

Re: [openstreetmap/openstreetmap-website] Keep search input until sidebar close (PR #6198)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
hlfan left a comment (openstreetmap/openstreetmap-website#6198) >From the search, when selecting a result, the search input stays. It will >persist when navigating to history or export, and only be removed once the >sidebar is closed via the close button. -- Reply to this email directly or vie

Re: [openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread mmd via rails-dev
@mmd-osm commented on this pull request. > +TAG2LINK = lambda { + # the JSON data is an array with duplicate entries, which is not efficient for lookups. + # So, convert it to a hash and only keep the item with the best rank. + array = JSON.parse(Rails.root.join("node_modules/tag2link/index.

Re: [openstreetmap/openstreetmap-website] Image download w/ submit_tag (PR #6192)

2025-07-15 Thread mmd via rails-dev
mmd-osm left a comment (openstreetmap/openstreetmap-website#6192) So the button is set to disabled in the setTimeout function below. ```javascript $document.on('submit.rails', rails.formSubmitSelector, function(e) { var form = $(this), remote = rails.isRemote(form), blan

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > +if (data.icon && OSM.WIKIMEDIA_COMMONS_URL) { + let src = OSM.WIKIMEDIA_COMMONS_URL + "Special:Redirect/file/" + encodeURIComponent(data.icon); + if (!data.icon.endsWith(".svg")) src += "?width=128"; + $("") +.attr("href

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > +.appendTo(cell); +} +if (data.label) { + const label = $btn +.siblings(`a[href*="wikidata.org/entity/${data.qid}"]`) +.clone() +.text(data.label.value) +.attr("dir", "auto"); + cell.append($

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > + $("") +.attr("href", OSM.WIKIMEDIA_COMMONS_URL + "File:" + encodeURIComponent(data.icon)) +.append($("").attr({ src, height: "32" })) +.addClass("float-end mb-1 ms-2") +.appendTo(cell); +} +if (data.la

Re: [openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

2025-07-15 Thread Anton Khorev via rails-dev
@AntonKhorev commented on this pull request. > @@ -101,4 +112,108 @@ scrollableList.scrollLeft = scrollableList.scrollWidth - scrollableList.offsetWidth; } } + + function previewWikidataValue($btn) { +if (!OSM.WIKIDATA_API_URL) return; +const items = $btn.data("qids"); +

Re: [openstreetmap/openstreetmap-website] Keep search input until sidebar close (PR #6198)

2025-07-15 Thread Tom Hughes via rails-dev
tomhughes left a comment (openstreetmap/openstreetmap-website#6198) What exactly is this supposed to change? Because I can't manage to find anything that's behaving differently with it merged... -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap

[openstreetmap/openstreetmap-website] Keep search input until sidebar close (PR #6198)

2025-07-15 Thread Marwin Hochfelsner via rails-dev
Addressing a part of #3123 to keep the search input longer, now that #6184 simplified the state management. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/6198 -- Commit Summary -- * Keep search input until sidebar

Re: [openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread Kyℓe Hensel via rails-dev
@k-yle commented on this pull request. > +TAG2LINK = lambda { + # the JSON data is an array with duplicate entries, which is not efficient for lookups. + # So, convert it to a hash and only keep the item with the best rank. + array = JSON.parse(Rails.root.join("node_modules/tag2link/index.js

Re: [openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread Kyℓe Hensel via rails-dev
@k-yle commented on this pull request. > @@ -0,0 +1,24 @@ +# A map of each OSM key to its formatter URL. For example: +# { "ref:vatin" => "https://example.com/$1"; } +TAG2LINK = lambda { + # the JSON data is an array with duplicate entries, which is not efficient for lookups. + # So, convert

Re: [openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread Kyℓe Hensel via rails-dev
@k-yle pushed 1 commit. 82ddcbd1c3efab24959148a8cf7fe059385e2bc5 use JOSM/tag2link to linkify tag values -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6197/files/b82d0e924a43935f878867422fd9c03541a6681f..82ddcbd1c3efab24959148a8cf7fe059385e2bc5 You are recei

Re: [openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread Kyℓe Hensel via rails-dev
@k-yle pushed 1 commit. b82d0e924a43935f878867422fd9c03541a6681f use JOSM/tag2link to linkify tag values -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6197/files/bf3d39a3f6c5ce1da937e352aa81f9d360d44506..b82d0e924a43935f878867422fd9c03541a6681f You are recei

Re: [openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread Tom Hughes via rails-dev
@tomhughes commented on this pull request. > @@ -0,0 +1,24 @@ +# A map of each OSM key to its formatter URL. For example: +# { "ref:vatin" => "https://example.com/$1"; } +TAG2LINK = lambda { + # the JSON data is an array with duplicate entries, which is not efficient for lookups. + # So, conv

Re: [openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread Kyℓe Hensel via rails-dev
@k-yle pushed 1 commit. bf3d39a3f6c5ce1da937e352aa81f9d360d44506 use JOSM/tag2link to linkify tag values -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6197/files/4f3811746609b88b62263fd832bfe1c9c8fc6795..bf3d39a3f6c5ce1da937e352aa81f9d360d44506 You are recei

[openstreetmap/openstreetmap-website] use JOSM/tag2link to linkify tag values (PR #6197)

2025-07-15 Thread Kyℓe Hensel via rails-dev
Closes #986, Closes #2405, Closes #3920, Closes #5200, Partially closes openstreetmap/iD#11120, Partially closes openstreetmap/iD#9510 This supersedes #2621. cc @francois2metz and @pyrog from the old PR ### Description OSM keys like [`mapillary`](https://osm.wiki/Key:mapillary) are now rendered