@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
@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
@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
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
@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:
## 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
@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
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
@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
@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
@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
@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
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
@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
@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) {
@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
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
@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.
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
@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
@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($
@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
@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");
+
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
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
@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
@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
@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
@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
@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
@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
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
32 matches
Mail list logo