zadjii-msft / PowerToys

Windows system utilities to maximize productivity
MIT License
3 stars 2 forks source link

Spec, basic impl for `TextToSuggest` #145

Closed zadjii-msft closed 1 week ago

zadjii-msft commented 2 weeks ago

As discussed in #121.

Adds a new IListItem.TextToSuggest property. If an extension populates that, and the user hits right-arrow when the item is selected, we'll set the SearchText to that text.

I didn't give it a UI treatment, because

  1. I'm not good at XAML
  2. As noted in https://github.com/zadjii-msft/PowerToys/issues/121#issuecomment-2464704543, there's complicated edge cases here. You have to track what's actually been typed, and then also have a ghost suggestion for the very first item (before the user types/up/downs at all).

I didn't think it was valuable to implement that right now before we have A Real App.

joadoumie commented 2 weeks ago

Nice! This is neat. I'm gonna have to figure out exactly how we handle this in Wox/Run edge cases.

Mobile so forgive the weird everything formatting.

There's sorta an interesting (sauna heat induced) thought im having... it would be cool for things like GitHub to have the text to be displayed (visual for user) be things like "issue:, status: "... stuff that would help the user understand how the page may be dynamically filtered. I could imagine a world where if I have already a valid filter like "author@me" or something, when I type the next thing in the filter box we could suggest additional filter types for example.

All to say... some cool dynamic way to take the context of the current search filter, choose the text to display that is unrelated to any of the list items and have that be thing that gets autocompleted.

Rereading this, this may literally already be something I've (we?) have called out in other places on this thread.