Skip to content

Conversation

@james-a-c
Copy link

@james-a-c james-a-c commented Dec 17, 2025

Background

Part of https://github.com/shop/issues-checkout/issues/9641
Closes https://github.com/shop/issues-checkout/issues/10513

Changes to the Delivery section through the delivery redesign experiment have created 2 locations for the pickup-location-option-item-render-after target to render extensions, one of them being in a modal. We need a way to inform the extensions that are being rendered in this target that they are currently in a modal (or not).

implementation in checkout-web can be found in this draft PR stack

Screenshots

Inline

Screenshot 2025-12-19 at 11 31 18 AM

In modal

Screenshot 2025-12-19 at 11 27 40 AM

Solution

Extend the same pattern we use for shipping-option-item-render-after by exposing the renderMode object on PickupLocationItemApi

Create a new shared RenderMode type to be used in shipping-option-item + pickup-location-item

Update shipping-option-item to use the new shared type.

// shared.ts
export interface RenderMode {
  overlay: boolean;
}

PickupLocationItemApi
{
  isTargetSelected: ...
  target: ...
  renderMode: RenderMode
}

ShippingOptionItemApi
{
  isTargetSelected: ...
  target: ...
  renderMode: RenderMode
}

🎩

  • Create or using an existing checkout UI extension. (docs for generating an extension)
  • Update the @shopify/ui-extensions package within your extension with the npm snapshot and run npm install
"@shopify/ui-extensions": "0.0.0-snapshot-20260113163731" 
  • Import the usePickupLocationOptionTarget hook into your extension
  • Ensure that the overlay property is available
import { usePickupLocationOptionTarget } from "@shopify/ui-extensions/checkout/preact";

const renderingInModal = pickupLocationOptionTarget.renderMode.overlay; 

Checklist

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

Copy link
Author

james-a-c commented Dec 17, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@james-a-c james-a-c marked this pull request as ready for review December 17, 2025 20:02
@github-actions

This comment has been minimized.

@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch from 12394f5 to 13089af Compare December 17, 2025 20:04
@james-a-c
Copy link
Author

/snapit

@james-a-c james-a-c marked this pull request as draft December 17, 2025 20:47
@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch 2 times, most recently from 35f30b6 to 66ed2db Compare December 19, 2025 15:33
@james-a-c james-a-c changed the title add rendermode field to pickup location item api Add renderMode object to PickupLocationItem Dec 19, 2025
@james-a-c james-a-c changed the title Add renderMode object to PickupLocationItem Add renderMode object to PickupLocationItemApi Dec 19, 2025
@dnagoda
Copy link
Contributor

dnagoda commented Dec 19, 2025

/snapit

1 similar comment
@dnagoda
Copy link
Contributor

dnagoda commented Dec 19, 2025

/snapit

@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch from 66ed2db to 3248efc Compare December 19, 2025 21:35
@james-a-c james-a-c marked this pull request as ready for review December 19, 2025 21:37
Copy link
Author

/snapit

2 similar comments
Copy link
Author

/snapit

Copy link
Author

/snapit

@shopify-github-actions-access
Copy link
Contributor

🫰✨ Thanks @james-a-c! Your snapshot has been published to npm.

Test the snapshot by updating your package.json with the newly published version:

"@shopify/ui-extensions": "0.0.0-snapshot-20260113163731"

@james-a-c james-a-c marked this pull request as draft January 14, 2026 14:06
@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch from 3248efc to 842956d Compare January 14, 2026 20:27
@james-a-c james-a-c marked this pull request as ready for review January 14, 2026 20:27
Copy link
Contributor

@lrsterrett lrsterrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 We should change the base branch to be 2026-01-rc (unless you also need this feature available in 2025-10, but based on the threads I went through I don't think this is the case). 2026-01-rc is the branch we'll promote to 2026-01

/**
* The render mode of a pickup location option item.
*/
export interface PickupLocationOptionItemRenderMode {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we could add a type called something generic like RenderMode in packages/ui-extensions/src/surfaces/checkout/api/shared.ts as I'd imagine that the type used in ShippingOptionItemRenderMode will remain consistent and won't accidentally diverge in the future if not intended to.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. A shared type makes sense here to avoid the duplication. I will update

@lrsterrett
Copy link
Contributor

Oh and also, we're trying to get away from the duplication, but the current flow for making changes to checkout ui extension types/docs is to add them to the equivalent directory in checkout-web under ./packages/ui-extensions as well. Checkout-web still references that 'private package' internally for the latest 'unstable/rc' api version. 🙃 Sorry for the hassle, happy to help if you need it!

@james-a-c james-a-c changed the base branch from 2025-10 to 2026-01-rc January 19, 2026 21:06
@james-a-c james-a-c changed the base branch from 2026-01-rc to graphite-base/3674 January 19, 2026 21:11
@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch from 842956d to 99df43c Compare January 19, 2026 21:11
@james-a-c james-a-c changed the base branch from graphite-base/3674 to 2025-10 January 19, 2026 21:11
@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch from 99df43c to 86ed045 Compare January 19, 2026 21:14
@james-a-c james-a-c changed the base branch from 2025-10 to 2026-01-rc January 19, 2026 21:14
Copy link
Author

👋 We should change the base branch to be 2026-01-rc (unless you also need this feature available in 2025-10, but based on the threads I went through I don't think this is the case). 2026-01-rc is the branch we'll promote to 2026-01

Just updated to base branch to 2026-01-rc

And no problem on making the shared type change in checkout-web as well!

@james-a-c james-a-c changed the base branch from 2026-01-rc to graphite-base/3674 January 19, 2026 22:56
@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch from 86ed045 to d2c17b3 Compare January 19, 2026 22:56
@james-a-c james-a-c changed the base branch from graphite-base/3674 to 2025-10 January 19, 2026 22:56
@james-a-c james-a-c changed the base branch from 2025-10 to 2026-01-rc January 19, 2026 22:58
@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch from d2c17b3 to d0123ca Compare January 20, 2026 14:55
@james-a-c james-a-c force-pushed the add-pickup-location-item-render-mode branch from d0123ca to c3cbb9a Compare January 20, 2026 15:02
Copy link
Author

@lrsterrett ready for another review! 🙂

Copy link
Author

/snapit

1 similar comment
Copy link
Author

/snapit

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.

3 participants