-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Allow invalid styles and show errors #353
Comments
This issue appears in the answers to question “What annoys you about Maputnik?” in the survey (original spelling):
|
I'm all for it. This would allow also to change the source for an existing layer which is not possible currently. Would it be possible in the JSON editor to mark additionally the line(s) which is/are invalid (e.g. make the line number red)? |
Hmmm I'm not sure, but it's a good idea I'll take a look |
I like it! Maybe in addition to the layer-wide error, also highlight the field that is currently invalid. |
Closed by PR #620 |
Editing a Maputnik style can be a pain right now. In many places entering an invalid value will cause the input to get in a funny state or just refuse to let you complete the action. For example changing a color input with the value
rgba(255, 0, 0, 1)
torgb(255, 0, 0)
and you'll see the issue.Also editing a style via the JSON editor is next to impossible at the moment for similar reasons.
I think we should allow errors to be present in the style, and indicate what layers have errors.
Here's a prototype https://696-84182601-gh.circle-artifacts.com/0/artifacts/build/index.html#0.26/0/0 (working branch master...orangemug:feature/allow-invalid-values)
Below is an example where I've modified a layer
type
to be invalid,backgroun
instead ofbackground
Below is an example where I am part way through modifying a color from
hsl
tohsla
and am still missing the forth argument.Any thoughts or feedback welcome and encouraged 😄
The text was updated successfully, but these errors were encountered: