-
Notifications
You must be signed in to change notification settings - Fork 638
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
Use node suggestion API in node autocomplete UI #11132
Use node suggestion API in node autocomplete UI #11132
Conversation
|
||
internal void PopulateAutoCompleteCandidates() | ||
{ | ||
var searchElements = PortViewModel.GetMatchingNodes(); |
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.
Thanks for moving it. But I was hoping we can move all of the code from PortViewModel
to the customized search view model here given that 1. those code are not really related to PortView 2. I feel PortViewModel
does not necessarily obtain knowledge about search elements 3. We still have access to DynamoViewModel from here. What do you think?
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 haven't moved the code yet. Doing so now.
@@ -121,7 +121,8 @@ private void OnNodeAutoCompleteSearchControlVisibilityChanged(object sender, Dep | |||
Dispatcher.BeginInvoke(new Action(() => | |||
{ | |||
SearchTextBox.Focus(); | |||
ViewModel.InitializeDefaultAutoCompleteCandidates(); | |||
//ViewModel.InitializeDefaultAutoCompleteCandidates(); | |||
ViewModel.PopulateAutoCompleteCandidates(); |
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.
We probably want to consider returning the number of filtered results in PopulateAutoCompleteCandidates()
, if the number is 0 which means we failed to find any match, then we still call InitializeDefaultAutoCompleteCandidates()
.
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.
The reason I commented this out was I noticed issues with this. On a mouse up, the node suggestion list was reverting to this default list each time.
* Initial Commit of NodeAutoComplete MVP * Clean Up * Fix a bug that left over search term was kept for next trigger * Changed to use alt + mouse left key down and change cursor to adapt to connection mode * Fix the in canvas node auto complete glitching issue with a click suppress * Comments * preference setting test * Add test * New Node AutoComplete * Comments * Comments * Use node suggestion API in node autocomplete UI (#11132) * update code comment * add APIs to return matching nodes for input ports * revert temporary changes made for testing * cleanup * merge api with UI * revert unwanted changes * Add null-check (#11144) * add null-check * Clean Up * Moving GetMatchingNodes API to search view model (#11146) * Moving GetMatchingNodes API to search view model * Clean Up * Comments * Create a dedicated test file to prepare for more unit tests * Comments * Comments * Comments * Comments Co-authored-by: aparajit-pratap <aparajit.pratap@autodesk.com>
Purpose
Call node suggestion API from node autocomplete UI.
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@QilongTang
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of