Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

.nornir/widgets/facett-toast.md

facett-toast — design note

Status: builds (egui 0.33) + 3 tests green. In ordning/crates/widgets/facett-toast; destined for facett.

What it is

A toast/snackbar overlay: timed notifications (assignment, @mention, SLA breach) stacked top-right and auto-dismissed. Levels Info/Success/Warn/Error (colored). A toast may link a case (click → navigate).

API

let mut toasts = Toasts::new();
toasts.push("Assigned to you", Level::Info, 4.0);
toasts.push_case("SLA breach on BL-12", Level::Error, 8.0, Some("BL-12".into()));
// each frame:
toasts.tick(dt_seconds);   // host supplies the delta — widget never reads the clock
toasts.ui(ctx);            // paints an Area overlay (uses Context, not Ui)
if let Some(case) = toasts.take_clicked_case() { /* navigate */ }

Design decisions

TODO on move