mapbox / mapbox/mapbox-gl-draw
featuresAt should not be exposed as is in MapboxDraw.lib
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
In #1100, [`featuresAt`](https://github.com/mapbox/mapbox-gl-draw/blob/d7234ee463b9d0259a117a083fa946c2a284467e/src/lib/features_at.js) was exposed through [`MapboxDraw.lib`](https://github.com/mapbox/mapbox-gl-draw/blob/d7234ee463b9d0259a117a083fa946c2a284467e/src/lib/index.js#L30), but `featuresAt` functions get `ctx` as input, and `ctx` is an internal object. Either `featuresAt` should be removed from `lib`, or it should be exposed differently.
@joel-daros [encountered this](https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/64239#discussioncomment-4918380) while writing the typings for `lib`.
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
Review src/lib/features_at.js and the MapboxDraw.lib export in src/lib/index.js, then compare the public API concern with the linked DefinitelyTyped discussion. Decide how featuresAt should be represented without exposing the internal ctx object, and confirm that the resulting public surface and typings no longer require consumers to use ctx directly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100