idpaterson / alfred-wunderlist-workflow

Unbelievably fast task entry in Wunderlist with due dates, reminders, and recurrence
298 stars 8 forks source link

Autocompletion of lists in wl command #5

Closed idpaterson closed 10 years ago

idpaterson commented 10 years ago

Currently, the wl command requires the user to type the text of a task, then use the arrow keys to select the desired list. It would be preferable to use a suggestion pattern instead where the lists are filtered while typing, provided that the text matches a list name.

Examples

Consider the following lists: Inbox, Starred, Today, Wishlist

List Autocompletion

  1. wl
    • Most recent list
    • Inbox
    • Today
    • Starred
    • Wishlist
  2. wl t
    • Today
    • Starred
    • Wishlist
  3. wl tod
    • Today
  4. tab or return key to autocomplete
  5. wl Today:
    • Today
  6. wl Today:Finish presentation
    • Today
  7. return to add the task to Today

    List shortcut

  8. wl
    • Most recent list
    • Inbox
    • Today
    • Starred
    • Wishlist
  9. wl t
    • Today
    • Starred
    • Wishlist
  10. wl t:
    • Today (just the top match)
  11. wl t:Finish presentation
    • Today
  12. return to add the task to Today

Once the user has typed : all autocompletion will stop. Actioning a list causes the shortcut to be replaced with the index of the list it refers to, so that the existing input handling in addTask() does not need to change.

The order of suggestions will probably just be based on the order in Wunderlist after filtering out non-matching lists. It would be more difficult to use if the same shortcut does not always work for a specific list, so Alfred's most-used ordering would not be appropriate.

Maintain original functionality

  1. wl
    • Most recent list
    • Inbox
    • Today
    • Starred
    • Wishlist
  2. wl W
    • Wishlist
  3. wl Walk the dog
    • Most recent list
    • Inbox
    • Today
    • Starred
    • Wishlist
  4. down arrow to Today
  5. return to add the task to Today

If the text does not match, show all lists and disable autocompletion.

idpaterson commented 10 years ago

A separate wl keyword input currently provides the "Most recently used list" option, but in order to make autocompletion work nicely, that will need to be wrapped into the wl script filter. When filtering lists it should appear at the bottom rather than the top, or possibly not at all.

These would eventually need to be merged for anyway for issue #3.

idpaterson commented 10 years ago

The implementation currently displays the "Most recently used list" option at the bottom. I think it may be better to remove it entirely because it seems to be a distraction while autocompleting. It's great if the user is just going to enter a task to add to the most recent list, but seems unnecessary during and after autocompletion.

idpaterson commented 10 years ago

This seems to be working quite well, I plan to do a beta testing release for the feature while I finish up the other miscellaneous issues in 0.2