Skip to content

Conversation

DieterHolvoet
Copy link
Contributor

Symfony Console has the possibility to filter option lists by default. This functionality was lost when we started using Laravel Prompts. Laravel Prompts does offer this functionality, but under the search input instead of the select input and the multisearch input instead of the multiselect input. I propose using the search inputs in cases where the option lists are (potentially) long, to improve UX.

@weitzman
Copy link
Member

IMO, the search UX is more cluttered than the select UX. Lets only use search when we expect 20 or more options. So that rules out cache:clear among others.

@DieterHolvoet
Copy link
Contributor Author

Okay, I reverted for the cache/site install/topic commands. An idea for commands where the amount of options depends on the size of the site: dynamically call either search or select if the amount of options is higher or lower than 20. Like this:

$this->io()->{count($choices) > 20 ? 'search' : 'select'}(...)

Could be good for eg. the image commands. There can be a lot of image styles depending on the site configuration.
Could we take 10 options as the threshold? Since that's the amount of options that are visible by default, without scrolling.

@weitzman
Copy link
Member

weitzman commented Aug 5, 2025

Could we create a wrapper prompts that automatically switch between select/search and multiselect/multisearch. i kinda think that we should use 20 as the threshold and we experiment with showing 20 by default in select. I think select lists have better UX at lower item counts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants