lundegaard / lundegaard/react-mapy-cz
Refactor SearchInput component
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
useSuggesthook 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
useGeolocationhook in hooks folder -
Create
useReverseGeolocationhook 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
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 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