Replace `inquirer` with `prompts`
segersniels opened this issue · 7 comments
Description of the problem
It seems like inquirer
still has issues with flickering prompts when typing which results in bad UX which it has been having for a very long time.
Solution
Might have to check if viable to switch away from inquirer
to something like prompts
for better UX.
From my own experiences prompts
doesn't have this issue.
https://www.npmjs.com/package/prompts
Alternatives
No response
Additional context
See video for weird flickering issue in inquirer
.
Screen.Recording.2023-05-08.at.11.26.04.mov
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue requesting the same feature.
Hey! @segersniels thanks for opening the issue I believe it's a great idea
I'm happy to move away from inquirer if this library provides better UX for our users. I see they even have autocomplete
support, so we should be able to fit this 1:1 ❤️
Had a quick go at this. While it does provide better UX (read: less flickering) during gitmoji selection it does introduce a bunch of flickering during the title prompt due to the input transforming that takes place (showing capitalization and max title length count). Without the mutation of the input the rendering is fine, but don't want to introduce regressions so going to leave this as is.
Screen.Recording.2023-06-06.at.15.22.37.mov
Screen.Recording.2023-06-06.at.15.23.43.mov
Actually, I just noticed that the live version also flickers when typing during the title prompt. So there's not really a regression (besides maybe a slight increase in flickering). Doesn't take away from the fact that transforming the title during typing slows down the rendering and causes the flickering as you can see in the first video posted where the mutation doesn't happen and there's no flickering (with prompts).
Screen.Recording.2023-06-07.at.13.31.39.mov
Doesn't take away from the fact that transforming the title during typing slows down the rendering and causes the flickering as you can see in the first video posted where the mutation doesn't happen and there's no flickering (with prompts).
Yes, every transformation to the input will cause some flickering as the terminal needs to re-render that reacting to user input, so it will flicker no matter what dependency we use for the prompts.
Even though looks like in the auto select prompt the experience is a bit better (as there's no flickering at all)
Even though looks like in the auto select prompt the experience is a bit better (as there's no flickering at all)
Assuming you're talking about the first video posted, that's without the first letter capitalisation visible during writing and the max character length though. Removing that would be a slight regression in UX since people probably have grown used to it (more so the char length count).
Thought you were talking about the text input. Yeah the select prompt of the gitmojis is a lot smoother with prompts
.