Ash preparation that tells each event-log row whether it opens a new day in the timeline, and — when
it does — how many events that whole day holds. The day heading
MishkaCmsCoreWeb.Templates.ActivityTimeline draws is built from both.
A LiveView stream never hands a row its predecessor, so the marks are decided here, where the page
is still an ordered list, and carried on each record's metadata (:first_of_day?, :day_count).
Both figures are counted through the very same query the page read — the tenant scope of
MishkaDocument.Resources.Helpers.TenantSiteFilter and whatever filters are active — so a heading
can never disagree with the rows under it. They count the whole day rather than the loaded window:
the log pages with load_more, and a heading counting only the loaded rows would keep climbing as
you scroll.
Summary
Functions
Callback implementation for Ash.Resource.Preparation.init/1.
Callback implementation for Ash.Resource.Preparation.supports/1.
Callback implementation for Ash.Resource.Preparation.temporal_safe?/1.
Functions
Callback implementation for Ash.Resource.Preparation.init/1.
Callback implementation for Ash.Resource.Preparation.supports/1.
Callback implementation for Ash.Resource.Preparation.temporal_safe?/1.