Skip to content
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

feature request: schema variable support #1911

Open
adtm opened this issue Feb 12, 2025 · 0 comments
Open

feature request: schema variable support #1911

adtm opened this issue Feb 12, 2025 · 0 comments

Comments

@adtm
Copy link

adtm commented Feb 12, 2025

as I'm creating Shopify blocks and there is a limit on the app block size, list settings become very cumbersome due to their size:

    {
      "type": "select",
      "id": "one",
      "label": "One",
      "options": [
        { "value": "a", "label": "A" },
        { "value": "b", "label": "B" },

if I would create 10 drop downs with A-Z selectors, they would almost hit the limit. It would be nice to create something like:

{% schema %}
{%- assign options = [...-%}
...
    {
      "type": "select",
      "id": "one",
      "label": "One",
      "options": options

a scoped variable to the schema or just somehow create:

{% schema %}
{ 
 "variables": { "options": [] }

and reference from inside the schema (probably easier if schema is a json, just search for that value inside the schema under "variables"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant