-
Notifications
You must be signed in to change notification settings - Fork 35
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 updates for ui-extensions #1034
Conversation
This comment has been minimized.
This comment has been minimized.
There are some additional commits we can add to this, same ones made in the legacy PR. |
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.
I tophatted in production with a linked library and could use some newly added APIs 🚀 I wasn't able to review all changes.
.changeset/serious-waves-mate.md
Outdated
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.
😂 🏄
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.
Mainly checked the code and did some basic tophatting.
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.
Obviously did not review every file (Github can barely handle this PR on my Mac :P), but spot check LGTM 👍
@@ -26,9 +31,13 @@ export function useApi< | |||
} | |||
|
|||
/** | |||
* Returns the full API object that was passed in to your | |||
* extension when it was created. | |||
* @deprecated you shoud be importing useApi instead |
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.
Was this removed on purpose?
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.
Yes, plan is to not mark these as deprecated yet for 2023-04
. 2023-07
will introduce deprecations.
|
||
render('Checkout::Dynamic::Render', () => <App />); | ||
reactExtension('Checkout::Dynamic::Render', () => <Extension />); |
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.
For the future: we still need to update these to use export default
for the new package
Background
Closes https://github.com/Shopify/checkout-web/issues/22623.
TLDR; this brings over the latest changes from the
checkout-web/packages/ui-extensions(-react)
packages. This is identical in features and functionality as version0.27.0
of the legacycheckout-ui-extensions
packages which are being published in this PR.Docs will not be published for this version.
Solution
yarn prepare-package-release:ui-extensions
which copies over from the privatecheckout-web/packages/ui-extensions(-react)
packages.🎩
spin up ui-extensions
.yarn build
to build the packages."@shopify/ui-extensions-react": "2022.10.6"
and import from@shopify/ui-extensions-react/checkout
.Then, run the following command to copy the packages to your local extension to use. This will ask you to choose the spin instance:
Finally, run
yarn dev
to run your extension in production using this package.You should not have any type errors relating to the package and your dev extension should render without error.
Checklist