Skip to content

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

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

jeanp413
Copy link
Contributor

@jeanp413 jeanp413 commented Jun 16, 2024

Fixes #215437
Fixes #225064

@@ -299,6 +299,8 @@ export class SearchView extends ViewPane {
this.searchWidget.prependReplaceHistory(restoredHistory.replace);
}
}));

this.changedWhileHidden = this.hasSearchResults();
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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

Copy link
Contributor Author

@jeanp413 jeanp413 Aug 6, 2024

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.

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 👍

Copy link
Contributor

@andreamah andreamah left a 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

Copy link
Contributor

@andreamah andreamah left a 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!

@vs-code-engineering vs-code-engineering bot added this to the August 2024 milestone Aug 7, 2024
@andreamah andreamah enabled auto-merge (squash) August 7, 2024 15:16
@andreamah andreamah merged commit a4f676a into microsoft:main Aug 13, 2024
6 checks passed
@jeanp413 jeanp413 deleted the fix-215437 branch August 13, 2024 15:44
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants