pub enum Notice {
Toast,
Banner,
}Expand description
Something the app is telling the user, unprompted.
Two concepts, not one with a placement. They differ in more than where they sit: a toast is transient, stacked and self-dismissing, and a banner is persistent, in flow, one per region, and dismissed by fixing the condition it reports. Folding them into one member with a placement parameter would make lifetime, stacking and dismissal all placement-dependent, which is the description leaking renderer policy.
All three apps have banners: info_banner and warning_banner in
audiofiles, five of them in goingson (sync, sync-result, vacation-day,
timer-active, past-review), .update-banner in Balanced Breakfast. The two
webview apps also have toasts. So neither member is speculative, and no app
gains a concept it lacks except audiofiles, whose renderer may legitimately
decline to draw a toast at all.
Variants§
Toast
Transient, stacked, dismisses itself.
Banner
Persistent, in flow, one per region, dismissed by fixing the cause.