Easier workflow for adding members to a relation
Description
Copying an item should not only take tags, but also relations with it. E.g. if I have to make a new bus/tram stop it takes a lot of work.
Screenshots
No response
Hi there! My name is Alan Bergsneider, I'm a student who would like to implement this functionality / fix this potential bug as a new contributor to the project. Would anyone be able to point me in the right direction of where the code related to this lives? (let me know if i'm doing something wrong, brand new to open source!)
You don't seem to have analyzed all ramifications of such approach. First, a "relation" is a nebulous concept, and what might be logical for one kind (I presume you're having Route relations in mind) may wreak havoc in a different type (valid Multipolygon or Boundary relations will automatically get invalid if you add an outside unconnected member).
Until one figures out the exact set of circumstances and requirements for all kinds of use cases, this is best left alone.
Fair, will leave alone.
I just want to throw https://wiki.openstreetmap.org/wiki/Relations_are_not_categories in here.
I get what relations are. They have to be used consciously. I gave an example of scenario where I find this feature useful. Following a bus line or series of bus lines adding subsequent stops makes me to copy/create a stop and then put a dozen of relations. This is tedious. If not directly with a node, then maybe in the left pane it would be possible to copy relations and paste them somehow there? Two steps better than 24 steps.
What about adding another context menu item 'Paste with relations' and a shortcut like Ctrl + Shift + v (or similar if this is already taken)? This makes it explicitly opt-in.
For the time being, the workaround is to Shift + select all your bus stops and add them all to the desired route relations.
Caveat: You have to be quite careful what you select and where you add it, since iD will happily add a member to a relation twice without a warning. See #9311, #8167.
Copying relation membership should never be the default. There are few times where this would actually be useful and in most other cases it would lead to unintentional errors.
Maybe it would be worth to turn the UX around: While one (or more) relations are currently selected (or alternatively in a special "copy buffer"), there could be a hotkey to more quickly add additional members to it (and to more quickly remove members from it). That way, not only the use case for public transport stops is covered, but also for example fixing and extending a (hiking) route relation would become easier.
Elsewhere I proposed that relations become first-class objects in iD's UI. Similar ideas were also flouted in that thread.
Regardless of what of that gets implemented, adding a simple "Duplicate" button on the relation's sidebar (followed by a renaming and confirmation prompt) would much simplify defining new route relations, which often share many ways and stops with the existing ones.