Skip to content

fix(templates): expose custom data tokens globally - #371

Draft
DavidBabinec wants to merge 1 commit into
mainfrom
fix/global-data-tokens
Draft

fix(templates): expose custom data tokens globally#371
DavidBabinec wants to merge 1 commit into
mainfrom
fix/global-data-tokens

Conversation

@DavidBabinec

Copy link
Copy Markdown
Contributor

What changed

  • expose rows from non-system custom data tables in the binding picker on ordinary pages
  • persist bindings as {data.<rowId>.<fieldId>} and resolve them in canvas previews, static publishes, holes, and infinite-loop fragments
  • prefetch only referenced custom rows and snapshot their current live cells during Site publish
  • document the binding source and add picker, token-engine, repository, and public-rendering regressions

Why

Custom data tables are the natural home for shared values such as a GitHub star count, but their rows were not available outside loop or post-type template scopes. Plain custom-data rows are also deliberately non-versioned, so the publisher must read their live cells rather than look for an active published row version.

User impact

Authors can insert a custom-data value into any compatible property and reuse it across ordinary pages. The canvas and published site resolve the same value; a later data change is included by the next Site publish.

Verification

  • bun test (6,621 pass)
  • bun run build
  • bun run lint
  • bunx tsc -b --pretty false
  • disposable local browser E2E: create table/row, insert token on homepage, verify all canvas frames, publish, verify anonymous homepage

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.

1 participant