Persist settings search when reloaded#59704
Persist settings search when reloaded#59704roblourens merged 2 commits intomicrosoft:masterfrom usatiuk:persistent-settings-search
Conversation
| // Make sure that all extensions' settings are included in search results | ||
| const cachedState = this.editorMemento.loadState(this.group, this.input); | ||
| if (cachedState && cachedState.searchQuery) { | ||
| this.triggerSearch(cachedState.searchQuery); |
There was a problem hiding this comment.
I'm not totally sure, but since this will trigger a render when it's done, can we avoid calling renderTree here?
Also, is this always safe to call before settingsTreeModel has been created?
|
It looks like the goal is to only persist the state when the editor was closed while visible, but for some reason that's not working for me. It always persists the state. Does it work for you? |
There was a problem hiding this comment.
Apparently, this.input is already cleared there, so clearState doesn't do anything
There was a problem hiding this comment.
If we clean the state just before clearing input, it works, and has basically the same effect as if in setEditorVisible (clear the state when settings are invisible)
There was a problem hiding this comment.
Calling this before settingsTreeModel has been created doesn't seem to cause any issue, but I put it here just in case.
|
Now it should work as intended. |
roblourens
left a comment
There was a problem hiding this comment.
Sorry for the delay, this looks great! Thanks for the PR!
Implements #57289