Skip to content
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

docs(toast): remove hardware back button dismissal #2854

Merged
merged 4 commits into from
Mar 27, 2023
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
4 changes: 4 additions & 0 deletions docs/api/toast.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ import ControllerExample from '@site/static/usage/v7/toast/presenting/controller

## Dismissing

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.

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.

import ButtonsPlayground from '@site/static/usage/v7/toast/buttons/index.md';
Expand Down
2 changes: 1 addition & 1 deletion docs/developing/hardware-back-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -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). |
4 changes: 4 additions & 0 deletions versioned_docs/version-v6/api/toast.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ function Example() {

## Dismissing

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.

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.

import ButtonsPlayground from '@site/static/usage/v6/toast/buttons/index.md';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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). |