openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.36k stars 1.21k forks source link

Don't suggest values from Taginfo for `name:xx` tags #10287

Open Dimitar5555 opened 4 months ago

Dimitar5555 commented 4 months ago

URL

No response

How to reproduce the issue?

  1. Create an element
  2. Go to it's tags
  3. Add name:xx
  4. Switch to the value box
  5. Start typing
  6. (notice the suggestions below)

Screenshot(s) or anything else?

image

Which deployed environments do you see the issue in?

Released version at openstreetmap.org/edit

What version numbers does this issue effect?

2.29.0

Which browsers are you seeing this problem on?

Firefox

1ec5 commented 4 months ago

Related discussion: https://github.com/openstreetmap/iD/issues/7485.

There’s a hard-coded list of keys that don’t get taginfo suggestions. It could be supplemented by a regular expression for keys starting with name:.

https://github.com/openstreetmap/iD/blob/49492a0e06aef71f90e96ab3ed50098df0f4ce93/modules/services/taginfo.js#L196-L209

draunger commented 1 week ago

@1ec5 @Dimitar5555 can I start working on it if no one is doing it??

1ec5 commented 1 week ago

I don’t think anyone has submitted a pull request about this issue so far. (You’d see a link to it somewhere on this page.) Feel free to submit a PR once you’ve got something that you’d like feedback about, and we’ll try to respond when we’re able to.

1ec5 commented 1 week ago

By the way, I noted above that we’re hard-coding a list of “popular” keys to ignore, but there’s a large, technically unbounded number of possible name:* keys. So rather than trying to enumerate all of them, consider looking at where this _popularKeys variable is used and adjusting the logic there.

draunger commented 1 week ago

@1ec5 ok sir