laravel / prompts

Beautiful and user-friendly forms for your command-line PHP applications.
https://laravel.com/docs/prompts
MIT License
533 stars 94 forks source link

Add help text or expected input to multi-select prompts #48

Closed afolson closed 1 year ago

afolson commented 1 year ago

When presented with a multi-select prompt, it's not clear what input is expected in order to select options:

Screenshot 2023-08-11 at 11 00 14 PM

I looked in the docs but didn't see any info there. Ultimately I ended up on the issue tracker where another user had the same issue: https://github.com/laravel/prompts/issues/41 I tried various key combinations (y/n, 1/0, return, tab/ctrl/shift/alt/cmd combinations) but spacebar wasn't one of them 🫣. A line that says "Use spacebar to select options" or a mention in the docs (or both) would definitely help here.

@jessarcher You mentioned the possibility of adding this feature https://github.com/laravel/prompts/issues/41#issuecomment-1666808775 so I figured I'd open up an issue to +1 the idea.

devajmeireles commented 1 year ago

When presented with a multi-select prompt, it's not clear what input is expected in order to select options:

Screenshot 2023-08-11 at 11 00 14 PM

I looked in the docs but didn't see any info there. Ultimately I ended up on the issue tracker where another user had the same issue: #41 I tried various key combinations (y/n, 1/0, return, tab/ctrl/shift/alt/cmd combinations) but spacebar wasn't one of them 🫣. A line that says "Use spacebar to select options" or a mention in the docs (or both) would definitely help here.

@jessarcher You mentioned the possibility of adding this feature #41 (comment) so I figured I'd open up an issue to +1 the idea.

Perhaps you are looking for something like that?

jessarcher commented 1 year ago

Hey, @afolson!

Thanks for letting me know. Once #44 is merged, I'll PR the installer to add hint text along the lines of "Press the spacebar to select options."

We could also make the y/n keys select and de-select, as those keys are currently unbound for the multi-select prompt.

jessarcher commented 1 year ago

PR #50 adds a hint to multiselect prompts by default :slightly_smiling_face: