Repository navigation
Engine v1.0.24
Promotes the point chip's share surface into the engine and modernizes it: ONE "Share" button replaces the old Copy-link / Embed pill pair, and every URL it hands out now carries campaign tags for traffic attribution. Two changed blocks (permalink, styles-app), no new blocks — adopting forks need no fence seeding, but the wiring is one deliberate out-of-fence line, stated plainly below (the v1.0.22 lesson: say what the bump alone does not do).
Why. "Copy link" named the mechanism and hid the outcome — next to the chip's lat,lng readout it read as "copy these coordinates" as easily as "share this view", and the tooltip that explained it doesn't exist on touch. "Embed" wrote HTML to the clipboard sight unseen. The modern shape restores the missing altitude: Share (intent) opens a surface that names each mechanism's outcome.
-
Changed
permalink: the share-controls suite —buildShareControl()(the chip button + popover),shareLinkUrl()/buildEmbedSnippet()/shareCoordsText()(values built at open/copy time from live state, never cached in the DOM),shareCanonicalBase()(the old fork-levelembedBaseUrl, now engine), andcopyTextToClipboard(). Touch-first devices withnavigator.shareget the platform share sheet; hover-capable devices get a popover with the permalink (readonly input, select-on-focus), the<iframe>snippet previewed before copying, and the coordinates as their own copyable row. Escape and outside-click close it;aria-haspopup/aria-expanded/role="dialog"are wired; the whole control rebuilds with the chip each selection so an open popover never outlives the point it described. Analytics event namesshare-permalinkandembed-iframeare unchanged (continuity for existing dashboards);share-open,share-native, andcopy-coordinatesare new. -
Campaign tags — the release's second purpose: shared links carry
?utm_source=share&utm_medium=linkand embed src URLs?utm_source=embed&utm_medium=iframe, inserted BEFORE the#hashso the hash router never sees them. Both analytics stacks consume them with zero code: gtag readsutm_*natively, and GoatCounter's count.js sendslocation.searchwith every hit and usesutm_sourceas the referrer — while its canonical-<link>path normalization keeps recorded paths clean, so tagging costs nothing in path stats (verified against count.js source before shipping). Organic traffic stays untagged; a re-share from a tagged page rebuilds fromorigin+pathname, so an inbound tag is never copied forward as the next reader's source. The embed snippet still targets the fork's canonicalMETRO_EXPLORERSURL, so a snippet grabbed on a preview embeds production; the share LINK keeps the old Copy-link behavior of sharing the current origin. -
Changed
styles-app: the popover styles (.share-popover*,.share-copy-btn) and one line on.selected-point-chip(position: relative, the popover's anchor). White card in--font-bodyover the dark mono chip; values inside stay--font-mono. Copy targets are comfortably larger than the old 11px pills.
Fork adoption is a bump plus ONE out-of-fence line. The engine additions are pure definitions — a fork that bumps without wiring keeps its old chip exactly as-is. To adopt, replace the chip's old copy-link/embed button construction in the fork's setSelectedPoint with pointChip.appendChild(buildShareControl()); and delete the fork-level embedBaseUrl/buildEmbedCode if it carries them (Chicago's went engine-side as shareCanonicalBase/buildEmbedSnippet). Chicago's smoke test gained a check worth porting alongside: opens the popover, asserts the tagged permalink matches the live hash, the embed snippet is tagged and canonical, and Escape closes.
No generator output shape changed — generate_metro_files.py emits exactly what it did, so bump PRs hit no --check drift.