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

Update NodeAutocomplete search criteria to also include nodes keywords and description #11613

Merged
merged 7 commits into from
Apr 21, 2021

Conversation

zeusongit
Copy link
Contributor

@zeusongit zeusongit commented Apr 15, 2021

DYN-3357

The node-autocomplete search used only the node name to match the search key. It has been updated to include node's keywords and description as well.

In the example below radius is the search key that is present in ByFillet node's description and therefore did not use to appear in the search results before.

Screen Shot 2021-04-15 at 10 28 04 AM

Before:
Screen Shot 2021-04-15 at 10 21 19 AM

After:

Screen Shot 2021-04-15 at 10 21 28 AM

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Reviewers

@DynamoDS/dynamo

@mjkkirschner
Copy link
Member

Is there a reason this uses its own search instead of the search code that already exists for in canvas and library search?

@QilongTang
Copy link
Contributor

@zeusongit Did you made any comparison of in-canvas search yet? I am not sure if string comparison of these three cates will be a 100% match, I think originally we were leaning towards to just reuse the existing search code in in-canvas search.

@zeusongit
Copy link
Contributor Author

@mjkkirschner The in canvas and library searches are conducted on complete set of nodes, whereas this is done on a subset of that, which is defined by the target input port i.e all the nodes which are compatible with it.
I had a discussion with @QilongTang and will try to use the existing search algorithm by providing it our own subset to search from.

@@ -349,7 +349,7 @@ public void SearchNodeAutocompletionSuggestions()

// Filter the node elements using the search field.
searchViewModel.SearchAutoCompleteCandidates("ar");
Assert.AreEqual(2 , searchViewModel.FilteredResults.Count());
Assert.AreEqual(4 , searchViewModel.FilteredResults.Count());
Copy link
Contributor

Choose a reason for hiding this comment

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

@zeusongit Looks like the number diff is expected due to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the search term ar now returns more than 2 results as the search scope has been increased to cover description and keywords.

@zeusongit zeusongit requested a review from QilongTang April 20, 2021 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants