From 03d41b255e3745a074954b1548114a7cd12b350c Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Fri, 24 Mar 2023 16:30:52 -0700 Subject: [PATCH 1/4] docs(toast): remove hardware back button dismissal --- docs/api/toast.md | 2 +- docs/developing/hardware-back-button.md | 2 +- versioned_docs/version-v6/api/toast.md | 2 +- versioned_docs/version-v6/developing/hardware-back-button.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/toast.md b/docs/api/toast.md index bf74e97cdd..d787a43c20 100644 --- a/docs/api/toast.md +++ b/docs/api/toast.md @@ -48,7 +48,7 @@ import ControllerExample from '@site/static/usage/v7/toast/presenting/controller ## Dismissing -The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. +The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. To dismiss the toast after creation, call the `dismiss()` method on the instance. The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event. diff --git a/docs/developing/hardware-back-button.md b/docs/developing/hardware-back-button.md index ff50b2f7f1..2f3271613d 100644 --- a/docs/developing/hardware-back-button.md +++ b/docs/developing/hardware-back-button.md @@ -340,6 +340,6 @@ The table below lists all of the internal hardware back button event handlers th | Handler | Priority | Propagates | Description | | ---------- | -------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| Overlays | 100 | No | Applies to overlay components `ion-action-sheet`, `ion-alert`, `ion-loading`, `ion-modal`, `ion-popover`, `ion-picker`, and `ion-toast`. | +| Overlays | 100 | No | Applies to overlay components `ion-action-sheet`, `ion-alert`, `ion-loading`, `ion-modal`, `ion-popover`, and `ion-picker`. | | Menu | 99 | No | Applies to `ion-menu`. | | Navigation | 0 | Yes | Applies to routing navigation (i.e. Angular Routing). | diff --git a/versioned_docs/version-v6/api/toast.md b/versioned_docs/version-v6/api/toast.md index b0915d8cf8..631139a967 100644 --- a/versioned_docs/version-v6/api/toast.md +++ b/versioned_docs/version-v6/api/toast.md @@ -91,7 +91,7 @@ function Example() { ## Dismissing -The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. +The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. To dismiss the toast after creation, call the `dismiss()` method on the instance. The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event. diff --git a/versioned_docs/version-v6/developing/hardware-back-button.md b/versioned_docs/version-v6/developing/hardware-back-button.md index ff50b2f7f1..2f3271613d 100644 --- a/versioned_docs/version-v6/developing/hardware-back-button.md +++ b/versioned_docs/version-v6/developing/hardware-back-button.md @@ -340,6 +340,6 @@ The table below lists all of the internal hardware back button event handlers th | Handler | Priority | Propagates | Description | | ---------- | -------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| Overlays | 100 | No | Applies to overlay components `ion-action-sheet`, `ion-alert`, `ion-loading`, `ion-modal`, `ion-popover`, `ion-picker`, and `ion-toast`. | +| Overlays | 100 | No | Applies to overlay components `ion-action-sheet`, `ion-alert`, `ion-loading`, `ion-modal`, `ion-popover`, and `ion-picker`. | | Menu | 99 | No | Applies to `ion-menu`. | | Navigation | 0 | Yes | Applies to routing navigation (i.e. Angular Routing). | From 9f14741e9776714561b392bf5636423362990459 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Mon, 27 Mar 2023 09:41:52 -0700 Subject: [PATCH 2/4] fix(toast): revert the removal of the cancel role --- docs/api/toast.md | 2 +- versioned_docs/version-v6/api/toast.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/toast.md b/docs/api/toast.md index d787a43c20..bf74e97cdd 100644 --- a/docs/api/toast.md +++ b/docs/api/toast.md @@ -48,7 +48,7 @@ import ControllerExample from '@site/static/usage/v7/toast/presenting/controller ## Dismissing -The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. To dismiss the toast after creation, call the `dismiss()` method on the instance. +The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event. diff --git a/versioned_docs/version-v6/api/toast.md b/versioned_docs/version-v6/api/toast.md index 631139a967..b0915d8cf8 100644 --- a/versioned_docs/version-v6/api/toast.md +++ b/versioned_docs/version-v6/api/toast.md @@ -91,7 +91,7 @@ function Example() { ## Dismissing -The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. To dismiss the toast after creation, call the `dismiss()` method on the instance. +The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event. From ce4924ba414d931a05c8b9820461da8238c455d1 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Mon, 27 Mar 2023 12:11:17 -0700 Subject: [PATCH 3/4] docs(toast): hardware back buttons will not dismiss toasts --- docs/api/toast.md | 4 +++- versioned_docs/version-v6/api/toast.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/api/toast.md b/docs/api/toast.md index bf74e97cdd..6bad7e6b73 100644 --- a/docs/api/toast.md +++ b/docs/api/toast.md @@ -48,7 +48,9 @@ import ControllerExample from '@site/static/usage/v7/toast/presenting/controller ## Dismissing -The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. +Toasts are intended to be subtle notifications and are not intended to interrupt the user. + +The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. A hardware back button will not dismiss the toast. The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event. diff --git a/versioned_docs/version-v6/api/toast.md b/versioned_docs/version-v6/api/toast.md index b0915d8cf8..fec6edeaf5 100644 --- a/versioned_docs/version-v6/api/toast.md +++ b/versioned_docs/version-v6/api/toast.md @@ -91,7 +91,9 @@ function Example() { ## Dismissing -The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. +Toasts are intended to be subtle notifications and are not intended to interrupt the user. + +The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. A hardware back button will not dismiss the toast. The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event. From 20ba18f79cfafc6ded0a8cb5d005a702191e8613 Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Mon, 27 Mar 2023 13:01:26 -0700 Subject: [PATCH 4/4] docs(toast): change wording to the hardware back button --- docs/api/toast.md | 6 ++++-- versioned_docs/version-v6/api/toast.md | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/api/toast.md b/docs/api/toast.md index 6bad7e6b73..f99a9bfe92 100644 --- a/docs/api/toast.md +++ b/docs/api/toast.md @@ -48,9 +48,11 @@ import ControllerExample from '@site/static/usage/v7/toast/presenting/controller ## Dismissing -Toasts are intended to be subtle notifications and are not intended to interrupt the user. +Toasts are intended to be subtle notifications and should not interrupt the user. As a result, user interaction should not be required to dismiss the toast. -The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. A hardware back button will not dismiss the toast. +The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. + +Pressing the hardware back button does not dismiss toasts since they are not supposed to interrupt the user. The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event. diff --git a/versioned_docs/version-v6/api/toast.md b/versioned_docs/version-v6/api/toast.md index fec6edeaf5..f5fb5184c5 100644 --- a/versioned_docs/version-v6/api/toast.md +++ b/versioned_docs/version-v6/api/toast.md @@ -91,9 +91,11 @@ function Example() { ## Dismissing -Toasts are intended to be subtle notifications and are not intended to interrupt the user. +Toasts are intended to be subtle notifications and should not interrupt the user. As a result, user interaction should not be required to dismiss the toast. -The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. A hardware back button will not dismiss the toast. +The toast can be dismissed automatically after a specific amount of time by passing the number of milliseconds to display it in the `duration` of the toast options. If a button with a role of `"cancel"` is added, then that button will dismiss the toast. To dismiss the toast after creation, call the `dismiss()` method on the instance. + +Pressing the hardware back button does not dismiss toasts since they are not supposed to interrupt the user. The following example demonstrates how to use the `buttons` property to add a button that automatically dismisses the toast when clicked, as well as how to collect the `role` of the dismiss event.