-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2478 from Shopify/internal-2023-11-update
Internal November 2023 update
- Loading branch information
Showing
60 changed files
with
1,487 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@shopify/ui-extensions-react': minor | ||
'@shopify/ui-extensions': minor | ||
--- | ||
|
||
Release a new Chat component, chat.render targets and preloads.chat configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@shopify/ui-extensions': patch | ||
--- | ||
|
||
Make POS UI Ext PrintAPI async |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@shopify/ui-extensions': patch | ||
--- | ||
|
||
POS UI Ext PrintAPI src non-optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@shopify/ui-extensions-react': patch | ||
'@shopify/ui-extensions': patch | ||
--- | ||
|
||
Fix RenderExtension interface to support synchronous renders and make the clean up function optional |
16 changes: 16 additions & 0 deletions
16
...ui-extensions-react/src/surfaces/checkout/components/Chat/examples/basic-chat.example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { | ||
reactExtension, | ||
Chat, | ||
} from '@shopify/ui-extensions-react/checkout'; | ||
|
||
export default reactExtension( | ||
'purchase.checkout.chat.render', | ||
() => <Extension />, | ||
); | ||
|
||
// This component requires the configuration of the `extensions.targeting.preloads.chat` in the extensions configuration file. | ||
// Its value will be used as the `src` attribute of the Chat component. | ||
|
||
function Extension() { | ||
return <Chat inlineSize={100} blockSize={50} />; | ||
} |
18 changes: 18 additions & 0 deletions
18
...ocs/surfaces/checkout/reference/examples/purchase.checkout.chat.render/default.example.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { | ||
Chat, | ||
extension, | ||
} from '@shopify/ui-extensions/checkout'; | ||
|
||
// 1. Choose an extension target | ||
export default extension( | ||
'purchase.checkout.chat.render', | ||
(root) => { | ||
// 2. Render a Chat UI. This target only accepts the Chat component. Any other components will not render. | ||
root.appendChild( | ||
root.createComponent(Chat, { | ||
inlineSize: 100, | ||
blockSize: 50, | ||
}), | ||
); | ||
}, | ||
); |
15 changes: 15 additions & 0 deletions
15
...cs/surfaces/checkout/reference/examples/purchase.checkout.chat.render/default.example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { | ||
Chat, | ||
reactExtension, | ||
} from '@shopify/ui-extensions-react/checkout'; | ||
|
||
// 1. Choose an extension target | ||
export default reactExtension( | ||
'purchase.checkout.chat.render', | ||
() => <Extension />, | ||
); | ||
|
||
function Extension() { | ||
// 2. Render a Chat UI. This target only accepts the Chat component. Any other components will not render. | ||
return <Chat inlineSize={100} blockSize={50} />; | ||
} |
18 changes: 18 additions & 0 deletions
18
...cs/surfaces/checkout/reference/examples/purchase.thank-you.chat.render/default.example.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { | ||
Chat, | ||
extension, | ||
} from '@shopify/ui-extensions/checkout'; | ||
|
||
// 1. Choose an extension target | ||
export default extension( | ||
'purchase.thank-you.chat.render', | ||
(root) => { | ||
// 2. Render a Chat UI. This target only accepts the Chat component. Any other components will not render. | ||
root.appendChild( | ||
root.createComponent(Chat, { | ||
inlineSize: 100, | ||
blockSize: 50, | ||
}), | ||
); | ||
}, | ||
); |
15 changes: 15 additions & 0 deletions
15
...s/surfaces/checkout/reference/examples/purchase.thank-you.chat.render/default.example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { | ||
Chat, | ||
reactExtension, | ||
} from '@shopify/ui-extensions-react/checkout'; | ||
|
||
// 1. Choose an extension target | ||
export default reactExtension( | ||
'purchase.thank-you.chat.render', | ||
() => <Extension />, | ||
); | ||
|
||
function Extension() { | ||
// 2. Render a Chat UI. This target only accepts the Chat component. Any other components will not render. | ||
return <Chat inlineSize={100} blockSize={50} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...-extensions/docs/surfaces/checkout/reference/targets/purchase.checkout.chat.render.doc.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs'; | ||
|
||
import {CHECKOUT_API, getExample, getLinksByTag} from '../helper.docs'; | ||
|
||
const data: ReferenceEntityTemplateSchema = { | ||
name: 'purchase.checkout.chat.render', | ||
description: ` | ||
A static extension target that floats above the checkout in the bottom right corner of the screen. | ||
> Note: This target only accepts the [Chat](https://shopify.dev/docs/api/checkout-ui-extensions/unstable/components/overlays/chat) component. Any other components will not render. | ||
`, | ||
defaultExample: getExample('purchase.checkout.chat.render/default', [ | ||
'jsx', | ||
'js', | ||
]), | ||
subCategory: 'Overlays', | ||
related: getLinksByTag('targets'), | ||
...CHECKOUT_API, | ||
}; | ||
|
||
export default data; |
21 changes: 21 additions & 0 deletions
21
...extensions/docs/surfaces/checkout/reference/targets/purchase.thank-you.chat.render.doc.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs'; | ||
|
||
import {THANK_YOU_API, getExample, getLinksByTag} from '../helper.docs'; | ||
|
||
const data: ReferenceEntityTemplateSchema = { | ||
name: 'purchase.thank-you.chat.render', | ||
description: ` | ||
A static extension target that floats above the Thank you page in the bottom right corner of the screen. | ||
> Note: This target only accepts the [Chat](https://shopify.dev/docs/api/checkout-ui-extensions/unstable/components/overlays/chat) component. Any other components will not render. | ||
`, | ||
defaultExample: getExample('purchase.thank-you.chat.render/default', [ | ||
'jsx', | ||
'js', | ||
]), | ||
subCategory: 'Overlays', | ||
related: getLinksByTag('targets'), | ||
...THANK_YOU_API, | ||
}; | ||
|
||
export default data; |
Binary file added
BIN
+45.8 KB
...xtensions/docs/surfaces/checkout/screenshots/chat-component-iframe-clipping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.5 KB
...s/ui-extensions/docs/surfaces/checkout/screenshots/chat-component-maximized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.6 KB
...s/ui-extensions/docs/surfaces/checkout/screenshots/chat-component-minimized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.8 KB
packages/ui-extensions/docs/surfaces/checkout/screenshots/chat-thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+72.7 KB
...sions/docs/surfaces/checkout/screenshots/supported-locations-chat-thank-you.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+60.3 KB
...s/ui-extensions/docs/surfaces/checkout/screenshots/supported-locations-chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...xtensions/docs/surfaces/checkout/staticPages/examples/configuration/preloads.example.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# ... | ||
|
||
[[extensions.targeting]] | ||
target = "purchase.checkout.chat.render" | ||
module = "./Block.jsx" | ||
|
||
[extensions.targeting.preloads] | ||
chat = "https://my-chat-application.com" | ||
|
||
# ... |
10 changes: 10 additions & 0 deletions
10
...extensions/docs/surfaces/checkout/staticPages/examples/configuration/preloads.example.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// ... | ||
|
||
export default reactExtension( | ||
'purchase.checkout.chat.render', | ||
<Extension />, | ||
); | ||
|
||
function Extension() { | ||
// ... | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.