mapbox / mapbox/mapbox-gl-draw

Merge passed styles rather than overwriting

Open
#1,034 2 comments 5 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.