Skip to content

Deploy to prod#46

Merged
SewerynKras merged 12 commits into
mainfrom
develop
May 18, 2026
Merged

Deploy to prod#46
SewerynKras merged 12 commits into
mainfrom
develop

Conversation

@SewerynKras
Copy link
Copy Markdown
Collaborator

No description provided.

marcos-golem and others added 12 commits May 15, 2026 11:36
Adds an inline DOMContentLoaded script to the head array that delegates
click events on Starlight's .copy buttons and fires window.umami?.track
with page, section (nearest preceding heading id, falls back to "intro"),
and lang (stripped from the code element's language-* class).
Adds an inline DOMContentLoaded script to the head array that attaches
a debounced (400ms) input listener to Starlight's Pagefind search input.
Sanitizes query text (strips email-shaped strings and 0x wallet addresses),
resolves hasResults from the visible result list, and fires
window.umami?.track('docs-search', { query, hasResults }). No-ops when
the sanitized query is empty or Umami is absent.
Pagefind's query pipeline (fetch shards → WASM → render) can outlast the
400 ms input debounce, causing a synchronous read of the results container
to report hasResults=false when results are still rendering. Replace the
fixed-timer read with a MutationObserver on .pagefind-ui__results: the
event fires once the result DOM settles (150 ms after the last mutation),
so hasResults reflects the actual outcome. A 2 s safety timeout fires the
event anyway if no mutations arrive (empty result set, Pagefind error).
The observer is disconnected after firing so each query produces exactly
one event.
Renames the "Explorer" action button to "Block Explorer" for clarity and
adds a new "Entity Explorer" button linking to https://data.arkiv.network,
placed directly after Block Explorer so both explorers sit together before
"Add Network to Wallet".
Restructure into three task-focused sections (query editor, searching
for entities/owners, sharing results) and drop UI-narration sections
flagged in PR #45. Fix query syntax link to point at the JSON-RPC
reference. Add a landing-screen screenshot below the intro.
- code-copied: switch to button[data-code] selector; read lang from
  pre[data-language] (Expressive Code puts it there, not a class on code);
  add window.__copyAnalyticsBound guard for view-transition re-runs
- docs-search: drop MutationObserver machinery; use plain 600ms debounce;
  match input via classList.contains('pagefind-ui__search-input') (type=text,
  not type=search); add window.__searchAnalyticsBound guard
- sanitization: redact with labeled tokens ([email], [bearer], etc.) instead
  of stripping; expand patterns to cover bearer tokens, JWTs, api keys, UUIDs,
  unix/windows paths, IPv4, hex addresses, cc-like numbers; emit redacted bool
  and redactionTypes string as extra event properties

Snippets provided and tested by SewerynKras; escaping adapted for JS
template literal context in astro.config.mjs.
docs: add Data Explorer page, Entity Explorer button, UTM tracking
feat(analytics): add code-copied and docs-search Umami events
@SewerynKras SewerynKras merged commit 577907d into main May 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants