Repository navigation
Accept fixed-value settings on inline app blocks - #1407
Open
tyleralsbury wants to merge 1 commit into
Open
tyleralsbury wants to merge 1 commit into
tyleralsbury wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow fixed-value setting arguments on canonical inline app block tags in Theme Check.
{% block 'shopify://apps/example_app/blocks/example-block/00000000-0000-4000-8000-000000000000', heading: 'Hello', enabled: true, items: ['a', 'b'] %}{% endblock %}Accepted values are strings, numbers, booleans and flat arrays of those. Dynamic sources remain supported as strings, such as
'{{ closest.product.title }}'.Expressions,
nil/null,empty/blank, namespaced setting arguments and body content remain invalid. Theme block arguments are unchanged.Implementation
LiquidSyntaxErrorimplementations.block.namebehavior.Validation
pnpm build:tspnpm exec vitest run: 8,509 passed, 5 skippedpnpm type-checkpnpm format:checkcargo test --workspace --locked: passed, including 543 parser specs, 1,859 check specs, 15 graph specs and 3,600 Liquid syntax parity casescargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningspnpm exec changeset status: valid patch release planThe specs cover accepted literals, invalid expressions and array elements, duplicate settings, namespaced arguments, body content, liquid-line tags, unchanged theme block expressions and the malformed
{% block false %}{% endblock %}negative case.