-
Notifications
You must be signed in to change notification settings - Fork 144
feat(autocomplete-multiselect): allow select all and selecting inverse using shift up/down #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: e6bc235 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, what do you think? @43081j 👀
this is a difficult one, the bindings dont seem intuitive to me (shift+up being select all). but we can't have ctrl-a since it is likely to be bound outside of what's running in the terminal (i.e. the terminal app probably will catch that, or tmux in my case). additionally, you need to be able to type into this prompt, so it can't be i wonder if we could have |
also cc. @natemoo-re some thoughts whenever you have a chance 🫣 |
@43081j yeah i was not very happy with these specific bindings either, but almost i encountered some limitation with most others ( Only allowing select all/invert during navigation is an interesting idea, but i do think that would be a worse experience than having a globally accessible binding, and also kind of difficult to communicate (should we only show the hint during navigation then?). I was also thinking of maybe Any keybind that also maps onto a searchable character would likely also need to erase that character immediately after, which I couldn't figure out how to do personally, but i'm sure someone here does! Just to throw out some further suggestions for select all/invert respectively
thank you all for taking the time to look at this~ |
This PR adds the ability to select all/inverse items for the
autocompleMultiselect
prompt, using Shift+Up (select all) and Shift+Down (select inverse)See this (badly) in action here
https://github.com/user-attachments/assets/1a1275c7-51a2-4017-9232-8e8b09b748f5
Caveats/things that can be changed
prompt
base class.ctrl+a
andctrl+i
, butctrl+i
=tab
in node readline.[
and]
, but could not erase those.Prompt
that erases_actionKey
s, but that relies on the key having a name, which[
and]
do not havectrl+h
toPrompt.rl
, butPrompt.rl
is private.Prompt.rl
Let me know what you think and whether i should change anything!