Skip to content

Add Blockly.dialog.toast and friends #8824

@rachel-fenichel

Description

@rachel-fenichel

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

In working on keyboard navigation we found that we needed a way to give feedback on certain actions, such as copy and paste. Toasts are a standard way to do this.

Like prompt and alert, this should have a basic implementation and be overrideable by the parent application, so that the style of the toast matches the rest of the page.

Request

  • Create toast, toastImplementation and setToast in core/dialog.ts.
  • Create a base implementation of toast.
  • Add tests.

Alternatives considered

Implement the toast in Blockly core and only allow the parent application to change it through CSS.

Additional context

Toasts can have accessibility issues. More research is needed to see if there is a consensus within the accessibility community about how to do this well. The results may change our base implementation of toast and/or lead to published guideslines about the toast.

See RaspberryPiFoundation/blockly-keyboard-experimentation#230

Metadata

Metadata

Assignees

Labels

issue: feature requestDescribes a new feature and why it should be added

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions