openstreetmap-ng icon indicating copy to clipboard operation
openstreetmap-ng copied to clipboard

Direct tag edit

Open Aury88 opened this issue 1 year ago • 11 comments
trafficstars

Click here to see the exact specification of what needs to be done.

Hi. thank you for this wonderful project! Something I always feel missing in classic osm.org is a way to directly add/edit/remove tags. when we select an object on the map we can see all tags applied to it in the sidebar but we can't modify them directly (we can only search their meaning on osmWiki). immagine

We have to load an application re-select the element or to copy its ID, past it in Level0 and then finally apply the desired changes. I personally find this very strange for a website made for the mappers.

I would like and find very usefull that, if the user is logged in and there is an object selected, to have an "Edit tags" button over the tags table and, if edited, a "Discarge" and a "Save" buttons on the bottom of a changeset comment text-box

I know this could be difficult to implement but i think this would be a very appreciated feature from all the contributors that only need to make small/single changes to tag. I hope you will consider this feature request/wish (clearly after the feature parity). Thank you. Regards.

Aury88 avatar Jul 20 '24 17:07 Aury88

I like that idea! Simple tag editor for simple use cases. It sounds like it will be quite easy to implement.

Zaczero avatar Jul 20 '24 18:07 Zaczero

There is browser extension https://github.com/Zverik/osmtags-editor which implements that for the current website. Personally I find it extremely useful for small edits (I'm not a fan of iD), which I would otherwise do in Level0.

starsep avatar Jul 21 '24 06:07 starsep

@starsep thank you very much! did not know that. I consider the existence of a that extension a proof of interest in this feature and the fact that I and part of the italian community did know of that extension as a proof of lack of communication of available tools ...if osm-NG will be able to suggest tools/applications in a convenient way this project will have solved one of the most serious problems (imho) of the osm project. thank you very much again.

Aury88 avatar Jul 21 '24 08:07 Aury88

if osm-NG will be able to suggest tools/applications in a convenient way this project will have solved one of the most serious problems (imho) of the osm project.

osm-NG will have software recommendation list (#24)

KonradowyPL avatar Jul 21 '24 13:07 KonradowyPL

if osm-NG will be able to suggest tools/applications in a convenient way this project will have solved one of the most serious problems (imho) of the osm project.

osm-NG will have software recommendation list (#24)

But we will also have this feature, it sounds like a core feature of the site :slightly_smiling_face:

Zaczero avatar Jul 21 '24 18:07 Zaczero

The goal is to:

  • When logged in, display "Edit text" link-like button (btn btn-link) in the same line as "Tags" title
  • When clicked, hide the tags and show a <textarea>, inside a <form>, hide the "Edit text" button
  • <form> has Discard and Submit buttons at the bottom, and a required Comment <input>
  • <form> is inside a Jinja2 template, not created by JavaScript
  • Tags contain the raw key/values in some data-* html attribute
  • data-* html attribute contains JSON-encoded dictionary of tags, so there is just one data field per all tags group
  • After edit text button click, fill the <textarea> with the tags in form of key=value (read from data-* html attribute
  • On submit click, let the browser submit a POST request as normal
  • On discard click, hide the <form> and show the original tags list and the "Edit text" button
  • This feature only works when browsing latest element (there is a flag for this somewhere in the controller)

Alternatively, instead of using <textarea>, you may also implement some text input with dropdown support, laying the groundwork for future task #94. It's not required, just a nice-to-have. Pick whichever implementation you prefer.

We will want to hook it up to the new API 0.7 so currently backend implementation should be skipped (since API 0.7 is work in progress). Let's focus on the frontend now.

Zaczero avatar Jul 21 '24 18:07 Zaczero

It could be done also in the iD way with autocomplete image

sabas avatar Jul 25 '24 12:07 sabas

It could be done also in the iD way with autocomplete

Yeah. in this way it reduce typos and at the same time it keep a consistent style between osm and iD application. That's exactly what I was thinking.

Aury88 avatar Jul 26 '24 06:07 Aury88

I have created a new issue that will deal with taginfo integration after the groundwork is finished for this issue.

Zaczero avatar Jul 26 '24 14:07 Zaczero

The only concern is that it would create tons of micro-changesets when you want to modify e.g. multiple nodes or ways. Could be solved by adding changes to a changeset and then finally applying everything with a separate page. (Kinda like streetcomplete) Obviously newcomers would have to be notified about this.

goteusz-maszyk avatar Jul 28 '24 09:07 goteusz-maszyk

@goteusz-maszyk Imho this feature is designed to cover a specific need, a single tag edit, so in the gap between the note edit and the use of editing tools . for more complex/large editing there are already suitable tools designed for this and way better at this ( ie integrated with Q/A check etc) . the impediment in saving changesets with >1 changes prevented this features from being easily used to make tons of micro-changesets, and this is imho a good thing.

Aury88 avatar Aug 07 '24 15:08 Aury88