SBoudrias / Inquirer.js

A collection of common interactive command line user interfaces.
MIT License
20.29k stars 1.3k forks source link

I want to change prefix after answered. #1537

Closed jihea-park closed 2 months ago

jihea-park commented 2 months ago

Hi, I want to change prefix from ? to ✔ after answered. like create-next-app

스크린샷 2024-09-05 오후 7 31 09

Is there any solution?

SBoudrias commented 2 months ago

Ah, this isn't implemented as of now. But I think it make sense to add this feature in.

If you want to give it a stab, we should modify usePrefix here. I'd replace isLoading with state and return different prefix values based on that.

nicholas-tayag commented 2 months ago

Hi, can i get assigned to this? I'd like to try it.

SBoudrias commented 2 months ago

@nicholas-tayag for sure! Let me know if you have questions

nvlang commented 2 months ago

In a similar vein, I think it could be really nice to be able to get an additional argument for the style.message function in theme objects; currently, it receives only the message string, but if it also received, e.g., a second argument status: 'pending' | 'done', users could, e.g., dim questions that have already been answered, or make the currently pending question brighter.

SBoudrias commented 2 months ago

@nvlang Happy to review a PR adding this feature.

nvlang commented 2 months ago

@SBoudrias Just made a PR (#1544) implementing this and some changes to usePrefix. I'd love to hear what you think.

nicholas-tayag commented 2 months ago

hi @SBoudrias, I noticed that someone put up a PR already solving this issue. Is it still alright if I work on this? This is my first time doing open-source contributions so I'm not sure how this works...

SBoudrias commented 2 months ago

Hey @nicholas-tayag, this is a rare case where I think N. V. wanted this feature badly and sent a PR faster. And also, a rare case because you're following up! Most often people say they'll work on something, and never come back 😅 Because of this, PRs are truly about first person to send one.

Given we have a PR in a pretty close state to being merge, you should look into recent-ish issues and see if there's another feature you'd be interested to work on.