Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/warm-pans-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/ui-extensions': patch
---

Add toast api on customer accounts standard api
Original file line number Diff line number Diff line change
Expand Up @@ -652,3 +652,10 @@ export interface TrackingConsentChangeResultError {
*/
message: string;
}

export interface ToastApiResult {
hide: () => void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we currently do not support hide

show: (content: string, options?: ShowToastOptions) => void;

Are we going to implement this as part of the 2025-10 version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robin-drexler Yes! we are adding support for it here https://github.com/shop/world/pull/106014

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im updating this type so I can expose that change on standard api :)

}
export interface ToastApi {
show: (content: string) => ToastApiResult;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Analytics,
CustomerPrivacy,
ApplyTrackingConsentChangeType,
ToastApi,
} from '../shared';

import type {ExtensionTarget} from '../../extension-targets';
Expand Down Expand Up @@ -101,6 +102,23 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
*/
ui: Ui;
Copy link
Contributor Author

@oluwatimio oluwatimio Jul 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove toast type on here once we have completed moving this over + docs shipped but for now leaving it in here as we need the toast api on standard api to implement shopify.toast on the host


/**
* The Toast API displays a non-disruptive message that displays at the bottom
* of the interface to provide quick, at-a-glance feedback on the outcome
* of an action.
*
* How to use:
*
* - Use toasts to confirm successful actions.
*
* - Aim for two words.
*
* - Use noun + past tense verb format. For example, \`Changes saved\`.
*
* For errors, or information that needs to persist on the page, use a [banner](/docs/api/checkout-ui-extensions/unstable/components/feedback/banner) component.
*/
toast: ToastApi;

navigation: StandardExtensionNavigation;

/**
Expand Down