Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to paste several "k=v" tag pairs into the raw tag editor #6185

Closed
famo opened this issue Apr 14, 2019 · 8 comments · Fixed by #6302
Closed

Allow users to paste several "k=v" tag pairs into the raw tag editor #6185

famo opened this issue Apr 14, 2019 · 8 comments · Fixed by #6302
Assignees
Labels
new-feature A new feature for iD
Milestone

Comments

@famo
Copy link

famo commented Apr 14, 2019

It would be nice if we could use the "Add field" textbox to add new tags, e.g. by pasting
roof:levels=1 into it.
Currently one has to scroll all the way down to the end of the current tags list, hit + and then paste - this is cumbersome.

Furthermore it would be awesome, if we could enter several tags at once this way, e.g. by pasting: roof:levels=1 roof:shape=gabled.

@famo famo changed the title Use "Add field" textbox for complete tags Use "Add field" textbox for entering tag pairs Apr 14, 2019
@bhousel
Copy link
Member

bhousel commented Apr 14, 2019

It would be nice if we could use the "Add field" textbox to add new tags, e.g. by pasting
roof:levels=1 into it.

Sorry, but I disagree with repurposing the "Add Field" dropdown for this.

If you are copy pasting tags like this, you should probably just hide the "All fields" section completely and use the "All tags" section.

Furthermore it would be awesome, if we could enter several tags at once this way, e.g. by pasting: roof:levels=1 roof:shape=gabled.

Yeah this makes sense.. Currently it only supports pasting a single key-value pair, but we could allow people to paste several.

@bhousel bhousel changed the title Use "Add field" textbox for entering tag pairs Allow users to paste several "k=v" tag pairs into the raw tag editor Apr 14, 2019
@famo
Copy link
Author

famo commented Apr 14, 2019

If you are copy pasting tags like this, you should probably just hide the "All fields" section completely and use the "All tags" section.

Well, I use both. But I see now that the "Add field" box really belongs to the fields section.

Yeah this makes sense.. Currently it only supports pasting a single key-value pair, but we could allow people to paste several.

+1
Still tho, really looking for (speed) improvements here. How about an open textbox by default ("Add tags:")? Maybe even on top of the existing tags?

@bhousel
Copy link
Member

bhousel commented Apr 14, 2019

Still tho, really looking for (speed) improvements here.

I totally understand.. iD has to balance a lot of design concerns and we value simplicity over mapper efficiency and speed, so you might want to use a different tool like JOSM in the mean time.

I do want to make pasting tags work great, but this really is a niche need (most users don't and shouldn't care about what the tags are), so I don't want to just add a textbox for people to paste tags into and close the issue. This actually is a very good idea and we might build something like that, but make it spark joy, you know?

@tordans
Copy link
Collaborator

tordans commented Apr 16, 2019

Furthermore it would be awesome, if we could enter several tags at once this way, e.g. by pasting: roof:levels=1 roof:shape=gabled.

This sounds a lot like what I tried to commented/request at #5070 (comment). Maybe this new issue will nudge @AndreasHae to have another look at it :-).

@AndreasHae
Copy link
Contributor

Ah, so that's what you meant @tordans. Wasn't quite sure back then 😅
I'll have a look at it!

@bhousel bhousel added the considering Not Actionable - still considering if this is something we want label Apr 23, 2019
@tordans
Copy link
Collaborator

tordans commented Apr 23, 2019

@AndreasHae thanks for working on this!

Since it is merged recently, I tested it at http://preview.ideditor.com/master/#background=Berlin-2018&disable_features=boundaries&locale=en&map=20.00/52.49902/13.39265

Some cases work great, some have issues yet.

Testcase: (the one from above)
roof:levels=1 roof:shape=gabled

Result: Problem
Bildschirmfoto 2019-04-23 um 19 30 25

Testcase:

roof:levels=1
roof:shape=gabled

Result: Same

Testcase:

name=lorem - ipsum
key=yes

Result:
Great

Testcase:

acces:conditional=private @ (12:00 - 14:00)
key=yes

Result: Problem
Bildschirmfoto 2019-04-23 um 19 36 32

Testcase:

maxspeed=80
maxspeed:hgv=60 @ (weight>7.5)

Source: https://wiki.openstreetmap.org/wiki/DE:Conditional_restrictions

Result: Problem
Bildschirmfoto 2019-04-23 um 19 38 59

Testcase:

maxspeed=80
lorem=60 @ (weight=>7.5)

Result: Problem
Bildschirmfoto 2019-04-23 um 19 39 39

@bhousel bhousel added new-feature A new feature for iD and removed considering Not Actionable - still considering if this is something we want labels May 2, 2019
@bhousel bhousel self-assigned this May 2, 2019
@bhousel bhousel added the wip Work in progress label May 2, 2019
@bhousel bhousel added this to the 2.15.0 milestone May 2, 2019
@bhousel
Copy link
Member

bhousel commented May 2, 2019

I do want to make pasting tags work great, but this really is a niche need (most users don't and shouldn't care about what the tags are), so I don't want to just add a textbox for people to paste tags into and close the issue. This actually is a very good idea and we might build something like that, but make it spark joy, you know?

I'm working on this today. I think I can make the raw tag editor toggle between text and list modes, so that people who who want to copy and paste things can just use the text mode to do it.

@bhousel
Copy link
Member

bhousel commented May 2, 2019

Also, kind of amusing, but the code from #6211 which accepts pasted key=value pairs allows users to circumvent the readonly tag protection, so I'm removing it.

edit readonly tag

bhousel added a commit that referenced this issue May 2, 2019
(Reverts: #6211, #5070, #5024)

The old code allows users to circumvent the readonly tag protection
see #6185 (comment)

We'll offer a text-mode instead, with stricter checks on which keys can be modified.
@quincylvania quincylvania removed the wip Work in progress label Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A new feature for iD
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants