Skip to content

Load remote Liquid docs in browser extension#1016

Draft
charlespwd wants to merge 1 commit into
fix/theme-liquid-docs-bundle-clifrom
fix/theme-liquid-docs-web-remote-updates
Draft

Load remote Liquid docs in browser extension#1016
charlespwd wants to merge 1 commit into
fix/theme-liquid-docs-bundle-clifrom
fix/theme-liquid-docs-web-remote-updates

Conversation

@charlespwd

@charlespwd charlespwd commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

What are you adding in this PR?

Related issue: Shopify/developer-tools-team#783

Stacked on #1240.

Updates the browser Shopify Liquid extension to load Liquid docs from a remote JSON bundle at runtime, while keeping the webpack-bundled docs as the emergency fallback.

Default behavior:

/liquid-docs/v1/latest.json

latest.json can either be the full bundle or point at a revisioned bundle:

{
  "schemaVersion": 1,
  "revision": "40f966fc7793462726d9f8573c8d522f8ab44c54",
  "url": "/liquid-docs/v1/revisions/40f966fc7793462726d9f8573c8d522f8ab44c54.json"
}

For hosts that cannot serve same-origin docs, the browser extension now supports an optional setting:

{
  "shopifyLiquid.remoteLiquidDocsUrl": "https://code-editor.shopifycdn.com/liquid-docs/v1/latest.json"
}

The remote bundle is used only when it passes basic validation:

  • schemaVersion is supported
  • revision is present
  • tags, filters, objects, and schemas are arrays
  • systemTranslations is an object
  • the revisioned bundle URL uses the same origin as the docs index URL

If fetch or validation fails, the extension falls back to bundled docs. This keeps github.dev and other unsupported hosts functional even when remote docs are unavailable or blocked by CSP/CORS.

What's next? Any followup issues?

The host/CDN side needs to publish compatible JSON artifacts after #1240 is released and @shopify/theme-check-docs-updater includes theme-docs bundle.

No additional theme-tools follow-up is planned after that publisher exists.

Tophatting

  • pnpm --dir packages/vscode-extension type-check
  • pnpm --dir packages/vscode-extension build:extension
  • pnpm type-check
  • pnpm format:check
  • git diff --check
  • Screenshots are not applicable; this changes language-server docs loading behavior.

Before you deploy

  • I included a patch bump changeset
  • My feature is backward compatible

@charlespwd charlespwd requested a review from a team as a code owner July 23, 2025 19:59
@charlespwd charlespwd marked this pull request as draft July 23, 2025 19:59
@charlespwd charlespwd force-pushed the fix/theme-liquid-docs-web-remote-updates branch from 94aee9b to a39bb36 Compare June 19, 2026 14:13
@charlespwd charlespwd changed the title Make it possible for the browser extension to have auto-updated docs Load remote Liquid docs in browser extension Jun 19, 2026
@charlespwd charlespwd changed the base branch from main to fix/theme-liquid-docs-bundle-cli June 19, 2026 14:13
@charlespwd charlespwd force-pushed the fix/theme-liquid-docs-web-remote-updates branch from a39bb36 to 79d91b9 Compare June 19, 2026 14:55
@charlespwd charlespwd force-pushed the fix/theme-liquid-docs-web-remote-updates branch from 79d91b9 to 12981a1 Compare June 19, 2026 15:16
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