Add history to new list/tree search/filter widget (#155578)#159188
Add history to new list/tree search/filter widget (#155578)#159188joaomoreno merged 16 commits intomicrosoft:mainfrom
Conversation
|
/assign @joaomoreno |
|
@joaomoreno please consider merging this as well as #158583. Both of them add some shine to the recent list/tree search/filter rework. |
There was a problem hiding this comment.
@gjsjohnmurray This feels strange right now:
- We should definitely persist the history in memory, as long as the tree is alive.
- I don't think the current behavior makes sense: DownArrow will either navigate history or jump to the list, depending on the history's cursor position. This makes for very strange behavior. I don't have a good suggestion to solve this.
- Are all those changes deep in
history.tsreally necessary?
Adding
Nor do I. Removing current behaviour of DownArrow taking you back to the tree/list is likely to cause complaints as people adapt to using Enter for this instead. If I have UpArrowed up the history, then press one too many DownArrows, yes, I end of off the widget. But I can use Ctrl/Cmd+F to get back there quickly. |
I have pushed a change to do this, plus another than persists the search/filter mode for the tree across close/reopen of the widget. |
|
@joaomoreno does this need more work from me before you will merge it? |
|
Sorry for the delay here @gjsjohnmurray! Happy new year and thank you! 🍻 |
This PR is for #155578.
While the widget remains open it accumulates search strings. Each one gets added when focus moves off the widget (typically to the tree, e.g. when DownArrow is pressed).
UpArrow in the widget's input field recalls previous history entries. Enter is implemented as an alternative shortcut into the tree, useful when you have navigated up the history and DownArrow no longer gets you there because instead it takes you down the history list.
At this time history is not persisted when the widget is closed.