Skip to content

Storefront template docs: close documentation gaps#11

Open
next-devin wants to merge 1 commit intomainfrom
storefront-docs-gap-fixes
Open

Storefront template docs: close documentation gaps#11
next-devin wants to merge 1 commit intomainfrom
storefront-docs-gap-fixes

Conversation

@next-devin
Copy link
Contributor

Summary

Comprehensive update to storefront template documentation addressing gaps identified through a systematic audit. The existing docs covered ~40% of the template API surface area actually used by themes — this PR closes the critical gaps so a developer can build a functional theme from the docs alone.

Tags added (6)

  • cart_form — generates add-to-cart forms (every product page needs this)
  • core_js — platform core JS bundle (every theme needs this)
  • add_query_param — pagination and filter URL building
  • render_field / annotate_form_field — form rendering helpers
  • purchase_info_for_line — cart line pricing (complements existing purchase_info_for_product)

Objects added (7)

  • cart — shopping cart with all properties (totals, taxes, discounts, subscriptions)
  • line — cart line items (price, quantity, discounts)
  • session — the object returned by purchase_info_for_product (price + availability)
  • variant_form — product variant selection
  • filters — category page faceting (price_range, boolean, list types)
  • subscription_group — subscription cart groupings
  • user — authentication state

Filters added (2)

  • currency — price formatting (used on every price display, was completely undocumented)
  • split — string splitting

URLs added

  • Homepage (templates/index.html)
  • Cart actions (cart:add, cart:saved, cart:vouchers-add, cart:vouchers-remove)
  • Customer/auth (customer:login, customer:logout, customer:summary, customer:support-ticket-create)
  • Localization (set_language, core:set-currency, core:set-storefront)
  • API (storefrontapi:graphql)

Structural improvements

  • Per-template context table — maps every template to its available view-specific variables
  • Dashboard cross-reference table — maps template variables to their dashboard config paths (Settings > Branding, Storefront > Navigation, Settings > Policies, etc.)
  • Cart template context section — documents all cart-specific context variables

Fixes

  • Broken link: /docs/storefront/api/docs/storefront/graphql in cdn-and-caching.mdx
  • Typo: support:cateogry-listsupport:category-list
  • filters.md added to meta.json pages array (was missing from sidebar)

Review notes

All additions are based on actual usage patterns extracted from the Intro Bootstrap theme. Property tables, types, and descriptions reflect what templates actually consume. Code examples are copy-pasteable and follow existing doc conventions.

The gap analysis document (STOREFRONT_DOCS_GAP_ANALYSIS.md) is NOT included in this PR — it was used as the working plan and remains local only.

Test plan

  • Verify docs build (npm run dev) with no errors
  • Check new sections render correctly in sidebar and on page
  • Review property tables against actual platform behavior
  • Confirm code examples are syntactically correct
  • Verify cross-links between tags ↔ objects resolve

🤖 Generated with Claude Code

Addresses gaps in template tags, objects, filters, and URL references
for theme development. Changes include:

Tags: cart_form, core_js, add_query_param, render_field,
annotate_form_field, purchase_info_for_line

Objects: cart, line, session, variant_form, filters (faceting),
subscription_group, user, cart template context variables

Filters: currency (price formatting), split

URLs: homepage, cart actions, customer/auth, localization endpoints,
GraphQL API endpoint, typo fix (support:category-list)

Structural: per-template context table showing what variables each
view provides, dashboard cross-reference table mapping template
variables to their dashboard configuration paths

Fixes: broken /docs/storefront/api link, filters.md missing from
meta.json sidebar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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