mapbox / mapbox/mapbox-gl-geocoder

consider using throttle instead of debounce on requests

Open
#186 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs discussion
Dominant language
JavaScript
Stars
388
Forks
181
PR merge metrics
No merged PRs in 30d

Description

We use debounce to slow down requests to the Geocoding API, however I've noticed that when typing a search input, I'll often keep typing more of the query since I still haven't seen any suggestions, where I'd actually prefer some suggestions to start showing up while typing.

If we used throttle instead of dobounce, then some suggestions could start to show up even while still typing, and the user could then decide oh hey there's the suggestion I want, I'll stop typing and select it.

Would be preferable to decide which way to go here before #185

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current debounce-based Geocoding API request path and review issue #185 before evaluating the scheduling options. Done means the request behavior and expected suggestion timing are agreed and verified; the issue does not name a file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.