Shopify / blockchain-components

Blockchain related React UI components for Shopify storefronts
https://blockchain.shopify.dev
MIT License
81 stars 19 forks source link

:bug: Fixes misuse of document.body in Popover component #191

Closed QuintonC closed 1 year ago

QuintonC commented 1 year ago

ℹ️ What is the context for these changes?

Addresses misuse of document.body inside of the Popover component. This was causing errors in some frameworks (such as Remix) where document is undefined.

🕹️ Demonstration

Before After
image image

🎩 How can this be tophatted?

You can pull this branch and run the Next.js or Remix example and it should work as expected, but I've also tested in a SSR context with Hydrogen (the after image in the table above) 👀

✅ Checklist

QuintonC commented 1 year ago

/snapit

github-actions[bot] commented 1 year ago

🫰✨ Thanks @QuintonC! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

yarn add @shopify/blockchain-components@0.0.0-snapshot-20230517182953
yarn add @shopify/connect-wallet@0.0.0-snapshot-20230517182953
yarn add @shopify/gate-context-client@0.0.0-snapshot-20230517182953
yarn add @shopify/tokengate@0.0.0-snapshot-20230517182953