-
Notifications
You must be signed in to change notification settings - Fork 668
Update NodeModel Autocomplete Match Criteria #11621
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
Conversation
| // e.g. For ColorRange, the OutPortType(OutputParameter) is Color instead of DSCore.Color | ||
| // While we can define output type with namespace there, in order to be consistent on simplified | ||
| // PortType name display in library, we make it tolerant here | ||
| if (element.OutputParameters.Any(op => inputPortType.EndsWith(op))) |
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.
This could result in incorrect matches. Shouldn't it be an exact match? I think the only way to achieve that is to impose full namespaces for both input and output port types. For example, this will give a false match if the output port type is Color from DSCore namespace for one node and another node expects PackageX.Color or just Color but from a different namespace.
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.
@aparajit-pratap Sure, please see the reasoning I mentioned.
- Our library does not display full type either, e.g. for Color.Red, the out put type displayed in library is just Color instead of DSCore.Color. Right now, Color.Range is following the same. If we make it exact match everywhere, should we use the full type everywhere? Otherwise, NodeModel nodes will display different level of info in library than ZT nodes. The false match case right now arguably is already misleading in library.

- Even if it is mismatch, it could still be valuable to be listed as potential.
If we all prefer strong match, I would say we have some systematic changes to make. I am open for what you guys prefer.
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.
Well, I think it's better to be verbose than incorrect. For a correct match, we must have exact matches with full namespaces.
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.
@aparajit-pratap I interpret it as you are in supportive of full type names everywhere in Dynamo then? Otherwise on book, Color.Range can't be suggested to Color.Red which is the current behavior
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 interpret it as you are in supportive of full type names everywhere in Dynamo then
Yes
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.
@aparajit-pratap @mjkkirschner Well, we do not have a choice I believe, if we touch the OutputType of NodeModelNodes, they will be reflected in Library. As a result, Color.Range will display output as DSCore.Color which is different than Color.Red. That was the reason why I started to think of alternatives like this PR.
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.
If there are going to be major functionality changes (i.e. how it displays in the Library) can we set up a quick meeting to discuss? I would also like to have Jingyi present too :)
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.
@QilongTang is that correct? - for example -

This is a ZT node of course, but it does not show the fully qualified type name, do NodeModel nodes act differently? If so that sounds like something to make consistent.
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.
@mjkkirschner See the screenshot I provided above for ColorRange, input is DSCore.Color[] and output is Color.
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.
yes, thats my point @QilongTang - your example is a NodeModel - maybe it should behave like the zero touch node's in the library (my screenshot) - instead. Or vice versa.... though lots of repeated information seems superfluous.
|
Closing this PR since a preferred alternative solution has been discussed |

Please Note:
DynamoRevitrepo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after aLGTMlabel is added to the PR.Purpose
Per https://jira.autodesk.com/browse/DYN-3470.
For NodeModel nodes, output types are defined by user which usually do not contain namespace
example
Since the OutPortType(OutputParameter) is Color instead of DSCore.Color, it was not a exact match for node autocompete. While we can define output type with namespace there, in order to be consistent on simplified PortType name display in library, we make it tolerant here.
Result:

NodeModel nodes like
Color.RangeandColor.Pallettenow appear in NodeAutoComplete SuggestionsDeclarations
Check these if you believe they are true
*.resxfilesReviewers
@DynamoDS/dynamo
FYIs