[3/6] Add POS List web component types - #4661
Conversation
Assisted-By: devx/46b3a0a9-3b3c-4c53-a0c1-759bfb326ea8
|
/snapIt |
Assisted-By: devx/46b3a0a9-3b3c-4c53-a0c1-759bfb326ea8
Assisted-By: devx/46b3a0a9-3b3c-4c53-a0c1-759bfb326ea8
|
/snapit |
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260901153420",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260901153420" |
|
/snapit |
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260901162303",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260901162303" |
Assisted-By: devx/46b3a0a9-3b3c-4c53-a0c1-759bfb326ea8
Assisted-By: devx/46b3a0a9-3b3c-4c53-a0c1-759bfb326ea8
Assisted-By: devx/46b3a0a9-3b3c-4c53-a0c1-759bfb326ea8
Assisted-By: devx/46b3a0a9-3b3c-4c53-a0c1-759bfb326ea8
Assisted-By: devx/731c45d9-3be0-4043-899f-87200624d2b8
Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
Row callbacks are functions nested inside the `rows` data, so they cross the
sandbox boundary as RPC callables and cannot receive a DOM Event. The host
sends `{type: 'click'}`; describe exactly that instead of `CallbackEvent`.
Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
|
/snapit |
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260910041724",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260910041724" |
Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
Subtitles take tone and color as s-text does; badges take tone as s-badge does. Replaces the legacy List value sets that reused the shared prop names with incompatible values. Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
|
/snapit |
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260910143603",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260910143603" |
Removes the POSListTone and POSListTextColor duplicates; the published types narrow the shared keywords exactly as Badge and Text do. Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
Rows gain type ('auto' | 'text' | 'button'); the list gains onRowClick, whose
event carries the activated row's id in detail. Rows no longer hold functions,
so they cross the sandbox boundary as pure data and the handler receives a
real Event on the declared-event path, like loadmore.
Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
|
/snapit |
|
🫰✨ Thanks @ajanth-u! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260911004700",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260911004700" |
Row activation is a declared element event; a rejection in the listener stays in the extension like any other element event. Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
The docs generator leaves Extract<...> inside object type aliases unresolved, so the reference page showed the raw expression. Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
Assisted-By: devx/0c7bafdf-0c5c-4c4d-b9aa-d967e97853e3
Background
The 2026-10 POS UI Extensions surface needs a virtualized list component for structured, incrementally loaded data. The public shape is under TAG review in shop/world#2037349 (migrated from the archived Shopify/ui-api-design#1576).
Solution
Add the
s-pos-listweb component contract to the 2026-10 release branch:onClickcallbacks that receive a plainPOSListRowClickEvent({type: 'click'}) — rows are data rather than elements, so the callback crosses the sandbox boundary as an RPC callable and can't receive a DOMEvent; row context is held by each callback's closureautoimage display is decided per row, both matching the legacyListimageDisplayStrategy,loadingMore, andloadmoresupportheaderslot for composable content above the rows; no component-owned titleThe web-component names intentionally replace legacy React-oriented names:
databecomesrows,isLoadingMorebecomesloadingMore, andonEndReachedbecomesloadmore/onLoadMore.Alternatives considered
Listcontract unchanged — rejected because React-specific names andlistHeaderComponentdo not fit the web-component surface.titleproperty — rejected because headings compose outside the list or through theheaderslot.onClickcallbacks, with row context already available through the closure.Verification
yarn buildyarn type-checkyarn test(no related Jest suites)StandardComponents.tspasses; generated declarations and examples are intentionally ignored by this repository's ESLint configurationyarn lintreaches only pre-existing generatedcheckout/preact.jsandcustomer-account/preact.jserrors afteryarn buildDependencies
This draft is blocked on approval of shop/world#2037349. End-to-end availability also requires the POS host implementation linked below.
After this PR merges, regenerate the 2026-10 POS reference data in World before the Shopify Dev documentation PR can merge.
Related PRs
🎩
Manual POS verification is intentionally deferred to the author.
Checklist