We were getting errors in the design system tool due to old syntax stops and other assumptions about which layer properties would exist per layer. This PR makes some of our checks safer and starts to handle some refactoring to reduce duplication. I kept this scoped per conversation since it is not the highest priority.
There's still more refactoring to do as well as more checks for safety we need, but these changes should help to set us up to handle this incrementally without so much duplication between fill and line tabs that could diverge. As far as refactoring here this PR mostly moves existing code that is obviously duplicative as-is into shared files.
Closes https://github.com/stamen/carto-tools/issues/3
We were getting errors in the design system tool due to old syntax stops and other assumptions about which layer properties would exist per layer. This PR makes some of our checks safer and starts to handle some refactoring to reduce duplication. I kept this scoped per conversation since it is not the highest priority.
There's still more refactoring to do as well as more checks for safety we need, but these changes should help to set us up to handle this incrementally without so much duplication between fill and line tabs that could diverge. As far as refactoring here this PR mostly moves existing code that is obviously duplicative as-is into shared files.
Also, just noting that some styles will show a lot of blank space until we handle https://github.com/stamen/mapbox-gl-style-design-system/issues/21 and this is a missing feature, not a bug.