mdToast: improve UX to support theme colors and multi-toasts to show
@joeyperson - This seems like an entirely reasonable and useful UX; especially for desktop experiences.
This is what I wondered when reading the material design specs. A single toast popping up and being replaced by another is perfectly valid UX on mobile because the user doesn't want to be overwhelmed by a line of toasts blocking their view.
But on desktops with ample space and screen real estate, to restrict the developer to a single toast whose information is hidden by another isn't really necessary.
Having a distinct color makes total sense, especially as dark designs would not work well with a dark toast with little contrast.
Re: multi-toasts, I think the idea is to keep toasts to a single event at a time, as there may be actions that are available for them, and could fade out of view before reading them all. If many messages are needed, I'd imagine using a different pattern that could include a list of alerts.
Yup, otherwise every project would define the red error message and the green success message.
Word from UX: it's okay to allow (we're not going to be the bad ui police)
@EladBezalel
The goal is to easy apply a different theme (background and text color) to custom toasts. If I add this change to src/components/toast/demoBasicUsage/script.js:
.config(function($mdThemingProvider){
$mdThemingProvider.theme('splashRed')
.backgroundPalette('red');
});
And then use this:
var toast = $mdToast.simple()
.textContent('Marked as read')
.action('UNDO')
.theme('splashRed');
Then splashRed theme is not used... nor is it contained in the THEMES internal registry.
Seems like a major bug.
@ThomasBurleson I was trying the exact procedure to switch the the theme on mdToast and its not working for me either. Using 1.0.6. The theme I am using is "success" and its registered:

The docs seem to say that it should work. Will this be fixed in 1.0.6 or 1.1.0?
After inner conflicts about this issue i came to those resolutions:
- Toast shouldn't support background and foreground color change by the theme.
- Toast shouldn't support background and foreground color via a public api
- Toast should (and supports) any style changes by overriding material classes
You can see a demo here
@ThomasBurleson thoughts?
@EladBezalel codepen fails due to wrong ngMaterial reference: http://localhost:8080/angular-material.js
@DmitryEfimenko fixed thanks :)
if you care for my opinion - @EladBezalel's resolutions sound great to me. Style changes are very easy. This just needs to be documented.
Actually, creating a separate template for each toast you want to show is painful. Just let developers apply whatever class they want to the <md-toast>. Then they'll be able to style things that way.
let message = this.$mdToast.simple();
message.toastClass('my-error')
md-toast.my-error .md-toast-content {
background-color: red;
}
@DmitryEfimenko sounds reasonable.
