lundegaard / lundegaard/react-mapy-cz

Refactor SearchInput component

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

SearchInput now works on its own - there is no possibility to make it behave differently.
Goal of this task it to split implementation to smaller blocks and enable users to use only part of the solution.

  • Export useSuggest hook in hooks folder

  • Enable support for returning suggest results (so we can implement our own select with results)

  • Add config object that enables to set bounds of suggest and category of results

  • Export useGeolocation hook in hooks folder

  • Create useReverseGeolocation hook consuming coordinates and returning list of values, based on passed config. Config should define limit of results and preferrably distance if API permits

  • Hooks should have be able to return results without changing map (setting map center)

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 with the SearchInput component and inspect the hooks folder to understand the existing suggest and geolocation behavior. Separate the suggest, geolocation, and reverse-geolocation responsibilities so each can return results independently of map-center changes. Done means the requested hooks are exported and their configuration supports result limits, bounds, categories, and reverse-geolocation options.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Refactor
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.