stamen / chartographer

https://stamen.github.io/chartographer/
MIT License
19 stars 4 forks source link

Fix style handling bug #25

Closed aparlato closed 2 years ago

aparlato commented 2 years ago

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.

aparlato commented 2 years ago

@ebrelsford back to you! I broke it apart a little more per suggestions. Let me know what you think!