conversation
Builds DescriptionList Divider List Markdown MessageList 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 conversation(_window: &mut Window, cx: &mut App) -> AnyElement {
let theme = cx.theme().clone();
stack(&theme)
.w(px(560.0))
.child(
MessageList::new("scene.conversation.thread", scene_thread())
.group_consecutive(true)
.body_lines(2)
.on_retry(|_, _, _| {})
.on_markdown(|_, _, _, _| {}),
)
.child(
Divider::new()
.id("scene.conversation.rule")
.label("Scrolled away from the newest message"),
)
.child(
// A viewport shorter than the thread opens at its top, so the
// messages below it have never been on screen and the list says
// how many there are rather than letting them be discovered.
MessageList::new("scene.conversation.behind", scene_thread())
.visible_rows(2)
.body_lines(2)
.on_retry(|_, _, _| {}),
)
.into_any_element()
}