You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a task with multiple spinners that are over with particularly quickly, only one spinner instance is shown, but the message: argument changes:
This is great, but if multiple tasks run quickly, the spinner simply appears to keep the text from the first instance that was around long enough to render the message:
Of course, you can add info calls to intersperse them:
But the spinner disappears and just leaves the info messages in one big "dump".
Suggestion: Persistent / Completed spinner.
When a spinner completes it's callback, the spinner persists in the UI, but with a checkmark next to it, or, if it failed, a red cross?
This way, you get: predictable output for tasks and can see previous completions.
The ability to change the message yourself when the task is complete would be super handy too, for example, we use spin in our deployment script, which has a few stages.
It would be great if we could change this to something custom like "Assets Packaged!" etc.
If you're open to taking this a step further, I would recommend taking a look at the Listr package for NodeJS for inspiration. It has a nice and clean api for creating multi-step tasks. All tasks can provide callbacks that determine if they should be disabled or skipped at runtime. All callbacks receive a shared Context object, which they can read from and add to, which allows them to adapt to information provided by previous steps, or pass information on to future tasks. A task can even be a nested list of sub-tasks.
When running a task with multiple spinners that are over with particularly quickly, only one spinner instance is shown, but the
message:
argument changes:This is great, but if multiple tasks run quickly, the spinner simply appears to keep the text from the first instance that was around long enough to render the message:
Of course, you can add
info
calls to intersperse them:But the spinner disappears and just leaves the info messages in one big "dump".
Suggestion: Persistent / Completed spinner.
When a spinner completes it's callback, the spinner persists in the UI, but with a checkmark next to it, or, if it failed, a red cross?
This way, you get: predictable output for tasks and can see previous completions.
I would suggest a
persist
argument to the class:Please excuse the bad photoshop next...
Something like this?
Would love to know your thoughts.
The text was updated successfully, but these errors were encountered: