Shopify / checkout-sheet-kit-react-native

Shopify's Checkout Sheet Kit for React Native - simplifying the process of adding checkout to your native apps.
https://shopify.dev/docs/custom-storefronts/mobile-apps
MIT License
30 stars 3 forks source link

[Patch 1.0.2] Maintain viewController to prevent dismissing all modals on close #69

Closed markmur closed 6 months ago

markmur commented 6 months ago

What changes are you making?

Maintains the viewController state so that the dismiss() method closes only the Checkout sheet, and not any sheet that triggered the present.

See before/after |Before|After| |-------|-----| |![dismiss-before](https://github.com/Shopify/checkout-sheet-kit-react-native/assets/2034704/778ef394-a062-491d-9cf0-1d0736e7a8d9)|![dismiss-after](https://github.com/Shopify/checkout-sheet-kit-react-native/assets/2034704/24eb6ba9-1c2d-4df1-8ff0-a3f658b9648d)|

PR Checklist

[!IMPORTANT]

  • [ ] I've added tests to support my implementation
  • [x] I have read and agree with the Contribution Guidelines.
  • [x] I have read and agree with the Code of Conduct.
  • [ ] I've updated the README.
  • [ ] I've updated any documentation related to these changes.

Checklist for releasing a new version - [x] I have bumped the version number in the [`package.json` file](https://github.com/Shopify/checkout-sheet-kit-react-native/blob/main/modules/%40shopify/checkout-sheet-kit/package.json#L4). - [x] I have added a [Changelog](./CHANGELOG.md) entry.

[!TIP] See the Contributing documentation for instructions on how to publish a new version of the library.