Conversation
|
/snapit |
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260912150820",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260912150820" |
5a59c47 to
5104cfa
Compare
|
/snapit |
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260914125004",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260914125004" |
5104cfa to
ab76ca7
Compare
|
/snapit |
ab76ca7 to
6277775
Compare
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260914170119",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260914170119" |
|
/snapit |
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260914174215",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260914174215" |
6277775 to
1008f3a
Compare
|
/snapit |
1008f3a to
74f5cd9
Compare
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260914223154",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260914223154" |
|
/snapit |
74f5cd9 to
ab8a211
Compare
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260915001551",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260915001551" |
|
/snapit |
ab8a211 to
25c0861
Compare
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260915203520",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260915203520" |
`<s-pos-list>` renders a virtualized list whose rows are plain data
(`rows`) and whose markup comes from item templates (`itemTemplates`)
compiled in the extension bundle by the `posListTemplate` tagged template.
POS hydrates one template copy per mounted row, so lists of thousands of
rows stay responsive and no extension code runs while scrolling.
Templates are static `<s-pos-list-item templateId="…" type="button|text">`
roots. Inside them `{{path}}` interpolates a row field as text,
`bind:prop="path"` passes a row field to a component prop with its own
type, and `{{#if path}}…{{/if}}` renders its content when the field is
truthy. Event handlers, interpolated values, nested `#if`, `#each`, text
directly under the root, and any other `{{…}}` expression are rejected at
compile time with a `posListTemplate:` prefixed error.
The compiled output is stamped with this package's API version
(`2026-10`); POS renders templates only for an extension declaring the
same API version, so bundling a package that does not match the
extension's `api_version` is reported by name instead of rendering
unexpectedly.
The component types are generated from POS Mobile's `meta.ts` and merged
into `components.d.ts`; `POSList` joins `StandardComponents`; the POS docs
data for 2026-10 is regenerated. `htm` (already a transitive dependency of
several surfaces) becomes a direct dependency for the parser.
Assisted-By: devx/058a962b-6514-4c8e-a49e-37b8e478fe36
25c0861 to
3b107e3
Compare
What
Adds
<s-pos-list>for POS API version 2026-10 and theposListTemplatetagged template that compiles its row markup. This is the templated candidate for GSD #51755; the legacy-parity alternative is #4661 (unmodified, held as contingency). Exactly one of the two should merge.Companion PRs: World #2061117 (ui-api-design contract), #2061112 → #2061124 → #2061132 (pos-mobile host stack), Shopify/pos-e2e-ui-extension (sandbox screen, follows), World shopify-dev docs (follows).
Design
rowsis plain data ({id, templateFor, ...fields}) anditemTemplatesis a compiled AST produced once in the extension bundle byposListTemplate:POS hydrates one template copy per FlashList-mounted row, so no extension code runs while scrolling and no functions cross the bridge (no Shopify/extensibility change needed).
Output is stamped with this package's API version (
version: '2026-10'); POS renders templates only for an extension declaring the same API version and reports a mismatch by name (itemTemplates were compiled for API version X but this extension runs API version Y).Grammar:
{{path}}in text;{{path}}inside an attribute (always a string);bind:prop="path"(the only typed binding);{{#if path}}…{{/if}}(no nesting, no else). Compilation and validation happen when the helper executes, not during the extension build. Define templates at module scope to compile once per module execution. Rejected by the helper withposListTemplate:-prefixed errors:on*attributes (includingbind:onClick),${}interpolation of any kind,#each/other expressions, nested/unbalanced#if(including nesting through component children),#ifinside an attribute, text directly under<s-pos-list-item>, non-item roots, nesteds-pos-list-item/s-pos-list, missing/duplicatetemplateId, unknowntype, any other root attribute.Changes
src/surfaces/point-of-sale/pos-list-template.ts— the compiler (htm-based;htmbecomes a direct dependency).src/surfaces/point-of-sale.ts— exportsposListTemplateplusPOSListTemplateTag,POSListTemplates,POSListItemTemplate,POSListTemplateNode,POSListTemplateProp,POSListTemplateSegment,POSListRow,POSListRowClickEvent.components/POSList.d.ts(generated from pos-mobilemeta.tsviapnpm build-extension-components:publish 2026-10, with the generator fixes from World #2061112) and the POSList blocks merged intocomponents.d.ts.POSListRowClickEventcarries{item, index}indetail, the only event field POS's RemoteDOM bridge forwards to an extension; the ui-api-design contract (World #2061117) declaresitem/indexon the event, and POS exposes them once the bridge forwards custom event properties.POSListTemplates.versionis the compiling API version string (`${number}-${number}` | 'unstable'). Only POSList additions are included; the pre-existing drift between the generator output and this repo'scomponents.d.ts/components-shared.d.tsis left alone.components/targets/StandardComponents.ts—| 'POSList'.components/POSList/examples/{default,incremental-loading}.jsx.docs/.../2026-10/{generated_docs_data_v2.json,targets.json}regenerated withbuild-docs.mjs 2026-10..changeset/pos-list-template-component.md(minor).Verification
yarn build,yarn type-checkgreen;build/esm/surfaces/point-of-sale.mjsexportsposListTemplate.loom test packages/ui-extensions/src/surfaces/point-of-sale/tests/pos-list-template— 19 tests: exact AST output for text placeholders,{{#if}}blocks,bind:, attribute segments, valueless attributes,type="text"; and every rejection above with its literal message.Co-authored by AI.