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 PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |
|
/snapit |
|
🫰✨ Thanks @graygilmore! Your snapshot has been published to npm. Test the snapshot by installing your package globally: npm i -g --@shopify:registry=https://registry.npmjs.org @shopify/cli@0.0.0-snapshot-20260313175328Caution After installing, validate the version by running |
|
🤔 I was unable to 🎩 this. Maybe a rebase with |
aswamy
left a comment
There was a problem hiding this comment.
Tophatted. Same issue as Gray.
Access to resource at 'http://localhost:9292/' from origin 'https://online-store-web.shopifyapps.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
|
This PR seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. |
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