Skip to main content

Module log

Module log 

Source
Expand description

NotificationLog — a scrollable, day-bucketed list of archived notifications.

Renders a NotificationArchiveModel as a scrollable column of StandardListItem rows grouped under section headers (Today / Yesterday / This week / Earlier), computed against the user’s local timezone on every archive mutation. An optional toolbar row provides mark-all-read and clear buttons. Unread rows show the title in BodyBold; read rows use Body. An empty-state hint is shown when the archive is empty.

§Sizing

The log grows into a host that bounds its height and compresses inside one shorter than its natural height (floored at one row); only a host that hugs its content — which is how the overlay layer measures the NotificationCenterButton popover — falls back to preferred_width / preferred_height. Row text is elided, not wrapped, with the full text on the row’s rich tooltip: notification prose is arbitrary and the log does not control its own width, so a wrapping row would over-constrain itself and push its trailing action buttons out of view.

§When to use

ⓘ
let archive: Rc<NotificationArchiveModel> = ctx.app_state().unwrap();
let log = NotificationLog::new(archive)
    .on_action_invoked(|_entry, action, ctx| {
        if let Some(name) = &action.intent_name {
            ctx.send_intent(teksilo_core::Intent::new(name));
        }
    });

§Touch and pen

A log row is a StandardListItem, so its target floor follows the density ladder with every other list row, and its tap replays the entry on the release. The trailing action strip is made of Links and Buttons, each its own target.

Structs§

NotificationLog
Configurable archive log. Shipped chrome: