use motion::Painter;
use ui::popover::{self, Loadable};
match &self.sessions {
Loadable::Loading => popover::redacted_rows("sessions", &theme, 3, Painter::of(cx), cx),
Loadable::Error(message) => popover::error_row(&theme, message.clone())
.child(retry_button)
.into_any_element(),
Loadable::Ready(sessions) => rows(sessions).into_any_element(),
Loadable::Idle => gpui::Empty.into_any_element(),
}- The
Painteris the view that renders the rows; it keeps that view repainting while they are mounted. error_rowpaints the message only; the retry control is a child you add.