-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Checkout extensibility] Adds iframe.sources capability #4192
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
5445c32
to
79e695e
Compare
Coverage report
Show files with reduced coverage 🔻
Test suite run success1766 tests passing in 808 suites. Report generated by 🧪jest coverage report action from e58a8b6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:chef-kiss:
5a34154
to
e3a5255
Compare
e3a5255
to
e58a8b6
Compare
/snapit |
🫰✨ Thanks @rcaplanshopify! Your snapshot has been published to npm. Test the snapshot by intalling your package globally: pnpm i -g @shopify/[email protected]
|
WHY are these changes introduced?
Resolves #1811
Note: this should be released after the core PR below ships.
This PR introduces support for the new
iframe
nested checkout UI extension capability table and theiframe.sources
capability.The iframe.sources capability is an array of strings. These entries will be used as content security policy (CSP) sources, allowing specified initial and redirected iframe content to load.
WHAT is this pull request doing?
This PR updates the capabilities interfaces and introduces an
IframeCapabilities
interface, which contains asources
property. Unlike the other capabilities, thesources
property is an array of strings.How to test your changes?
The changes introduced in this PR were developed in tandem with the core updates in the linked PR. The 🎩 for both can be done using the steps in the linked core PR.
Alternatively, the steps below explain how to set up a new spin constellation that can be used to verify these changes.
Save the above to a file and run
spin up ./link/to/constellation.yml
.rc/iframe-capabilities
branch and rundev reup && dev restart
in theshopify
root folder.cli
root, check out therc/add-iframe-capabilities
branch, and runpnpm install
.cli/packages/cli-kit
and runpnpm install && pnpm build
cli/packages/cli
and runpnpm install && pnpm build
pnpm --global link
checkout-ui-extension-dev
and check out therc/add-iframe-capability
branchpnpm link --global @shopify/cli
pnpm deploy
shops/2/graphiql
withshops/1/graphiql
.populated iframe sources
value foriframe.sources
includes the values from the configempty iframe sources
,no defined iframe capability
, andno defined iframe sources
extensions return with empty arrays for theiframe.sources
capability.pnpm deploy
, and run the query again. Confirm your changes are reflected. If they're not, you may need to runpnpm --global link @shopify/cli
in thecheckout-ui-extension-dev
folder again and then deploy.Query
Variables
{ "first": 10 }
Post-release steps
Measuring impact
How do we know this change was effective? Please choose one:
Checklist