Storefront template docs: close documentation gaps#11
Conversation
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>
Addresses review feedback: cart, line, subscription_group, and user objects removed from template documentation. These represent per-user data that is incompatible with full-page caching (keyed by URL + language + currency). All cart and user interactions must use the Storefront GraphQL API via client-side JavaScript. Kept cache-safe objects: session (product pricing), variant_form, filters (URL-param driven, public data). Added prominent callout directing developers to GraphQL API for cart and user data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Other Observations
Files Reviewed (6 files)
All changes are documentation improvements: typo fixes, new API documentation, and structural enhancements. No issues found. 🤖 Generated with Claude Code Reviewed by minimax-m2.5-20260211 · 207,265 tokens |
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 buildingrender_field/annotate_form_field— form rendering helperspurchase_info_for_line— cart line pricing (complements existingpurchase_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 bypurchase_info_for_product(price + availability)variant_form— product variant selectionfilters— category page faceting (price_range, boolean, list types)subscription_group— subscription cart groupingsuser— authentication stateFilters added (2)
currency— price formatting (used on every price display, was completely undocumented)split— string splittingURLs added
templates/index.html)cart:add,cart:saved,cart:vouchers-add,cart:vouchers-remove)customer:login,customer:logout,customer:summary,customer:support-ticket-create)set_language,core:set-currency,core:set-storefront)storefrontapi:graphql)Structural improvements
Fixes
/docs/storefront/api→/docs/storefront/graphqlin cdn-and-caching.mdxsupport:cateogry-list→support:category-listfilters.mdadded tometa.jsonpages 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
npm run dev) with no errors🤖 Generated with Claude Code