whatscli icon indicating copy to clipboard operation
whatscli copied to clipboard

[Feature] Search contact

Open lai32290 opened this issue 5 years ago • 4 comments

I don't know how complicated this can be, but I'll be so good if it's possible to search contact, like using / in the Vim way when is focus on the Contacts board.

lai32290 avatar Nov 20 '20 10:11 lai32290

Just wanted to let you know that I didn't forget about this. It's a good idea, I just don't know how its best implemented yet. For the user there should basically be a small input box at the top of the chat list when they have the chats selected and press "/" - that much is clear. The question is how to best implement that with tview - make a modal with a text input? Maybe. But then the other key bindings have to be disabled while that text input is focused. So its a bit more complicated than just adding a input field.

normen avatar Nov 28 '20 17:11 normen

Maybe upon pressing / app goes into 'search mode' and depending on what panel user is in, the search behavior differs? Like in messages panel, it should highlight most recent message after fuzzy searching with facility to go backwards or forwards like in vim-like apps. In contact, it should fuzzy search and simply highlight the select recommendation.

a-y-u-s-h avatar Nov 18 '21 11:11 a-y-u-s-h

Again, the "how does it work on the user side" is the least issue.

normen avatar Nov 19 '21 08:11 normen

Oh okay, stupid me. Maybe you're looking for state machines / state charts? It will reduce the complexity a lot. I'm rusty with my go so don't have anything else to contribute.

a-y-u-s-h avatar Nov 19 '21 15:11 a-y-u-s-h