laravel/prompts

Track typed value on Multiselect and Select

utsavsomaiya opened this issue · 12 comments

Let's take one example:

image

Now I will down to the next page which is already PR pending. But when I type rather than the default is null at that time we will introduce search!!.

select-prompt.mp4

Here is the real-world use case!! I pressed version 5 then it will highlight 5.

When it's too large select the box rather than going down. It will become fast!!

Something like this:

select-prompt.mp4

Hey @utsavsomaiya,

Thanks for the suggestion. This is something I've wanted to do from the beginning to make Prompts even more like web-based form inputs. I even thought that once you started typing letters, it could show a search field somewhere and then filter the list instead of just jumping to the first matching item, which would improve what the standard web-based form inputs do. I'm not sure where I would display the text input though as any increase in the prompt height can be jarring if the prompt is at the bottom of the terminal.

I'm also a little torn on how much we need it now that we have the search prompt and hopefully the multisearch prompt (#58), which are better for large lists.

This isn't a big priority for me at the moment, so it might be a while before I can look into it. I'm open to PRs as long as the UX feels right.

Okay... no worries @jessarcher .

I closed this issue.

@jessarcher Can we add password reveal functionality on password prompt?

@utsavsomaiya how would you propose it's toggled on and off?

Get the key from the users or static any key. And when it's press it will be on ... next time it press it will be off.

What key do you think would be a good default? And how would we let the user know the feature exists and how to toggle it?

I was thinking maybe an icon/button on the right (where the arrow currently appears on the suggest prompt), and you could press Tab to highlight it and Space to toggle it. Not sure, though.

Okay @jessarcher

I will make a PR. After you will suggest me. So its confirmed first with you. That's why we both understand the flow.

Thanks. ☺

I can't make any promises about it getting accepted - it's ultimately up to Taylor. But if you really want the feature then it's worth having a go 🙂

I can't make any promises about it getting accepted - it's ultimately up to Taylor. But if you really want the feature then it's worth having a go 🙂

image

Okay