mapbox / mapbox/mapbox-gl-geocoder
Reverse search result order when shown above search bar
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
When the search bar control is added to the bottom-left or bottom-right corner of the map, search results are shown above the search bar, listed in the usual order. But this means the mouse cursor has to travel farther to get from the search bar to the most relevant result. Fitts’ law may be hurt further if the number of result rows is variable.
Reversing the order of the results would make it easier for a user to select the most relevant result using the mouse. Hopefully the fact that the most relevant result is automatically highlighted is enough to inform the user that the order has been reversed. Otherwise, if the list is scrollable, perhaps intentionally partially cutting off the least relevant result (the one now on the top) would more reliably focus the user’s attention on the most relevant result (the one on the bottom).
/cc @samanpwbb
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the search-result rendering for the map control and check how bottom-left and bottom-right placements determine the result list direction. Verify the behavior with variable-length result lists and confirm that the most relevant result remains highlighted and easiest to select when the results appear above the search bar.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100