Skip to content

[Request] Grouped spinners? #152

Open
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Is your feature request related to a problem? Please describe.

Grouping (https://github.com/natemoo-re/clack/tree/24a3f4a20019c7dad2f69bcf163a8b5a3f747a16/packages/prompts#grouping) is available right now for prompts, but not for spinners. But I'd like to group the spinners together too: having a parent task and sub-task.

Describe the solution you'd like

Could we add a new spinner API analogous to p.group? Maybe, p.spinnerGroup?

await p.spinnerGroup("Outer group", [
  ["First sub-task", async () => { /* ... */ }],
  ["Second sub-task", async () => { /* ... */ }],
  ["Third sub-task", async () => { /* ... */ }],
]);

Describe alternatives you've considered

In JoshuaKGoldberg/create-typescript-app#708 -> JoshuaKGoldberg/create-typescript-app#710 I kind of did it manually, wrapping around Clack. It's not great.

Screen.Recording.2023-08-26.at.2.17.08.PM.mov

Additional context

I'd be happy to contribute this, or if you don't want to keep it as a core feature, publish it as a standalone helper package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions