Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Style is reformatted and gl-style-format is not used #591

Closed
pathmapper opened this issue Dec 13, 2019 · 2 comments
Closed

Desktop: Style is reformatted and gl-style-format is not used #591

pathmapper opened this issue Dec 13, 2019 · 2 comments

Comments

@pathmapper
Copy link
Contributor

When a style is exported with the online version, the style is formatted with gl-style-format.

This is useful for unification of styles, especially when making PRs to style repositories, see openmaptiles/osm-bright-gl-style#24.

When a style is modified with Maputnik Desktop, currently gl-style-format is not used and the style is reformatted somehow, see maputnik/osm-liberty#66.

Maybe we could add gl-style-format to Desktop or at least make sure that an already with gl-style-format formatted style is not altered when edited with Desktop.

@lukaswelte any thoughts?

@kylebarron
Copy link

As a follow up, it looks like format is only invoked when the style is exported.
https://github.com/maputnik/editor/blob/3c93c41de1e1a38bba288c13a41afd1d213defbf/src/components/modals/ExportModal.jsx#L40

So when Maputnik desktop is used with

maputnik --watch --file style.json

any edits aren't formatted, since the style is auto updated on change, and the Export button is never used.

@pathmapper
Copy link
Contributor Author

With Maputnik Desktop v1.7.0 the style is formatted properly (#606).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants