mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 15:34:49 +02:00
Don't autocomplete tags like name_1 in raw tag editor, closes #9422
This commit is contained in:
@@ -40,6 +40,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
#### :tada: New Features
|
||||
#### :sparkles: Usability & Accessibility
|
||||
* Show the color of (route) relations in the form of small colored circles in relation membership section and feature search results ([#9424])
|
||||
* Hide tag suggestions for tags like `name_1` in raw tag editor autocomplete ([#9422])
|
||||
#### :scissors: Operations
|
||||
#### :camera: Street-Level
|
||||
#### :white_check_mark: Validation
|
||||
@@ -50,6 +51,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
#### :hammer: Development
|
||||
|
||||
[#9424]: https://github.com/openstreetmap/iD/pull/9424
|
||||
[#9422]: https://github.com/openstreetmap/iD/issues/9422
|
||||
|
||||
|
||||
# 2.27.3
|
||||
|
||||
@@ -433,9 +433,10 @@ export function uiSectionRawTagEditor(id, context) {
|
||||
}, function(err, data) {
|
||||
if (!err) {
|
||||
const filtered = data
|
||||
.filter(d => _tags[d.value] === undefined)
|
||||
.filter(d => _tags[d.value] === undefined) // already used tag
|
||||
.filter(d => !(d.value in _discardTags)) // do not suggest discardable tags (see #9817)
|
||||
.filter(d => d.value.toLowerCase().includes(value.toLowerCase()));
|
||||
.filter(d => !/_\d$/.test(d)) // tag like name_1 (see #9422)
|
||||
.filter(d => d.value.toLowerCase().includes(value.toLowerCase())); // tag does not match user input
|
||||
callback(sort(value, filtered));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user