Skip to content

Combo field should suggest values that almost match the input #8802

@1ec5

Description

@1ec5

If I type desiganted into the Allowed Access field or portugese into the Cuisine field, the suggestions should include near matches such as designated and portuguese based on an edit distance to known values. This might be difficult for combo fields that get their suggestions from taginfo, but predefined options from id-tagging-schema could still participate in the same kind of fuzzy matching as presets in the search bar or fields in the More Fields dropdown.

.map(a => ({ preset: a, dist: utilEditDistance(value, a.searchName()) }))
.filter(a => a.dist + Math.min(value.length - a.preset.searchName().length, 0) < 3)
.sort((a, b) => a.dist - b.dist)

Fuzzy matching would keep id-tagging-schema from having to maintain an index of likely typos, as in openstreetmap/id-tagging-schema#266.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn enhancement to make an existing feature even betterfieldAn issue with a field in the user interfaceusabilityAn issue with ease-of-use or design

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions