Commit Graph

296 Commits

Author SHA1 Message Date
Daniel McGee 2abfcfa946 Update Store.vue
Adding disclaimer to Checkout and adding Handouts COllection to menu for posters flyers etc
2026-07-11 14:40:28 -04:00
Daniel McGee 5f24956784 Update Store.vue 2026-07-03 21:29:05 -04:00
Daniel McGee 160ed01e06 Update Store.vue 2026-07-01 23:00:28 -04:00
Daniel McGee 2ac998cf4c Update Store.vue 2026-07-01 22:54:57 -04:00
Daniel McGee 8b9ed178a5 Update Store.vue 2026-07-01 22:48:43 -04:00
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
Daniel McGee 2b5e1643b5 Fix cart/collection duplication and reduce empty-cart risk in Shopify embed
Root causes:
- updateConfig() on collection switches did not clear previously-rendered
  product tiles before adding the new collection's, so switching
  categories stacked the new grid below the old one instead of replacing
  it
- Theme toggles could fire overlapping async onReady() callbacks (if
  isDark settles in more than one tick), and the second createComponent()
  call landed on top of the first instead of replacing it, producing
  duplicate tiles
- buildClient() was being called fresh on every theme/collection change
  instead of once per page load, increasing exposure to the pre-existing
  "empty cart on page load" issue by triggering it on every toggle

Fixes:
- Add getShopifyUI() to bootstrap buildClient()/UI.onReady() exactly once
  and cache the promise; every render reuses the same client/UI going
  forward, matching original page-load behavior
- Remove the updateConfig() shortcut entirely — collection switches and
  theme changes now go through the same single render path
- Always destroyShopifyComponents() (collection plus any auto-spawned
  cart/toggle) and clear the container before rebuilding, so no stale DOM
  can persist across a switch
- Reintroduce a shopifyRenderToken guard so a stale async callback from a
  superseded render becomes a no-op instead of creating duplicate tiles

Files changed:
  src/pages/StorePage.vue
2026-07-01 22:30:23 -04:00
Daniel McGee ab571bc67b Fix Shopify embed theming: modal/cart stuck on stale theme, unreadable quantity stepper
Root cause: the cart drawer and product modal are SDK singletons attached
outside shopifyContainer, not children of it. Destroying and recreating
the collection component on theme change only rebuilt the product grid —
the cart/modal never got torn down, so they stayed frozen on whatever
theme was active the first time they rendered.

- Replace destroy-and-recreate with ui.createComponent() + updateConfig()
  on a persisted component reference, so theme changes push new options
  into the cart/modal singletons in place instead of leaving them stale
- Rename initShopify() -> renderShopify() to reflect create-or-update
  behavior
- Drop the shopifyRenderToken race guard from the previous commit — no
  longer needed since we're not destroying/rebuilding DOM on each change
- Theme quantityInput (background, text, border) in both the product tile
  and modal; it was left on the SDK's static default and stayed
  unreadable regardless of theme

Files changed:
  src/pages/StorePage.vue
2026-07-01 22:14:51 -04:00
Daniel McGee 2ea5b6cf06 Theme shop tab to match printables, add dark mode support to Shopify embed
Theme shop tab to match printables, add dark mode support to Shopify embed

Shop tab layout
- Wrap Shopify embed in v-card (elevation 2) to match printables card style
- Add skeleton loaders while the Buy Button SDK initializes
- Add subtitle blurb above the category filter, consistent with printables tab

Dark mode support
- Add useTheme() / isDark computed to track the active Vuetify theme
- Convert SHOPIFY_OPTIONS to buildShopifyOptions(dark) so all SDK-rendered
  surfaces can be re-themed on toggle
- Theme product tile background + text (previously hardcoded white text
  with no background, invisible in light mode)
- Theme product modal background (previously always rendered white
  regardless of site theme)
- Theme cart/checkout drawer background, header, line items, and footer
  (previously always rendered light mode)
- Re-run initShopify() via a watcher on isDark so the embed re-renders
  when the user toggles theme
- Round button border-radius from 0px to 4px across product, modal, and
  cart buttons for visual consistency with printables cards

Bug fixes
- Add shopifyRenderToken generation guard in initShopify() to prevent a
  race condition where overlapping calls (e.g. theme settling shortly
  after mount) could leave the product grid partially rendered with
  missing images
- Move subtitle blurb above the category filter dropdown (was below)

Files changed:
  src/pages/StorePage.vue
2026-07-01 22:05:22 -04:00
Daniel McGee 441b487f35 Attempting to theme the shopify elements like the vie elements 2026-07-01 21:50:40 -04:00
Daniel McGee 2b4f6c64d6 Update Store.vue 2026-06-27 22:49:09 -04:00
Daniel McGee 517d6b054b Update Store.vue
Changed to a 3 wide design to match the PRintables
2026-06-27 22:48:01 -04:00
Daniel McGee d7517192db Update Store.vue 2026-06-27 21:46:45 -04:00
Daniel McGee 748357886e Update Store.vue 2026-06-27 21:44:21 -04:00
Daniel McGee 2bd522fb92 Update Store.vue
Added a specific collection entry for the NOALPRS.COM Collection
2026-06-27 21:41:56 -04:00
Will Freeman 8ac38e1a6e printables -> downloads 2026-06-17 19:10:43 -06:00
Will Freeman 9797446cac move artwork submission buttno 2026-06-17 19:05:04 -06:00
Will Freeman fdf47c30ce update dmomain 2026-06-17 18:57:26 -06:00
Will Freeman 8741b518f8 router fix 2026-06-17 18:56:30 -06:00
Will Freeman f6ecb9e21a fix store 2026-06-17 18:53:15 -06:00
Will Freeman d87b6e93de store upgrades 2026-06-17 18:34:20 -06:00
Daniel McGee 7344a30583 Add Deflock Store to "hang signs" linkon the website (#116)
* Add the store code from agora.markets 

Uploads a stylesheet and store code to popluate the deflock store hosted by agora.markets

* fix store

---------

Co-authored-by: Will Freeman <hohosanta@me.com>
2026-06-17 18:01:42 -06:00
Will Freeman dafca17132 otel key fix 2026-04-29 21:42:23 -06:00
Will Freeman ec8bb9cdca remove spans, log geocoding shit bc of cost 2026-04-29 21:34:51 -06:00
Will Freeman d446cfcd15 rename support page 2026-04-27 10:21:16 -06:00
Will Freeman 36a7ee12e5 update README 2026-04-26 22:53:56 -06:00
Will Freeman e8fcf30e5b New Maps (#110)
* use new df map

* close button top-right, link to same position in new map, use localStorage for modal dismissal

* update map image, iframe detection ignores new map modal

* update embed instructions

* pretty banner

* privacy policy update - routing

* launch the map language

* header stuff

* change donate link

* remove new map notice bc 301 on cf

* use user agent for alpr_counts

* news -> footnote4a

* remove blog scraper
2026-04-26 22:13:16 -06:00
Will Freeman ae861e8e7b zip code short circuit 2026-04-26 17:14:57 -06:00
Will Freeman 3019d87f53 lower rate 2026-04-26 13:33:31 -06:00
Will Freeman a39f1a6a36 Add OTel (#114)
* init otel

* deflock group

* no internal metrics

* only log errors for now
2026-04-26 13:20:32 -06:00
Will Freeman c99d4cf597 include address in Nominatim result (for new map) 2026-04-24 09:55:02 -06:00
Will Freeman b0d1e5299d add customer before creating ticket 2026-04-23 09:43:18 -06:00
Will Freeman 7cf14e6e92 media@deflock.org on press page, groups link to populated contact form 2026-04-21 16:44:00 -06:00
Will Freeman 5316246c0e Contact Form (#113)
* contact form on frontend

* note about reporting cameras via email

* cleanup
2026-04-21 12:16:18 -06:00
Will Freeman 7c27235400 zip code fix (#112) 2026-04-21 11:49:46 -06:00
Will Freeman c298a3f5d4 create helpdesk tickets from form submission (#111) 2026-04-21 11:36:24 -06:00
Will Freeman deafac1a9e pretty banner 2026-04-19 16:37:00 -06:00
Will Freeman 337872f525 week of action banner 2026-04-19 15:39:08 -06:00
Will Freeman 27f57399d6 add CORS for maps.deflock.rog 2026-04-19 15:31:13 -06:00
Will Freeman 64ac4c227e Multi Geocode (#109)
* multi-geocode for new map

* backward compatibility w/ city polygon
2026-04-19 15:28:05 -06:00
Jeff W 2be27e551a Add option to fill area outside boundary. (#107) 2026-04-01 17:04:18 -06:00
Will Freeman 959b5cdb78 update user agent so less sites block us 2026-03-05 11:01:38 -07:00
Will Freeman 8bad24ad04 update groups page 2026-03-05 08:44:38 -07:00
Will Freeman 71cfc47c16 update media email 2026-03-01 19:03:11 -07:00
Will Freeman de21419a2a update email address 2026-03-01 18:54:41 -07:00
Will Freeman a35ef7c48d directus extension for auto-populating CMS with recent wins given url, link to wins 2026-02-26 19:26:25 -07:00
Will Freeman 33c5944466 use new cms collection 2026-02-25 09:12:10 -07:00
Will Freeman d867624770 use new cms colleciton 2026-02-25 09:08:23 -07:00
Will Freeman e4b3a9bee6 automatically import recent win to cms - pending switch collection 2026-02-25 08:50:28 -07:00
Will Freeman c077fee503 service alerts 2026-02-24 09:58:57 -07:00