Unhelpful warning message for 'Unable to perform style diff'
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: 0.45.0
**browser**: Google Chrome
### Steps to Trigger Behavior
1.Load https://jsfiddle.net/3s8gdhwr/
2.Open **Dev Tools**
*Outcome:* You will get an unhelpful warning message. Now, remove **interactive** property from any layer, warning goes away.
It's great that the style is being diff'ed, it would be really nice if the warning could lead you to the actual culprit, it is the message that could be improved.
`Unable to perform style diff: Unimplemented: setLayerProperty, setLayerProperty.. Rebuilding the style from scratch`.
Okay, good to be warned, but **what am I being warned about?**, I took it that mapbox have yet to implement the `setLayerProperty` function, but that was completely wrong. In my case, the root cause of the warning was, an obsolete layer property (**interactive**) was being set, Why not say that, at least identify the property/value being set, then the developer can check if that property value is valid, against the spec. It might even be better to just output the full command that failed.
### Link to Demonstration
https://jsfiddle.net/3s8gdhwr/
### Expected Behavior
### Actual Behavior
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
Reproduce the warning from the linked JSFiddle by opening Chrome DevTools and removing the interactive property from a layer to compare the behavior. Trace the style-diff warning from the reported "Unable to perform style diff" message, then verify that the warning identifies the invalid property or operation and remains understandable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100