Skip to content

[Android] Dogfood ShopifyCheckout view in sample - #457

Merged
kiftio merged 2 commits into
mainfrom
07-14-dogfood_checkoutview_in_sample
Jul 16, 2026
Merged

[Android] Dogfood ShopifyCheckout view in sample#457
kiftio merged 2 commits into
mainfrom
07-14-dogfood_checkoutview_in_sample

Conversation

@kiftio

@kiftio kiftio commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What changes are you making?

Adds a CheckoutPresentationMode setting to the Android demo app that lets developers choose between two ways of presenting checkout:

  • Checkout Kit sheet – the existing imperative ShopifyCheckoutKit.present(...) flow, with its associated sheet preset, drag-to-dismiss, and tap-away-to-dismiss sub-options.
  • App-owned Compose sheet – embeds CheckoutView directly inside a ModalBottomSheet owned by the sample app, demonstrating how a host app can control sheet styling and dismissal independently of Checkout Kit's built-in sheet.

Screenshot 2026-07-14 at 10.21.01.png

The ColorSchemeSection composable is replaced by a new AppearanceSection that groups Storefront vs App appearance selection with nested color scheme options (Dark, Light, Automatic). The sheet preset controls are moved under the CheckoutPresentationModeSection and are only shown when the Checkout Kit sheet mode is active. The checkoutConfiguration lambda is extracted from presentCheckout so it can be reused by both presentation paths. The new preference is persisted via PreferencesManager and propagated through SettingsRepository, Settings, UserPreferences, and CartViewModel.

How to test

  1. Build and run the demo app.
  2. Navigate to Settings.
  3. Under Checkout presentation, select Checkout Kit sheet and verify that the sheet preset, drag-to-dismiss, and tap-away-to-dismiss options appear as sub-options. Tap Check out from the cart and confirm checkout opens in the Checkout Kit sheet.
  4. Switch to App-owned Compose sheet. Verify the sub-options are hidden and the note about host-controlled styling is shown. Tap Check out from the cart and confirm checkout opens inside a ModalBottomSheet with a compact drag handle.
  5. Dismiss the app-owned sheet by dragging or tapping outside and confirm the cart state is correctly reset.
  6. Verify the selected presentation mode persists after killing and relaunching the app.
  7. Confirm the Appearance section correctly shows Storefront vs App options, with Dark/Light/Automatic nested under App.

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 14, 2026

kiftio commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@kiftio
kiftio force-pushed the 07-14-extract_and_expose_checkoutview branch from 2847d6c to 8febad5 Compare July 14, 2026 09:16
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch 2 times, most recently from 3b14c57 to d971ddd Compare July 14, 2026 09:45
@kiftio
kiftio force-pushed the 07-14-extract_and_expose_checkoutview branch from 8febad5 to fa38ddb Compare July 14, 2026 09:45
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from d971ddd to 930478c Compare July 14, 2026 11:39
@kiftio
kiftio force-pushed the 07-14-extract_and_expose_checkoutview branch from fa38ddb to 253322d Compare July 14, 2026 11:39
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch 2 times, most recently from 1b8227e to 24c820a Compare July 14, 2026 12:47
@kiftio kiftio changed the title Dogfood CheckoutView in sample [Android] Dogfood CheckoutView in sample Jul 14, 2026
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from 24c820a to e57bb1d Compare July 14, 2026 12:51
import com.shopify.checkoutkit.ColorScheme

@Composable
fun AppearanceSection(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

reworking settings a bit to group color schemes under app, leaving storefront separate

import com.shopify.checkout_kit_android_demo.settings.data.CheckoutSheetPreset

@Composable
fun CheckoutPresentationModeSection(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

another settings update to split presentation modes (present vs view)

and grouping options underneath present where appropriate

@kiftio
kiftio marked this pull request as ready for review July 14, 2026 12:54
@kiftio
kiftio requested a review from a team as a code owner July 14, 2026 12:54
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.85% (327/356) 87.98% (183/208) 100% (86/86)

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Android release AAR 239.2 KiB 239.2 KiB 0 B
Android file breakdown
File Base Head Delta
classes.jar 253.2 KiB 253.2 KiB 0 B
res/layout/checkout_view_content.xml 2.2 KiB 2.2 KiB 0 B
res/layout/checkout_sheet_content.xml 2.0 KiB 2.0 KiB 0 B
res/values/values.xml 1.2 KiB 1.2 KiB 0 B
R.txt 1.1 KiB 1.1 KiB 0 B
proguard.txt 798 B 798 B 0 B
AndroidManifest.xml 578 B 578 B 0 B
res/drawable/close.xml 431 B 431 B 0 B
res/menu/checkout_menu.xml 354 B 354 B 0 B
META-INF/com/android/build/gradle/aar-metadata.properties 157 B 157 B 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@kiftio kiftio mentioned this pull request Jul 14, 2026
11 tasks
@kiftio
kiftio force-pushed the 07-14-extract_and_expose_checkoutview branch from 253322d to 2d9ed69 Compare July 14, 2026 13:40
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from e57bb1d to 57b2d1f Compare July 14, 2026 13:40
@kiftio
kiftio force-pushed the 07-14-extract_and_expose_checkoutview branch from 2d9ed69 to 54efe2d Compare July 14, 2026 14:44
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from 57b2d1f to 020fa96 Compare July 14, 2026 14:44
@kiftio
kiftio force-pushed the 07-14-extract_and_expose_checkoutview branch from 54efe2d to 565b063 Compare July 14, 2026 15:07
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from 020fa96 to c9f2ff4 Compare July 14, 2026 15:07
@kiftio kiftio changed the title [Android] Dogfood CheckoutView in sample [Android] Dogfood ShopifyCheckout view in sample Jul 14, 2026
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from c9f2ff4 to 582e6c7 Compare July 14, 2026 15:35
@kiftio
kiftio force-pushed the 07-14-extract_and_expose_checkoutview branch from 565b063 to 288e313 Compare July 14, 2026 15:35
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from 582e6c7 to 88c5f9e Compare July 15, 2026 08:20

@markmur markmur left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔥

@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from 88c5f9e to d00a27b Compare July 15, 2026 12:28
@kiftio
kiftio force-pushed the 07-14-extract_and_expose_checkoutview branch 2 times, most recently from 0ca3772 to f616e04 Compare July 16, 2026 09:32
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch 3 times, most recently from 96b3980 to 67639e6 Compare July 16, 2026 10:23

kiftio commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 16, 10:33 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 16, 10:34 AM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 16, 10:41 AM UTC: @kiftio merged this pull request with Graphite.

@kiftio
kiftio changed the base branch from 07-14-extract_and_expose_checkoutview to graphite-base/457 July 16, 2026 10:33
@kiftio
kiftio changed the base branch from graphite-base/457 to main July 16, 2026 10:33
kiftio added 2 commits July 16, 2026 10:33
Assisted-By: devx/f08a3e3c-67c6-4e4a-b0bb-06bcc37aec0d
@kiftio
kiftio force-pushed the 07-14-dogfood_checkoutview_in_sample branch from 67639e6 to c4e849d Compare July 16, 2026 10:33
@kiftio
kiftio merged commit 8e2c198 into main Jul 16, 2026
35 checks passed
@kiftio
kiftio deleted the 07-14-dogfood_checkoutview_in_sample branch July 16, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants