DYN-8943: Show node name for single autocomplete#16270
Merged
Merged
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-8943
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the single-item autocomplete dropdown to show the node’s name (instead of description) and its parameters, and fixes an issue with GUID generation.
- Bind the Description text block to the node’s Name and append its Parameters
- Added a
Parametersproperty throughout the view models - Corrected
Idgeneration fromnew Guid()toGuid.NewGuid()
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/NodeAutoCompleteViewExtension/Views/NodeAutoCompleteBarView.xaml | Updated ComboBox item template to include a second Run for parameters next to the description |
| src/NodeAutoCompleteViewExtension/ViewModels/SingleResultItem.cs | Changed Description mapping to use model.Name and added Parameters property |
| src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs | Fixed GUID generation and updated dropdown view model mapping to include Parameters and filter by confidence |
| src/NodeAutoCompleteViewExtension/ViewModels/DNADropdownViewModel.cs | Added Parameters property for binding |
Comments suppressed due to low confidence (3)
src/NodeAutoCompleteViewExtension/ViewModels/SingleResultItem.cs:13
- [nitpick] The property
Descriptionis now being assigned the node’s name rather than its description, which can be misleading. Consider renaming this property (and its bindings) toNameorTitleto accurately reflect its content.
Description = model.Name;
src/NodeAutoCompleteViewExtension/ViewModels/SingleResultItem.cs:32
- Since you’ve introduced a new
Parametersfield that’s surfaced in the UI, consider adding unit tests forSingleResultItemand related view models to ensureParametersis populated and rendered correctly.
internal string Parameters { get; set; }
src/NodeAutoCompleteViewExtension/Views/NodeAutoCompleteBarView.xaml:201
- [nitpick] The hardcoded color
#abafb3could be moved into a resource dictionary or style to centralize theming and simplify future updates.
<Run Text="{Binding Parameters, Mode=OneWay}" Foreground="#abafb3" />
BogdanZavu
approved these changes
Jun 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Show node name for single autocomplete
2025-06-04.23-26-02.mp4
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Show node name for single autocomplete
Reviewers
@BogdanZavu
@johnpierson
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of