Shopify / checkout-sheet-kit-android

Shopify’s Checkout Sheet Kit makes it simple to perform a checkout inside your Android app.
MIT License
12 stars 3 forks source link

The back arrow/button behavior in CheckoutDialog cannot be overriden #135

Open marcinKdev opened 1 month ago

marcinKdev commented 1 month ago

What area is the issue related to?

Checkout Sheet Kit

What version of the package are you using?

3.1.1

Reproducible sample code

We are displaying the CheckoutSheetKit in a recommended way from the level of MainActivity in our app: ShopifyCheckoutSheetKit.present(url, this, shopifyCheckoutSheetEventsProcessor)

and the checkout window that pops up over the screen contains two buttons on top. The "X" button works well but the back arrow does not work at when I tap on it:

Image

Steps to Reproduce

Display the checkout overlay in a way desribed in SDK README like

fun presentCheckout() { val checkoutUrl = cart.checkoutUrl ShopifyCheckoutSheetKit.present(checkoutUrl, context, checkoutEventProcessor) }

Note the back arrow of the checkout dialog not working.

Expected Behavior

SDK should provide a way to override the behavior of the back arrow to hide it

Actual Behavior

Back arrow is not operational, there's no way to override its behavior or hide it

Screenshots/Videos/Log output

No response

Storefront domain

westwing-main-prod.myshopify.com

kiftio commented 1 month ago

Hi @marcinKdev I wouldn't normally expect the back/up button to be visible on the dialog's toolbar. I'd like to try to reproduce it. If you're able to answer any of these it could help speed that up:

Thanks!

E.g. screenshot from the MobileBuyIntegration sample (with a custom title) Image

kiftio commented 1 month ago

Hi @marcinKdev did you manage to figure this out? Or are you able to provide any of the above info?

Thanks

dali-de commented 1 month ago

Hello @kiftio, I'll answer your questions here:

What class does your MainActivity extend (AppCompatActivity, ComponentActivity, etc)?

Our MainActivity extends an abstract activity (for implementation convince), which extends AppCompatActivity.

As you said it's the MainActivity, I assume it doesn't have a parent?

There is no other activity (other than Splash which is closed when opening MainActivity) in the current implementation (single activity app), which utilise different fragments to view screens.

Do you set a toolbar as an action bar / app bar anywhere?

No, we use a custom Compose view which IS NOT a TopAppBar composable, however this is not applicable for the Checkout sheet kit, we don't use any app header for that.

Do you access or redefine anything with this ID R.id.checkoutSdkHeader?

No we don't.

I hope this would help. Thanks!

github-actions[bot] commented 8 hours ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in 30 days. Thank you for your contributions.