detail
Builds DescriptionList List Timeline


The code that drew it
A still frame holds a repeating animation at its first frame and a one-shot at its last, because a still of a moving thing is not reproducible. Run the gallery to review motion.
fn detail(_window: &mut Window, cx: &mut App) -> AnyElement {
let theme = cx.theme().clone();
stack(&theme)
.w(px(640.0))
.child(caption(
&theme,
"unknown, not applicable, and redacted are three facts",
))
.child(
DescriptionList::new("scene.detail.facts")
.columns(2)
.items([
DescriptionItem::new("id", "Run", "run-4821"),
DescriptionItem::new("owner", "Owner", "fixture-owner"),
DescriptionItem::new("finished", "Finished", DescriptionValue::Unknown),
DescriptionItem::new("artifact", "Artifact", DescriptionValue::NotApplicable),
DescriptionItem::new(
"token",
"Access token",
DescriptionValue::redacted("51 characters"),
)
.copyable(true),
])
.on_copy(|_, _, _| {}),
)
.child(caption(
&theme,
"what happened, in the words the host chose",
))
.child(
Timeline::new("scene.detail.activity")
.group(
TimelineGroup::new("today", "Today")
.entry(
TimelineEntry::new("queued", "Run queued")
.time("09:12")
.actor("fixture-owner")
.tone(Tone::Neutral),
)
.entry(
TimelineEntry::new("started", "Indexing started")
.time("09:13")
.actor("scheduler")
.tone(Tone::Info),
)
.entry(
TimelineEntry::new("failed", "Indexing failed")
.time("09:41")
.actor("scheduler")
.tone(Tone::Danger)
.detail(div().child(SharedString::new_static(
"The host refused the request. The refusal is shown as it \
arrived.",
))),
),
)
.group(
TimelineGroup::new("earlier", "Earlier").entry(
TimelineEntry::new("imported", "Workspace imported")
.time_unknown()
.actor("fixture-owner")
.tone(Tone::Neutral),
),
),
)
.into_any_element()
}