-
Notifications
You must be signed in to change notification settings - Fork 33k
Fix search results don't automatically update on editor changes, if I move the Search view to another location #215764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -299,6 +299,8 @@ export class SearchView extends ViewPane { | |||
this.searchWidget.prependReplaceHistory(restoredHistory.replace); | |||
} | |||
})); | |||
|
|||
this.changedWhileHidden = this.hasSearchResults(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed for this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it has to be initialized with the proper value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine. I just don't really understand how the two changes that you made are linked. I tried testing without this change above and the bug was still resolved. It seemed that the bug was primarily fixed by not registering the searchViewModelWorkbenchService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- With this line change, if you had search results already displayed, after you move the search view it will still render them.
- Without this line change, if you had search results already displayed, after you move the search view it will be empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh okay, that's a different bug. I interpreted the original bug as the entries not updating once you move the search viewlet. However, this seems to be that the information in the search viewlet does not retain itself across views. Do you mind creating an issue for that and linking that to this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! just one comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for the contribution!
Fixes #215437
Fixes #225064