Fix theme editor sync not reloading on schema changes#6833
Open
Fix theme editor sync not reloading on schema changes#6833
Conversation
The `--theme-editor-sync` flag was not triggering a reload in the theme customizer when making schema changes to section files. Users had to manually refresh the customizer to see schema updates. Root cause: The `@shopify/theme-hot-reload` client (v0.0.18) was only checking for `javascriptTag` changes to trigger full page reloads, but was ignoring `schemaTag` changes that the server was sending. The fix already existed upstream in v0.0.20+ (commit 4785747) which adds schemaTag handling. This bumps the dependency from ^0.0.18 to ^0.0.22. Regression introduced in: 3.88.1
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.
WHY are these changes introduced?
Closes https://github.com/Shopify/developer-tools-team/issues/1033.
When using
shopify theme dev --theme-editor-sync, making schema changes to section files (e.g., adding/modifying settings in{% schema %}blocks) did not trigger the theme customizer to reload. Users had to manually refresh the customizer to see schema updates.This is a regression since version 3.88.1.
WHAT is this pull request doing?
Bumps
@shopify/theme-hot-reloadfrom^0.0.18to^0.0.22.Root cause: The hot-reload client was only checking
javascriptTagchanges to trigger full page reloads, but ignoredschemaTagchanges that the server was already sending.The fix existed upstream in v0.0.20+ (commit 4785747 in the theme-hot-reload package), which adds:
How to test your changes?
Note: I'm currently having 1Password issues so I'm locked out of the admin and haven't been able to manually test these myself
shopify theme dev --theme-editor-syncin a theme directory{% schema %}block (e.g., add a new setting)Measuring impact
Checklist