Skip to content

Add Mapbox Style validation in expert mode #557

@Bo-Duke

Description

@Bo-Duke

Currently, it is possible to save an invalid mapbox style, for example with an invalid value for the color ("#fffff" instead of "#ffffff" for example.)

Even though mapbox shows this in the browser console in Visu-Front, it might be hard to debug especially for non-dev users.

I made a small POC using mapbox-gl-style-spec, it validates a style, and if the style is provided as a multiline string, it says on which lines the errors are.

https://codesandbox.io/s/cranky-shadow-7jd654?file=/src/index.mjs

Including this in the export mode editor would be a great UX improvement and avoid lots of problems in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions