Skip to content

Match existing checkout extension APIs#4488

Draft
andy-chhuon wants to merge 454 commits into
2026-01-rcfrom
2026-07-rc
Draft

Match existing checkout extension APIs#4488
andy-chhuon wants to merge 454 commits into
2026-01-rcfrom
2026-07-rc

Conversation

@andy-chhuon

Copy link
Copy Markdown
Contributor

Background

(Provide a link to any relevant issues AND provide a TLDR of the issue in this pull request)

Solution

(Describe your solution, why this approach was chosen, and what the alternatives/impacts may be)

🎩

  • ...

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

rennyG and others added 30 commits March 31, 2026 17:27
…-2026-04-rc

Add missing target overview screenshots to checkout (2026-04-rc)
…-2026-04-rc

fix: post-process generated_docs_data_v2.json in checkout build 2026-04-rc
…ngCycleFields

Revert "Adding in types for purchaseType and recurringCycleLimit fields"
…tions being pulled into docs (#4256)

* Remove duplicate descriptions being pulled into docs

* Restore @publicdocs tags while keeping descriptions removed

The previous commit removed both the descriptions and the @publicdocs
tags. The tags are still needed for docs generation - only the
duplicate description text should be removed.

Made-with: Cursor
…n, ButtonGroup, Menu, Section)

Made-with: Cursor
…onents

- Update events/slots interface descriptions with helpful text and Polaris links
- Capitalize first word in value descriptions
- Add missing tone, variant, and background value descriptions
- Fix Subtag label, click event reference, href bullet point
- Add BorderShorthand type description
- Sentence-case component names in prose

Made-with: Cursor
[Customer account UI extensions 2026-04-rc]: Description improvements for Actions components
add public docs to ALL top level types and rerun the 4 reference doc …
- Update event/slot interface descriptions with Polaris handling-events and using-slots links
- Align event member descriptions to admin pattern: "A callback fired when..." with MDN links
- Update shared InputProps/MultipleInputProps/FileInputProps/FocusEventProps descriptions
- Use lowercase friendly names for all component references in prose

Made-with: Cursor
…ptions

- commandFor: rewrite with clear pairing guidance and MDN link
- command: capitalize value descriptions, remove vague docs reference, lowercase "clipboard item"
- interestFor: enriched description
- name (BaseCheckableProps): remove Form backticks, use plain "form"
- Choice error: remove ChoiceList backticks, rewrite clearly
- Choice secondaryContent: replace circular description with helpful text

Made-with: Cursor
…criptions

- autocomplete: condensed opening, @see -> Learn more inline link, simplified defaults
- disabled: "Disables the field/control" -> "Whether the field/control is disabled"
- checked/selected: "active" -> "checked"/"selected" (less ambiguous)
- defaultChecked/defaultSelected: same fix

Made-with: Cursor
…omplete section, disabled wording

Made-with: Cursor
…ax/min contractions, prefix/suffix

Made-with: Cursor
Port enriched JSDoc descriptions for Platform API properties.
Covers Analytics, Extension, Localization, Metafields, Session Token,
Settings, Shop, Storage, and Storefront APIs.

Every description verified against the 2026-04-rc TypeScript types.

Partially closes shop/issues-learn#1046

Made-with: Cursor
) (#4277)

### Background

Backport of #3976 to `2026-04-rc`. The original PR updated POS event base data connectivity type from `ConnectivityState` to `ConnectivityApiContent` (signal type) for observe targets, which was merged into `2026-01` but missing from `2026-04-rc`.

This is blocking the 2025-04 release per [Slack thread](https://shopify.slack.com/archives/C0683EBQ55M/p1775670597072889).

### Solution

- Updated `BaseData.ts` to import and use `ConnectivityApiContent` instead of `ConnectivityState` for the `connectivity` property
- Updated the tester factories to create proper `ConnectivityApiContent` mock data (wrapping `ConnectivityState` in a `ReadonlySignalLike`)
- Surgically updated the generated docs JSON to reflect the type change (added `ConnectivityApiContent` and `ReadonlySignalLike` type definitions)

### Checklist
- [x] I have 🎩'd these changes
- [x] I have updated relevant documentation
…t-render

Add types for admin.app.intent.render
Improve Forms component descriptions to match admin quality (2026-04-rc)
* Remove data api

* Add changeset

* Fix test
daniszewskik and others added 30 commits June 23, 2026 16:28
…llocations

Add optional discountAllocations field to pos bundle lineItemComponent
…2026-07-rc

Remove dangling buyer-journey #examples link from buyerJourney JSDoc (2026-07-rc)
Introduces the `shopify.printing` API for the 2026-07 POS surface:

- printing-api.ts: PrintingApi / PrintingApiContent with getPrinters() and
  print(src, options?), plus PrintOptions { printer?: Printer } and
  Printer { id, name, connected }. Mirrors the approved TAG spec
  (Shopify/ui-api-design#1413) and aligns with the WICG Web Printing model.
- standard-api.ts: add PrintingApi to StandardApi.
- api.ts: export the new public types.
- print-api.ts: deprecate PrintApi / PrintApiContent in favor of shopify.printing.

shopify.print remains as a deprecated alias; shopify.printing supersedes it.
… mock

- standard-api.ts: PrintApi is intentionally kept in the StandardApi
  intersection so shopify.print keeps working as a deprecated alias of
  shopify.printing.print(). Suppress import/no-deprecated at the import and
  the intersection use (eslint runs with --max-warnings 0).
- factories.ts: add the now-required `printing` property to the POS
  StandardApi test mock (getPrinters + print).

Assisted-By: devx/8a5a23f1-0153-4f26-8b62-47e474da9689
Aligns the schema with the host-plugin behavior: receipt printers render
HTML/image content only, so print(src, {printer}) with a PDF src throws.
Adds the @throws entry and clarifies that PDFs print via the system dialog.

Assisted-By: devx/8a5a23f1-0153-4f26-8b62-47e474da9689
Assisted-By: devx/8a5a23f1-0153-4f26-8b62-47e474da9689
## What

Adds the POS `shopify.printing` API to the **2026-07** surface, per the approved TAG spec [`Shopify/ui-api-design#1413`](Shopify/ui-api-design#1413). This is the **types layer** of the cross-repo Printing API work.

```ts
const printers = await shopify.printing.getPrinters();
const receiptPrinter = printers.find((p) => p.connected);

if (receiptPrinter) {
  await shopify.printing.print('/print/receipt', {printer: receiptPrinter});
} else {
  await shopify.printing.print('/print/receipt'); // system print dialog
}
```

## Changes

- **`api/printing-api/printing-api.ts`** (new):
  - `PrintingApiContent` — `getPrinters(): Promise<Printer[]>` and `print(src, options?): Promise<void>`
  - `PrintOptions` — `{ printer?: Printer }`
  - `Printer` — `{ id: string; name: string; connected: boolean }`
  - `PrintingApi` — `{ printing: PrintingApiContent }` (the `shopify.printing` namespace)
  - JSDoc mirrors the committed spec; each interface carries `@publicDocs` for shopify.dev generation.
- **`standard-api.ts`**: add `PrintingApi` to `StandardApi`.
- **`api.ts`**: export the new public types.
- **`print-api.ts`**: `@deprecate` `PrintApi` / `PrintApiContent` in favor of `shopify.printing`. `shopify.print` stays as a deprecated alias.
- Changeset: `minor`.

## Notes

- This PR is **types only**. Runtime behavior (version gating to `>= 2026-07`, `getPrinters()` returning the connected receipt printer, and routing `print(src, {printer})` to it) lands in the extensibility plugin (PR A2) and the pos-mobile bridge (PR B2).
- `Printer` follows the committed spec exactly — `{ id, name, connected }`, no `type` field.

## Testing

- `tsc --noEmit` over `@shopify/ui-extensions`: **0 errors**.

## Related

- Spec (TAG-approved): [Shopify/ui-api-design#1413](Shopify/ui-api-design#1413)
- Downstream — extensibility `printingPlugin`: [Shopify/extensibility#1457](Shopify/extensibility#1457)
- Downstream — pos-mobile bridge (`getPrinters` + receipt routing): [shop/world#837111](shop/world#837111)
- Downstream — shopify-dev docs: [shop/world#837232](shop/world#837232)

🤖 Drafted with pi.
Remove the four early-access POS .observe targets (transaction-complete,
cash-tracking-session-start, cash-tracking-session-complete, cart-update)
and their exclusive payload types. Replacement is the pos.app.ready.data
background target with addEventListener / cart.current.subscribe().

Assisted-By: devx/8ba453a3-96d0-4701-a8cc-43c4651bd027
Replace the legacy Chat.d.ts (onMessage/onReady/remoteMethods) with the
s-* component shape generated from checkout-web: ChatElementProps,
ChatElementEvents (ready), ChatElementMethods (contentWindow.postMessage),
ChatElement, ChatProps. Regenerated generated_docs_data_v2.json (adds the
four ChatElement* types; no other drift).
Add an optional third argument to cart.addLineItem so a single call can
create a line item and decorate it with line-item properties, instead of
chaining addLineItem -> addLineItemProperties.

Introduces the AddLineItemOptions type ({properties?}). Backwards
compatible: the third argument is optional. 

Assisted-By: devx/2ccb68c4-3a6f-43e0-9eb1-37bda8685c84
Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4
* Remove @publicdocs from POS receipt targets and associated types

Mark the receipt footer/header block render targets as @Private so they
no longer appear in generated API reference documentation. Also mark the
receipt-only types (ReceiptComponents, TransactionCompleteWithReprintData,
ReprintReceiptData, SaleTransactionData, ReturnTransactionData,
ExchangeTransactionData, BaseTransactionComplete) as @Private.

The targets and types remain in the TypeScript API surface — only their
public documentation visibility is removed.

* Also mark QrCode component as @Private and remove from StandardComponents

The QrCode/QRCode component is only used by receipt targets in the POS
runtime, so it should not appear in public docs. Mark QrCodeJSXProps and
QRCodeProps as @Private, and remove QRCode/QrCode from StandardComponents
so it no longer flows into BasicComponents (used by modal/action targets).

* chore: remove changeset

Assisted-By: devx/8fa32c7c-5542-47a3-8935-be5cbf6cbf09

---------

Co-authored-by: Victor Chu <[email protected]>
## Problem
**These links were broken.** Admin component JSDoc linked to the old `using-web-components` slug, which no longer resolves correctly. There were two failure modes, both live on production:

| Link in source | HTTP | Result |
|---|---|---|
| `/docs/api/polaris/using-web-components#…` (most links) | **404** | Page not found — hard broken |
| `/docs/api/app-ui/using-web-components#…` | **301** | Redirects to the canonical page but **drops the `#fragment`**, landing at the top instead of the section |
| `/docs/api/polaris/using-polaris-web-components#…` | **200** | Correct — anchors resolve ✓ |

So links such as `SpacingKeyword` (`#scale`) and responsive value (`#responsive-values`) either 404’d outright or dumped the reader at the top of the page instead of the intended section.

## Fix
Restore the canonical slug everywhere in the admin surface:

```
(polaris|app-ui)/using-web-components  ->  polaris/using-polaris-web-components
```

Links-only diff (no content/symbol changes). Touches the source `.d.ts` files and the checked-in v2 docs data.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

_Part of a set fixing this across all affected versions: #4538 (2025-10), #4539 (2026-01), #4537 (2026-04), #4536 (2026-07-rc)._
Release Chat to checkout UI extensions 2026-07-rc
* docs(pos): regenerate 2026-07-rc pos ui extension reference

Assisted-By: devx/8ba453a3-96d0-4701-a8cc-43c4651bd027

* docs(pos): update printing and background target data

Assisted-By: devx/8ba453a3-96d0-4701-a8cc-43c4651bd027

* docs(pos): restore hardware printer wording

Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4

* docs(pos): regenerate event listener docs data

Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4

* docs(pos): regenerate after receipt target removal

Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4

* docs(pos): remove event target parser

Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4
Mark the post-return and post-exchange extension targets as @Private so
they no longer appear in generated API reference documentation.

Targets marked @Private:
- pos.return.post.action.menu-item.render
- pos.return.post.action.render
- pos.return.post.block.render
- pos.exchange.post.action.menu-item.render
- pos.exchange.post.action.render
- pos.exchange.post.block.render

The targets remain in the TypeScript API surface — only their public
documentation visibility is removed.
Mark the buyer journey intercept hook and the underlying intercept API as
deprecated, mirroring the existing localization.market deprecation. Adds an
@deprecated JSDoc tag (which drives the shopify.dev deprecation callout) and
regenerates the checkout docs data (yarn docs:checkout 2026-07-rc), plus a
changeset.

Co-authored-by: River <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…pt-2026-07-rc-origin

Deprecate useBuyerJourneyIntercept and buyerJourney.intercept
…cation section

The unstable branch still runs on remote-ui and can't be updated
without breaking extensions still running on it. Reframe
versions-and-deploys.md around the RC + feature-branch workflow and
mention unstable in only a single deprecation section (deprecated and
frozen at 2025-07).

- Add one 'Unstable (deprecated)' section (frozen at 2025-07, remote-ui)
- Point RC + Adding code at the latest RC + feature-branch workflow
- Remove the unstable snapshot-release paragraph from Deploying
- Drop the obsolete step syncing changesets back to unstable

Assisted-By: devx/de149937-ce86-41bf-b959-11063c49a45b
…e-frozen

Docs: reframe versions guide around RC, confine `unstable` to one deprecation section
### Background

Closes shop/issues-checkout#11640  
vault [decision](https://vault.shopify.io/gsd/decisions/10586) 

Following the introduction of split ship and pickup the `purchase.checkout.pickup-location-option-item.render-after` target is now shared between rendering inline and in a modal. The decision was made to not support modal within modal functionality and to not encourage third party developers to build solutions which utilize this. To be consistent across checkout this thinking should hold true for other targets that render both inline and in a modal:  
`purchase.checkout.shipping-option-item.render-after`  
`purchase.checkout.shipping-option-item.details.render`

renderMode should be deprecated today and the blocking of modal within modal functionality will occur in the future once the renderMode has been removed

### Solution

Add a deprecation warning for renderMode on ShippingOptionItem

### Checklist

- [x] I have 🎩'd these changes
- [x] I have updated relevant documentation
Assisted-By: devx/8cc1b236-8bf2-4f7a-b219-2778dd2786b4
Port over missing types from 2026-04 to 2026-07-rc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.