ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.29k stars 99 forks source link

Tab completion for contexts and projects in new task window #572

Closed stephprobst closed 5 months ago

stephprobst commented 8 months ago

Feature Request

Description: In Sleek 1.* there was tab completion when adding topics or projects to a task. It would be great to have that again.

Implementation Details: When typing @ in the new task text box, a selection of the previously used contexts gets displayed. Now the user should be able to hit the tab button to auto-complete with the first entry from this list. Then the user should be able to hit enter to save the task. This would drastically speed up the workflow of adding new tasks.

image

ransome1 commented 5 months ago

@stephprobst this happens because the React component (react-autosuggest) does not support Tab out of the box and I havn't been able to find a work around for this. The supported keyboard shortcut is to use the Arrow Down and Up keys.

ransome1 commented 5 months ago

@stephprobst Actually I kind of fixed this after all. If you use the autocomplete feature to narrow down the results to 1 and then hit tab key, sleek will add the suggestion to the text field. However, if you only narrow it down to 2 or more results, hitting the tab key does not have any effect. My expectation would be, that the first suggestions would be highlighted. However I simply cannot find a solution how to implement this with the react-autosuggest component. I'm afraid this will be a "won't do".

stephprobst commented 5 months ago

@ransome1 : Great. That's definitely helpful and should solve the issue for me. Thanks!

ransome1 commented 5 months ago

Please re-open, if it is not working as expected.