Theme check for settings keys inside presets and default #742
+470
−15
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.
What are you adding in this PR?
Fixes #624
Fixes #602
Shoutout to @AribaRajput for creating the initial PR to get this done quickly
What's next? Any followup issues?
How to test
NOTE: This check DOES NOT check if the theme block exists or not. That is the responsibility of another theme check. I have noticed a bug where if you have local blocks, and there are references to local blocks that dont exist within
presets
anddefault
, no theme check error is thrown. I will fix that in a following PR.Testing settings
presets.[].settings
anddefault.settings
that has keys that match thesettings.id
defined above. Create some that don't. See error.Testing preset/default block settings defined in local block
presets.[].blocks.[].settings
anddefault.blocks.[].settings
that has keys that match thesettings.id
defined above. Create some that don't. See error.Testing preset/default block settings defined in theme block
presets.[].blocks.[].settings
anddefault.blocks.[].settings
that has keys that match thesettings.id
defined in the block file being referenced. Create some that don't. See error.Before you deploy
changeset