Files
deflock/webapp/src
Daniel McGee cb5a531391 Fix CLaude Hallucinations on how to re-create theming,
Accept cart/modal theme-refresh limitation per BuyButton.js docs (Option A)

Looked up the actual Shopify BuyButton.js source and docs instead of
guessing at API surface. Confirmed there is no documented destroy() or
updateConfig() method — createComponent(type, config) is the only
supported way to create or change what's rendered, and it auto-creates a
separate cart + "cart toggle" component tied to that call, not a child of
the node you pass in.

- Revert to plain clear-and-recreate (container.innerHTML + createComponent)
  for both collection switches and theme toggles — the only pattern the
  SDK actually documents
- Remove all destroy()/updateConfig()/ui.components calls added in prior
  revisions; they relied on unverified internal APIs and were producing
  empty renders more often than not
- Keep the cached client (getShopifyUI(), built once) to avoid re-risking
  the "empty cart on page load" issue on every toggle
- Keep the shopifyRenderToken guard against overlapping async renders
- Document the accepted limitation in code: product grid re-themes live
  on every toggle; cart drawer and product modal pick up a new theme on
  next page load only, since there's no documented way to re-theme those
  singletons without a full reload

Files changed:
  src/pages/StorePage.vue
2026-07-01 22:44:30 -04:00
..
2026-04-27 10:21:16 -06:00
2025-11-20 22:57:25 -07:00
2026-04-27 10:21:16 -06:00
2026-06-17 19:10:43 -06:00
2024-12-27 12:06:39 -07:00