Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animated spinner #284

Open
adesombergh opened this issue Mar 21, 2024 · 4 comments · May be fixed by #334
Open

Animated spinner #284

adesombergh opened this issue Mar 21, 2024 · 4 comments · May be fixed by #334
Labels
enhancement New feature or request

Comments

@adesombergh
Copy link

Environment

"consola": "^3.2.3"
Tested on node 20 and 18

Reproduction

Stackblitz reproduction here
Github repo here

Describe the bug

Following this exemple i expect consola to show a spinner while the promise resolve. However only a static ◐ character is visible.

Additional context

I don't know if it's related but the spinner function in /src/utils/prompt.ts is never called in the project.

Logs

No response

@atinux atinux added the bug Something isn't working label Mar 22, 2024
@zerosrat
Copy link

I search sipnner in the repo and find out sippner in src/utils/prompt.ts is never imported

@m0nch1
Copy link

m0nch1 commented Apr 17, 2024

I search sipnner in the repo and find out sippner in src/utils/prompt.ts is never imported

As mentioned above, I think that spinner is simply not used in the sample, although it is available as an implementation.
So I created a PR!

cc: @adesombergh @zerosrat

@adesombergh
Copy link
Author

Thank you @m0nch1 , however changing the examples does not fix the issue. Running consola.start(), await new Promise((resolve) => setTimeout(resolve, 1000));, consola.success() will still not show an animated spinner as expected.

@zerosrat
Copy link

zerosrat commented Apr 23, 2024

I think another way to address the use of spinner is to use other npm packages, such as ora+cli-spinners. That's what I'm doing now, using consola for the non-spinner parts and other npm packages for the spinner parts.

@pi0 pi0 changed the title Spinner not spining Animated spinner Dec 28, 2024
@pi0 pi0 added enhancement New feature or request and removed bug Something isn't working labels Dec 28, 2024
@pi0 pi0 linked a pull request Dec 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants