Skip to content

docs(pos): note per-screen sandbox in Navigation API limitations#4438

Merged
js-goupil merged 1 commit into2026-04from
js-pos-nav-sandbox-doc-2026-04
May 5, 2026
Merged

docs(pos): note per-screen sandbox in Navigation API limitations#4438
js-goupil merged 1 commit into2026-04from
js-pos-nav-sandbox-doc-2026-04

Conversation

@js-goupil
Copy link
Copy Markdown
Contributor

What

Adds a bullet to the Navigation API Limitations section noting that, starting in version 2025-10, each screen runs in its own isolated sandbox — state held in module-level variables, closures, or singleton instances isn't shared between screens.

Why

Developers using navigation.navigate() to move between screens have hit unexpected behavior when assuming module-level state, in-memory caches, or singletons would persist across screens. The current docs don't call this out. This PR adds a developer-friendly note pointing them at the supported way to share data: the state option in navigation.navigate() or persistent storage.

Backports

This same note is being applied to the supported retroactive versions:

Preview

- Starting in version 2025-10, each screen runs in its own isolated sandbox. State held in module-level variables, closures, or singleton instances isn't shared between screens — use the `state` option in `navigation.navigate()` or persistent storage to pass data between them.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🚨🚨🚨 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! 🙏

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

This PR targets a stable release branch (2026-04). Once merged, the change typically also needs to be forward-ported to 2026-07-rc so it ships in the next release.

When you open the forward-port PR, include a line like this in its body so the needs-rc-port label gets removed automatically when that PR merges:

Forward-port of #4438

Accepted formats (comma-separated for multiple):

  • #4438
  • GH-4438
  • 4438
  • https://github.com/Shopify/ui-extensions/pull/4438

If a forward-port isn't needed (e.g., the change is stable-only), you can remove the needs-rc-port label manually.

@github-actions github-actions Bot added the needs-rc-port PR against a stable branch awaiting forward-port to the current RC label May 5, 2026
As of version 2025-10, each screen runs in its own isolated sandbox.
This adds a Limitations bullet so developers know module-level state,
closures, and singletons aren't shared across screens, and points to
the state option / persistent storage as the supported way to pass
data between screens.
@github-actions github-actions Bot removed the needs-rc-port PR against a stable branch awaiting forward-port to the current RC label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

✓ Forward-ported in #4437.

@js-goupil js-goupil merged commit bb95d78 into 2026-04 May 5, 2026
6 checks passed
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