Shopify / theme-tools

Everything developer experience for Shopify themes
https://shopify.dev/docs/themes
MIT License
80 stars 24 forks source link

`settings.type` bug fix #611

Open navdeep5 opened 6 days ago

navdeep5 commented 6 days ago

What are you adding in this PR?

Resolves https://github.com/Shopify/theme-tools/issues/605 and https://github.com/Shopify/theme-tools/issues/608

This PR is meant to ensure that checks do not blow up existent themes. To do so, we are adding preliminary checks to make sure that we are only using theme blocks, and if so, proceed with the checks.

What's next? Any followup issues?

There are a couple directions in which we can follow up with this issue. 1) Right now, we are only checking preset blocks at the first level (not nested levels). The reason being is that nested preset checks will require cross file validation which would we should follow up on. 2) Once content with these changes, worthwhile to change the check recommendations to true.

What did you learn?

I learned about the difference between how older and newer (with theme block) themes are written, as well as more information about nested preset blocks and how their validation needs to occur.

Before you deploy