Skip to content

enhancement: city fields should autocomplete against cities already in the dataset #151

Description

@shauryagangrade

Problem

The city field is free text in both places users type one:

  • src/components/map/suggest-place-dialog.tsx:140-149
  • src/components/map/user-place-dialog.tsx:195-204 (with its own normalizeCity)

Nothing steers contributors toward existing slugs, which is exactly how dataset drift like "new delhi" (space) vs new_delhi happens (see the city-slug hygiene issue). Every variant fragments filtering and city-page generation.

Suggested fix

Autocomplete against getCities(getPlaces()) from src/lib/places.ts — a native <datalist> is enough for v1; a shadcn combobox if we want fuzzy matching. Keep free-text entry allowed for genuinely new cities, but suggest canonical values first.

Acceptance criteria

  • Typing a city suggests existing dataset cities
  • New cities remain possible without code changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataPlaces datasetenhancementNew feature or requesthelp wantedExtra attention is welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions