These docs are a work in progress and may not be fully up to date. Some pages may contain internal notes for our team.
Skip to Content

Decision: Two widget versions coexist

Status: accepted — ext/2 is current; ext/1 kept for backward compatibility

Context

The embeddable widget is served from cdn.locationfinders.com. Two major versions exist under dropafinder-app-external/:

  • ext/1 — Svelte 4, Leaflet maps. The original production widget. Customers who embedded DropAFinder before the ext/2 launch load this version via snippet.js (the root loader).
  • ext/2 — Svelte 5, MapLibre GL. The current widget. Supports advanced features: tile-based maps, advanced refinements, all new design tokens.

The root snippet.js loader at the CDN root determines which runtime to load. At time of writing it loads ext/2.

Decision

Both ext/1 and ext/2 are kept building and deployed to R2. The rationale:

  1. No forced migration — customers who embedded their finder using an older snippet URL (or a hardcoded ext/1 path) continue to get a working widget without any action required on their part.
  2. No migration tooling exists — there is no automated way to identify which live customer sites are still loading ext/1, so a hard cutoff would break embeds silently.
  3. Low ongoing cost — ext/1 is stable and not actively extended; maintaining its build pipeline costs less than the support burden of broken embeds.

The root snippet.js has been updated to import ext/2/snippet.js with an absolute CDN URL to avoid cross-origin module resolution issues.

Consequences

For contributors:

  • All new widget development happens in ext/2/source/. Do not add features to ext/1.
  • Security fixes that affect core widget logic may need to be applied to both versions.
  • The deploy script (deploy-r2.mjs) uploads both snippet.js (root) and ext/2/snippet.js. ext/1 has its own deploy target.

Ongoing costs:

  • Two build pipelines to maintain.
  • Any ext/1 customer wanting new features (advanced refinements, MapLibre map styles) must re-embed using the new snippet URL. There is currently no in-product nudge to do so.

Supersession plan: When ext/1 CDN traffic falls below a defined threshold, ext/1 can be removed from the build and deploy pipeline. The threshold is not yet defined.