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-workspace] fix search-in-workspace search result info #5701

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

vince-fugnitto
Copy link
Member

Fixes #5698

  • fixes an issue where the message No Results Found. is displayed
    as a user types and attempts to search. The problem is that the message
    is displayed before the search actually completes due to a update().
    Instead, the update to the widget is performed once the search-in-workspace-tree
    completes it's search and fires the event onDidChange().

Signed-off-by: Vincent Fugnitto vincent.fugnitto@ericsson.com

Fixes #5698

- fixes an issue where the message `No Results Found.` is displayed
as a user types and attempts to search. The problem is that the message
is displayed before the search actually completes due to a `update()`.
Instead, the update to the widget is performed once the `search-in-workspace-tree`
completes it's search and fires the event `onDidChange()`.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
@vince-fugnitto vince-fugnitto added the search in workspace issues related to the search-in-workspace label Jul 12, 2019
@vince-fugnitto vince-fugnitto requested a review from lmcbout July 12, 2019 13:33
@vince-fugnitto vince-fugnitto self-assigned this Jul 12, 2019
@vince-fugnitto
Copy link
Member Author

@lmcbout please let me know if the behavior is better this way.

Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

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

@vince-fugnitto Much much better. Display "" instead of "No result found" while searching is better
code wise: ok
test: ok

@vince-fugnitto
Copy link
Member Author

@jbicker I removed the update from the search, I do not know if it will have any bad repercussions.

The idea I had was that it shouldn't be the search() that updates the widget, but rather the search-in-workspace-tree through the onChange event which informs us that it completed the search and the tree is updated. Do you see any problem with this approach?

I am trying to fix the issue of intermediate states before the search is complete and the user is typing to not render the search-info div.

@vince-fugnitto vince-fugnitto requested a review from jbicker July 12, 2019 15:28
Copy link
Contributor

@jbicker jbicker left a comment

Choose a reason for hiding this comment

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

Seems to be ok. I actually don't remember why the update() was called in the search-Method.
Works still as it should without it (but without the superfluous 'nothing found' note).

@vince-fugnitto vince-fugnitto merged commit 12f8ad2 into master Jul 12, 2019
@vince-fugnitto vince-fugnitto deleted the vf/GH-5698 branch July 12, 2019 16:20
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.

Searching file displays "No results found" while waiting the feed back from the search
3 participants