-
Notifications
You must be signed in to change notification settings - Fork 636
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
improve node autocomplete results for custom node output ports #14218
Conversation
dont use type string, use name dont use name with spaces, it will never be correct.
searchViewModel.PopulateAutoCompleteCandidates(); | ||
Assert.AreEqual(7, searchViewModel.FilteredResults.Count()); | ||
Assert.AreEqual(44, searchViewModel.FilteredResults.Count()); |
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.
wow
Regression: |
@@ -760,6 +760,11 @@ internal IEnumerable<NodeSearchElement> GetMatchingSearchElements() | |||
else if (PortViewModel.PortModel.PortType == PortType.Output) | |||
{ | |||
portType = PortViewModel.PortModel.GetOutPortType(); | |||
//if the custom node output name contains spaces, try using the first word. | |||
if (PortViewModel.PortModel.Owner is Graph.Nodes.CustomNodes.Function && portType.Contains(" ")) |
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.
Should we generalize this check to include any white space?
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.
I can do that- I don't think any whitespace character is valid in a DS type name.
@QilongTang I don't think so -
I'm going to merge this, if we see an increase in failures after this is merged, we can revert it. |
I'm going to merge this - as @aparajit-pratap said the test failures also happen on master at this point. |
…oDS#14218) * update tests dont use type string, use name dont use name with spaces, it will never be correct. * add a new test * comments * review comments and new test
Purpose
I could not reproduce the crash seen in #14192 in master (2.19).
I did notice however that checking customNode outputs frequently throws thousands of exceptions and also fails to find results even when the type name is a valid type!
I've made two changes I think will improve the situation a small bit.
Type.Name
instead ofType.ToString()
ToString
will also include rank, likevar[]..[]
- this is not a valid class name that can be found in the class table, and so we never make any matches with types that include rank. After this PR we'll better match different ranks of type, and also derived types.Note how more valid results are returned in the tests I have updated. Also less exceptions are thrown, so the results are computed a bit faster.
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Return more results for object based node autocomplete when using custom node output ports.
Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of