mapbox / mapbox/mapbox-gl-draw
Merge passed styles rather than overwriting
Open
Nobody has claimed this yet.
feature
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
Expected Behavior
It takes a pretty long list of styles to generate a usable ux. Instead of overwriting all defaults with xtend, it would be helpful to optionally merge a few changes into the set.
Actual Behavior
Default styles lib/theme.js are completely replaced if anything is passed for styles:.
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 in lib/theme.js and inspect how xtend handles the styles option. Trace the default-style setup, then verify that passing selected styles preserves unspecified defaults while overriding only the supplied values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100