Open
Description
Describe the bug
A setting of type select
should throw errors if the label
of its options
don't exist. Right now we have no support for those.
Looks like that's also a problem for a preset's category
field
Source
{% schema %}
{
"name": "t:general.group",
"blocks": [{ "type": "@theme" }],
"settings": [
{
"type": "select",
"id": "layout_direction",
"label": "t:labels.layout_direction",
"options": [
{ "value": "group--horizontal", "label": "t:options.direction.horizontal" },
{ "value": "group--vertical", "label": "t:options.direction.vertical" }
],
"default": "group--vertical"
},
{
"type": "select",
"id": "alignment",
"label": "t:labels.alignment",
"options": [
{ "value": "group--left-aligned", "label": "t:options.alignment.left" },
{ "value": "group--center-aligned", "label": "t:options.alignment.center" },
{ "value": "group--right-aligned", "label": "t:options.alignment.right" }
],
"visible_if": "{{ block.settings.layout_direction == 'group--vertical' }}"
},
{
"type": "range",
"id": "padding",
"label": "t:labels.padding",
"default": 0,
"min": 0,
"max": 100,
"step": 1,
"unit": "px",
}
],
"presets": [
{
"name": "t:general.column",
"category": "t:categories.alignment.left",
"settings": {
"layout_direction": "group--vertical",
"alignment": "group--left-aligned",
"padding": 0
}
},
{
"name": "t:general.row",
"category": "t:categories.layout",
"settings": {
"layout_direction": "group--horizontal",
"padding": 0
}
}
]
}
{% endschema %}
Expected behaviour
I got a couple of things in there that should show errors because the labels don't exist.
Actual behaviour
name
properties seem to be linted OK.
label
inside select options doesn't.
category
inside preset doesn't`
Debugging information
- OS [e.g. Windows, Mac, Linux]
- OS Version
- Theme Check Version [e.g. 0.1.0]
Additional context
Add any other context about the problem here.