Skip to content

Commit 8186563

Browse files
authored
Merge pull request #927 from Shopify/miaz/allow-category-on-presets
Allow 'category' on presets
2 parents 840baac + 62dee8d commit 8186563

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

schemas/theme/preset.json

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
"description": "The preset name, which will show in the 'Add section' or 'Add block' picker of the theme editor.",
2020
"markdownDescription": "The preset name, which will show in the 'Add section' or 'Add block' picker of the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#presets)"
2121
},
22+
"category": {
23+
"type": "string",
24+
"description": "The category of the preset, which will show in the 'Add section' or 'Add block' picker of the theme editor.",
25+
"markdownDescription": "The category of the preset, which will show in the 'Add section' or 'Add block' picker of the theme editor.\n\n---\n\n[Shopify reference](https://shopify.dev/docs/themes/architecture/sections/section-schema#presets)"
26+
},
2227
"settings": {
2328
"$ref": "./default_setting_values.json"
2429
}
@@ -33,6 +38,7 @@
3338
],
3439
"properties": {
3540
"name": true,
41+
"category": true,
3642
"settings": true,
3743
"blocks": {
3844
"$ref": "./preset_blocks.json#/definitions/blocksArray"

tests/fixtures/section-schema-1.json

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"presets": [
7373
{
7474
"name": "t:sections.announcement-bar.presets.name",
75+
"category": "t:sections.announcement-bar.presets.category",
7576
"blocks": [
7677
{
7778
"type": "announcement"

tests/fixtures/theme-block-basics.json

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"presets": [
1919
{
2020
"name": "preset name",
21+
"category": "The Category",
2122
"settings": {
2223
"number": 1
2324
},

0 commit comments

Comments
 (0)