Skip to content

Mark POS .observe extension targets as @deprecated#4146

Draft
vctrchu wants to merge 1 commit into2026-04-rcfrom
deprecate-observe-targets
Draft

Mark POS .observe extension targets as @deprecated#4146
vctrchu wants to merge 1 commit into2026-04-rcfrom
deprecate-observe-targets

Conversation

@vctrchu
Copy link
Copy Markdown
Contributor

@vctrchu vctrchu commented Mar 18, 2026

Summary

Adds @deprecated and @private JSDoc annotations to all 4 POS observe extension targets, pointing developers to pos.app.ready.data + shopify.addEventListener() as the replacement.

Targets deprecated

  • pos.transaction-complete.event.observeaddEventListener('transaction_complete', cb)
  • pos.cash-tracking-session-start.event.observeaddEventListener('cash_tracking_session_start', cb)
  • pos.cash-tracking-session-complete.event.observeaddEventListener('cash_tracking_session_complete', cb)
  • pos.cart-update.event.observeshopify.cart.current.subscribe() on render targets, or addEventListener('cart_update', cb) on data target

Notes

  • Annotations only — no runtime behavior changes
  • @private excludes these from generated shopify.dev documentation
  • Existing extensions using these targets continue to work unchanged

Resolves: https://github.com/shop/issues-retail/issues/26066
Epic: https://github.com/shop/issues-retail/issues/26019

Test plan

  • yarn build passes
  • CI passes (annotations only, no runtime changes)

Add @deprecated and @Private JSDoc annotations to all 4 POS observe
extension targets:
- pos.transaction-complete.event.observe
- pos.cash-tracking-session-start.event.observe
- pos.cash-tracking-session-complete.event.observe
- pos.cart-update.event.observe

Each annotation includes the deprecation version (2026-04), migration
path to pos.app.ready.data + shopify.addEventListener(), and a link
to the new target's documentation. pos.cart-update.event.observe also
references shopify.cart.current.subscribe() as an alternative for
render targets.

Resolves: shop/issues-retail#26066
Epic: shop/issues-retail#26019

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🚨🚨🚨 Docs migration in progress 🚨🚨🚨

We are actively migrating UI extension reference docs to MDX in the areas/platforms/shopify-dev zone of the monorepo. This impacts docs for the following surfaces:

During this migration, please be aware of the following:

.doc.ts files are being deprecated. Changes to .doc.ts files in this repo will not be reflected in the new MDX-based docs. If you need to update docs for a reference that has already been migrated, make your changes directly in the areas/platforms/shopify-dev zone of the monorepo instead.

Doc comments in .ts source files (the comment blocks above types and functions) are also affected. Generating docs from these comments currently requires a newer version of the @shopify/generate-docs library that isn't yet available. Updates to doc comments may not produce the expected output until the migration is complete.

Examples that previously lived in this repo are being moved to the areas/platforms/shopify-dev zone of the monorepo and should be authored there going forward.

What should I do?

  • If your PR includes changes to .doc.ts files, doc comments, or examples, please reach out to us in #devtools-proj-templated-refs so we can help ensure your updates are captured correctly.
  • If your PR is limited to source code changes (non-docs), you can ignore this notice.

Thanks for your patience while we complete the migration! 🙏

@vctrchu vctrchu self-assigned this Mar 18, 2026
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.

2 participants