gpui-kit GitHub

Scenes

step-list

Builds Card List StepList ToolCallCard

step-list in the dark theme
studio-dark
step-list in the light theme
studio-light

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 step_list(_window: &mut Window, cx: &mut App) -> AnyElement {
    let theme = cx.theme().clone();
    stack(&theme)
        .child(caption(&theme, "A run somebody counted"))
        .child(
            StepList::new("scene.steps.counted")
                .step(Step::new("read", "Read the brief").state(StepState::Done))
                .step(
                    Step::new("search", "Search the workspace")
                        .state(StepState::Running)
                        .body(
                            ToolCallCard::new("scene.steps.search.call", "workspace.search")
                                .arguments(scene_arguments())
                                .state(ToolCallState::Running)
                                .elapsed("1.1 s"),
                        ),
                )
                .step(Step::new("summarise", "Summarise what was found"))
                .step(
                    Step::new("publish", "Publish the summary").state(StepState::Skipped(
                        "Publishing is turned off for this workspace.".into(),
                    )),
                )
                .step(
                    // A failure, not a refusal: the skipped step above is what
                    // a refusal looks like, and the two must not be worded
                    // into each other.
                    Step::new("notify", "Notify the reviewers").state(StepState::Failed(
                        "The notification service did not respond.".into(),
                    )),
                ),
        )
        .child(caption(&theme, "A run still being decided"))
        .child(
            StepList::new("scene.steps.open")
                .length(RunLength::Unknown)
                .step(Step::new("read", "Read the brief").state(StepState::Done))
                .step(Step::new("plan", "Decide what to do next").state(StepState::Running)),
        )
        .into_any_element()
}