Shopify / ui-extensions

MIT License
249 stars 35 forks source link

Developer Console unable to open a Thank you page extension mount #1984

Closed ctrlaltdylan closed 1 month ago

ctrlaltdylan commented 1 month ago

Please list the package(s) involved in the issue, and include the version you are using

    "@shopify/ui-extensions": "2024.1.x",
    "@shopify/ui-extensions-react": "2024.1.x",
    "react": "^18.0.0"

Describe the bug

As a Shopify app extension developer, I cannot open a Thank you page extension from the Developer Console (created by shopify app dev).

Steps to reproduce the behavior:

  1. Create a new Thank you page checkout extension (purchase.thank-you.block.render) with shopify app generate
  2. Then run shopify app dev to open a Developer Console
  3. Attempt to open the Thank you page developer preview link
  4. Observe a redirect to an in-progress checkout instead

Expected behavior

I expect the preview link for a Thank you page extension to take you to the Thank you page.

This is especially painful because the Thank you page is only displayed once after checkout, if you manually refresh the page you're taken to the Order status page instead, which is a different mount point.

There are no work arounds to this besides completing a full checkout between each. and. every. code. change. It gets extremely tedious.

Screenshots

Screencast available here:

https://github.com/Shopify/ui-extensions/assets/2694734/4ebfb87a-95e5-4c4d-ad53-60843a1a9bea

Additional context

I've tried reducing the number of extensions on my account to one, and still see this issue.

jun-shop commented 1 month ago

👋 Hi @ctrlaltdylan I believe you'll need to go through the checkout experience to be able to surface the Thank You Page. I know this isn't convenient, but you should be able to test your extension this way

jun-shop commented 1 month ago

Also forgot to add that you can make sure you remain on the Thank you page and not get redirected to the Order status page by appending the prevent_order_redirect=true query param to the URL. More info here