Open miazbikowski opened 3 days ago
@navdeep5 just warned me that copy+pasting the same schema code from my tests didn't work in the f5 vs code instance (which is weird, since, tests pass with the same schema) so I'm definitely going to look into that shortly
@navdeep5 just warned me that copy+pasting the same schema code from my tests didn't work in the f5 vs code instance (which is weird, since, tests pass with the same schema) so I'm definitely going to look into that shortly
Yeah, it early returns since validSchema
is false and contains an error -- so the check does not run. It thinks block_order
is not a valid property within nested blocks.
What are you adding in this PR?
Solves https://github.com/Shopify/theme-tools/issues/590
When presets have blocks as a hash, they must also be included in the
block_order
array... Unless they are a static block (a block withstatic: true
), then they have to NOT be included in theblock_order
.Note: this check doesn't validate the existence of
block_order
, it assumes it's there to run this check.To test:
What's next? Any followup issues?
Does JSON Schema enforce that
block_order
is present when dealing with preset blocks as a hash? If not, this should be added.What did you learn?
To use CP's new building blocks :)
Before you deploy
changeset
allChecks
array insrc/checks/index.ts
yarn build
and committed the updated configuration filestheme-app-extension.yml
configchangeset
changeset