Skip to content
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

Search-In-Worspace: no more different substrings/duplicates in search result #7990

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

jbicker
Copy link
Contributor

@jbicker jbicker commented Jun 10, 2020

What it does

It solves the bug described here: #7282.
TL;DR: Sometimes one had different substrings in the search results and so one line shown more than once.

Fixes #7282

How to test

Type into the search box a search term and keep typing while the search is performed in the background. E.g. search for “ContainerModule”. Stop typing and wait for the result list.
There shouldn't be any duplicates anymore.

Review checklist

Reminder for reviewers

@jbicker jbicker requested a review from akosyakov June 10, 2020 15:04
if (searchId) {
this.searchService.cancel(searchId);
}
this.cancelIndicator = undefined;
Copy link
Contributor Author

@jbicker jbicker Jun 10, 2020

Choose a reason for hiding this comment

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

Problem was, that this handler was sometimes called after a new cancelIndicator was already created and so immediately set it back to undefined, which then caused that earlier tokens never got cancelled.

@jbicker jbicker requested review from svenefftinge, AlexTugarev and vince-fugnitto and removed request for akosyakov June 10, 2020 15:15
@jbicker jbicker changed the title Search-In-Worspace: no more different substrings in search result Search-In-Worspace: no more different substrings/duplicates in search result Jun 10, 2020
@akosyakov akosyakov added the search in workspace issues related to the search-in-workspace label Jun 10, 2020
@kittaakos
Copy link
Contributor

It solves the bug described here.

The link does not work.

@jbicker
Copy link
Contributor Author

jbicker commented Jun 11, 2020

It solves the bug described here.

The link does not work.

Thanks! Obviously I expected too much and tested the comment too less.

@kittaakos kittaakos self-requested a review June 17, 2020 14:07
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

I have tried it very hard to reproduce the defect with these changes, but I could not 👍 Very nice fix.

I added a remark.

I could hit the same issue without this changeset:

screencast 2020-06-17 15-48-50

@jbicker jbicker force-pushed the jbicker/search-in-workspace-search-7282 branch from ef36e65 to ac65a35 Compare June 18, 2020 08:19
@jbicker jbicker merged commit d017cb2 into master Jun 19, 2020
@jbicker jbicker deleted the jbicker/search-in-workspace-search-7282 branch June 19, 2020 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
search in workspace issues related to the search-in-workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[search-in-workspace] Search finds different substrings of search term
3 participants