feature request: schema variable support
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11.9k
- Forks
- 1.5k
- Avg merge
- 17h 55m
- Merged PRs (30d)
- 3
Description
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"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository's handling of the {% schema %} block and the variable approaches described in the issue. Done would mean a defined, tested way to reuse option data inside schema JSON without duplicating large lists or exceeding the app block size limit.
Written by the indexing model from the issue text.
Assessment
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100