Skip to content

Commit

Permalink
fixes #189 and #175
Browse files Browse the repository at this point in the history
Co-Authored-By: David Warrington <[email protected]>
  • Loading branch information
panoply and davidwarrington committed Jun 14, 2024
1 parent c4c9261 commit 0000cb5
Showing 1 changed file with 60 additions and 6 deletions.
66 changes: 60 additions & 6 deletions extension/data/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ export const schema = {
}
}
},
"@app": {
"title": "App",
"markdownDescription": "App block wrapperAnchor link to section titled **\"App block wrapper\"**. Merchants can add app blocks to a page in the following ways:\n\n- As a block within the confines of the section that's rendering the block\n- In a similar manner to sections, giving them the full width of the page to render content\n\nAs app blocks aren't sections themselves, Shopify wraps these full-width app blocks in a platform-generated section by default. However, you can override this default section by creating your own section called apps.liquid.\n\nThe `apps.liquid` section schema needs to include a block of type `@app`, as well as a `preset`. If either of these is missing, then an `Apps not supported` or `Apps section is invalid` error is returned in the theme editor and merchants aren't able to use the section.\n\n> **CAUTION**\n>\n> The `apps.liquid` section schema can't contain the `templates` schema attribute. This also includes the `templates` attribute within the `enabled_on/disabled_on` schema attributes. It's expected that the `apps.liquid` section is available on all templates.\n\n**Example**\n\n```liquid\n\n{% for block in section.blocks %}\n {% render block %}\n{% endfor %}\n\n{% schema %}\n {\n \"name\": \"App wrapper\",\n \"settings\": [],\n \"blocks\": [\n {\n \"type\": \"@app\"\n }\n ],\n \"presets\": [\n {\n \"name\": \"App wrapper\"\n }\n ]\n }\n{% endschema %}\n\n\n```\n\n#\n\n---\n\n[Shopify Documentation](https://shopify.dev/docs/storefronts/themes/architecture/blocks/app-blocks#app-block-wrapper)\n"
},
"content": {
"required": [
"content"
Expand Down Expand Up @@ -463,7 +467,7 @@ export const schema = {
},
"video_url": {
"required": [
"accepts"
"accept"
],
"type": "object",
"properties": {
Expand Down Expand Up @@ -501,6 +505,13 @@ export const schema = {
],
"markdownDescription": "The setting type, which can be any of the [basic](https://shopify.dev/docs/themes/architecture/settings/input-settings#basic-input-settings) or [specialized](https://shopify.dev/docs/themes/architecture/settings/input-settings#specialized-input-settings) input setting types.\n\n**Basic input settings**\n\nAnchor link to section titled \"Basic input settings\" The following are the basic input setting types:\n\n- [checkbox](https://shopify.dev/docs/themes/architecture/settings/input-settings#checkbox)\n- [number](https://shopify.dev/docs/themes/architecture/settings/input-settings#number)\n- [radio](https://shopify.dev/docs/themes/architecture/settings/input-settings#radio)\n- [range](https://shopify.dev/docs/themes/architecture/settings/input-settings#range)\n- [select](https://shopify.dev/docs/themes/architecture/settings/input-settings#select)\n- [text](https://shopify.dev/docs/themes/architecture/settings/input-settings#text)\n- [textarea](https://shopify.dev/docs/themes/architecture/settings/input-settings#textarea)\n\n\n**Specialized input settings**\n\nAnchor link to section titled \"Specialized input settings\" The following are the specialized input setting types:\n\n- [article](https://shopify.dev/docs/themes/architecture/settings/input-settings#article)\n- [blog](https://shopify.dev/docs/themes/architecture/settings/input-settings#blog)\n- [collection](https://shopify.dev/docs/themes/architecture/settings/input-settings#collection)\n- [collection_list](https://shopify.dev/docs/themes/architecture/settings/input-settings#collection_list)\n- [color](https://shopify.dev/docs/themes/architecture/settings/input-settings#color)\n- [color_background](https://shopify.dev/docs/themes/architecture/settings/input-settings#color_background)\n- [color_scheme](https://shopify.dev/docs/themes/architecture/settings/input-settings#color_scheme)\n- [color_scheme_group](https://shopify.dev/docs/themes/architecture/settings/input-settings#color_scheme_group)\n- [font_picker](https://shopify.dev/docs/themes/architecture/settings/input-settings#font_picker)\n- [html](https://shopify.dev/docs/themes/architecture/settings/input-settings#html)\n- [image_picker](https://shopify.dev/docs/themes/architecture/settings/input-settings#image_picker)\n- [inline_richtext](https://shopify.dev/docs/themes/architecture/settings/input-settings#inline_richtext)\n- [link_list](https://shopify.dev/docs/themes/architecture/settings/input-settings#link_list)\n- [liquid](https://shopify.dev/docs/themes/architecture/settings/input-settings#liquid)\n- [page](https://shopify.dev/docs/themes/architecture/settings/input-settings#page)\n- [product](https://shopify.dev/docs/themes/architecture/settings/input-settings#product)\n- [product_list](https://shopify.dev/docs/themes/architecture/settings/input-settings#product_list)\n- [richtext](https://shopify.dev/docs/themes/architecture/settings/input-settings#rich_text)\n- [url](https://shopify.dev/docs/themes/architecture/settings/input-settings#url)\n- [video](https://shopify.dev/docs/themes/architecture/settings/input-settings#video)\n- [video_url](https://shopify.dev/docs/themes/architecture/settings/input-settings#video_url)\n\n#\n\n---\n\n[Shopify Documentation](https://shopify.dev/themes/architecture/sections/section-schema#default)\n",
"oneOf": [
{
"enum": [
"@app"
],
"title": "App",
"markdownDescription": "App block wrapperAnchor link to section titled **\"App block wrapper\"**. Merchants can add app blocks to a page in the following ways:\n\n- As a block within the confines of the section that's rendering the block\n- In a similar manner to sections, giving them the full width of the page to render content\n\nAs app blocks aren't sections themselves, Shopify wraps these full-width app blocks in a platform-generated section by default. However, you can override this default section by creating your own section called apps.liquid.\n\nThe `apps.liquid` section schema needs to include a block of type `@app`, as well as a `preset`. If either of these is missing, then an `Apps not supported` or `Apps section is invalid` error is returned in the theme editor and merchants aren't able to use the section.\n\n> **CAUTION**\n>\n> The `apps.liquid` section schema can't contain the `templates` schema attribute. This also includes the `templates` attribute within the `enabled_on/disabled_on` schema attributes. It's expected that the `apps.liquid` section is available on all templates.\n\n**Example**\n\n```liquid\n\n{% for block in section.blocks %}\n {% render block %}\n{% endfor %}\n\n{% schema %}\n {\n \"name\": \"App wrapper\",\n \"settings\": [],\n \"blocks\": [\n {\n \"type\": \"@app\"\n }\n ],\n \"presets\": [\n {\n \"name\": \"App wrapper\"\n }\n ]\n }\n{% endschema %}\n\n\n```\n\n#\n\n---\n\n[Shopify Documentation](https://shopify.dev/docs/storefronts/themes/architecture/blocks/app-blocks#app-block-wrapper)\n"
},
{
"enum": [
"text"
Expand Down Expand Up @@ -996,9 +1007,45 @@ export const schema = {
]
},
"else": {
"required": [],
"$comment": "Shared Section Schema $ref (references) will be inserted here",
"$ref": "#/definitions/shared_settings"
"if": {
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"enum": [
"@app"
]
}
}
},
"then": {
"allOf": [
{
"if": {
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"const": "@app",
"markdownDescription": "App block wrapperAnchor link to section titled **\"App block wrapper\"**. Merchants can add app blocks to a page in the following ways:\n\n- As a block within the confines of the section that's rendering the block\n- In a similar manner to sections, giving them the full width of the page to render content\n\nAs app blocks aren't sections themselves, Shopify wraps these full-width app blocks in a platform-generated section by default. However, you can override this default section by creating your own section called apps.liquid.\n\nThe `apps.liquid` section schema needs to include a block of type `@app`, as well as a `preset`. If either of these is missing, then an `Apps not supported` or `Apps section is invalid` error is returned in the theme editor and merchants aren't able to use the section.\n\n> **CAUTION**\n>\n> The `apps.liquid` section schema can't contain the `templates` schema attribute. This also includes the `templates` attribute within the `enabled_on/disabled_on` schema attributes. It's expected that the `apps.liquid` section is available on all templates.\n\n**Example**\n\n```liquid\n\n{% for block in section.blocks %}\n {% render block %}\n{% endfor %}\n\n{% schema %}\n {\n \"name\": \"App wrapper\",\n \"settings\": [],\n \"blocks\": [\n {\n \"type\": \"@app\"\n }\n ],\n \"presets\": [\n {\n \"name\": \"App wrapper\"\n }\n ]\n }\n{% endschema %}\n\n\n```\n\n#\n\n---\n\n[Shopify Documentation](https://shopify.dev/docs/storefronts/themes/architecture/blocks/app-blocks#app-block-wrapper)\n"
}
}
},
"then": {
"$ref": "#/definitions/@app"
}
}
]
},
"else": {
"required": [],
"$comment": "Shared Section Schema $ref (references) will be inserted here",
"$ref": "#/definitions/shared_settings"
}
}
},
"defaultSnippets": [
Expand All @@ -1009,6 +1056,13 @@ export const schema = {
"${1|$ref|}": "^$2"
}
},
{
"label": "App",
"markdownDescription": "App block wrapperAnchor link to section titled **\"App block wrapper\"**. Merchants can add app blocks to a page in the following ways:\n\n- As a block within the confines of the section that's rendering the block\n- In a similar manner to sections, giving them the full width of the page to render content\n\nAs app blocks aren't sections themselves, Shopify wraps these full-width app blocks in a platform-generated section by default. However, you can override this default section by creating your own section called apps.liquid.\n\nThe `apps.liquid` section schema needs to include a block of type `@app`, as well as a `preset`. If either of these is missing, then an `Apps not supported` or `Apps section is invalid` error is returned in the theme editor and merchants aren't able to use the section.\n\n> **CAUTION**\n>\n> The `apps.liquid` section schema can't contain the `templates` schema attribute. This also includes the `templates` attribute within the `enabled_on/disabled_on` schema attributes. It's expected that the `apps.liquid` section is available on all templates.\n\n**Example**\n\n```liquid\n\n{% for block in section.blocks %}\n {% render block %}\n{% endfor %}\n\n{% schema %}\n {\n \"name\": \"App wrapper\",\n \"settings\": [],\n \"blocks\": [\n {\n \"type\": \"@app\"\n }\n ],\n \"presets\": [\n {\n \"name\": \"App wrapper\"\n }\n ]\n }\n{% endschema %}\n\n\n```\n\n#\n\n---\n\n[Shopify Documentation](https://shopify.dev/docs/storefronts/themes/architecture/blocks/app-blocks#app-block-wrapper)\n",
"body": {
"type": "@app"
}
},
{
"label": "Text",
"markdownDescription": "A setting of type `text` outputs a single-line text field. In addition to the [standard attributes](https://shopify.dev/themes/architecture/settings/input-settings#standard-attributes) of an input setting.\n\nWhen accessing the value of a `text` type setting, data is returned as one of the following:\n\n- A [string](https://shopify.dev/api/liquid/basics#types).\n- An [empty object](https://shopify.dev/api/liquid/basics#empty), if nothing has been entered.\n\n#\n\n---\n\n\n[Shopify Documentation](https://shopify.dev/themes/architecture/settings/input-settings#text)\n\n\n",
Expand Down Expand Up @@ -1305,8 +1359,8 @@ export const schema = {
"type": "video_url",
"id": "$1",
"label": "${1/([^_]+)(_*)/${1:/capitalize}${2:+ }/g}$2",
"accepts": [
"^3"
"accept": [
"^$3"
]
}
}
Expand Down

0 comments on commit 0000cb5

Please sign in to comment.