@1ec5 commented on this pull request.

This is indeed something many mappers have asked for. Hopefully we can strike a 
good balance between convenience for experienced mappers and intuitiveness and 
safety for less experienced mappers.

> +    let summary = makeDetailedPrefix();
+    const mainTagsHint = makeMainTagsHint();
+    if (summary.length > 200 || changedTags.size > 1) {
+      summary = makeOnlyKeysPrefix();
+    }
+    summary = summary.replace(/; $/, "");
+    if (mainTagsHint === "") {
+      summary += ` for ${objectType}/${objectId}`;
+    } else if (removedTags.size) {
+      summary += " from" + mainTagsHint;
+    } else if (changedTags.size) {
+      summary += " of" + mainTagsHint;
+    } else if (addedTags.size) {
+      summary += " to" + mainTagsHint;
+    }

This Lego string-building would need to be replaced by a series of format 
strings, one for each scenario.

Could we add an input box to at least give the user an option to supply [a more 
descriptive changeset 
comment](https://wiki.openstreetmap.org/wiki/Good_changeset_comments)? It could 
be prefilled with something formulaic for someone who’s really in a hurry.

> +
+  $(document).on("click", "a.edit_object_tags", async function (e) {
+    e.preventDefault();
+    e.stopPropagation();
+
+    e.target.setAttribute("disabled", true);
+
+    const [, type, id] = 
location.pathname.match(/\/(node|way|relation)\/([0-9]+)/);
+    const objectInfo = await downloadObjectInfo(type, id);
+    const currentTags = extractTagsFromObjectInfo(objectInfo);
+
+    const $browseSection = $("#sidebar_content h2 + div").first();
+
+    const $errorBox = $("<p>");
+
+    const $editorTextarea = $("<textarea>")

The big question: should this be a simple text area or something more 
structured? If it’s a simple text area that depends on a format of some sort, 
we need to provide hard-to-miss access to documentation about the format. It 
isn’t quite [Level0L](https://wiki.openstreetmap.org/wiki/Level0L), it’s the 
[multiline key-value 
syntax](https://wiki.openstreetmap.org/wiki/Tags#key=value_syntax) that iD 
exposes in its text view.

Most of the mappers you know already know the syntax by heart or will it figure 
on their own, but this PR would put “Edit Tags” in front of a broader user 
base, including users who’ve never edited the map before. Maybe this text area 
could be a steppingstone to something more structured like iD’s default raw 
tags view, a table of editable fields. After all, unlike Level0 (#2391), this 
inline text editor doesn’t really need to serve a mail-merge-like use case 
where you copy-paste the result of some text processing on the command line.

> @@ -7,6 +7,10 @@
 <% if @feature.visible? %>
   <div class='secondary-actions mb-3'>
     <%= link_to(t("browse.download_xml"), :controller => 
"api/#{@type.pluralize}", :action => :show) %>
+    <% if current_user %>
+      &middot;
+      <%= tag.a t("browse.edit_object_tags"), :href => "", :class => 
"edit_object_tags p-0 border-0 bg-transparent shadow-none" %>

>From my perspective as an iD developer, I’d expect some volume of well-meaning 
>but misguided contributions from people who don’t speak English or OSM 
>English, as well as even messier contributions from SEOs. Think whole 
>sentences as keys, that sort of thing.

If we’re concerned about this possibility, we could make inline editing an 
option alongside the [Preferred 
Editor](https://www.openstreetmap.org/preferences/basic) preference. It would 
still be more discoverable than the current browser extension, but just high 
enough of a hurdle that we’d have a better idea of who’s using the feature 
initially.

> +        "shop", "building", "amenity", "man_made", "highway", "natural",
+        "aeroway", "historic", "railway", "tourism", "landuse", "leisure"

Can we derive this set from 
[browse_icons.yml](https://github.com/openstreetmap/openstreetmap-website/blob/b8c6ab2b3d3bafd2c6314c4d6d37f99fd9c91219/config/browse_icons.yml),
 which also tracks primary feature tags?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6758#pullrequestreview-3724932314
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6758/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to