Skip to content

Conversation

@chubakueno
Copy link
Contributor

Purpose

Autofocus search box, make search box sticky on top and autoselect first filtered element on search box change.

2025-07-01.20-23-25.mp4

Declarations

Check these if you believe they are true

  • 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
  • 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
  • This PR contains no files larger than 50 MB
  • This PR introduces new feature code involve network connecting and is tested with no-network mode.

Release Notes

Autofocus search box, make search box sticky on top and autoselect first filtered element on search box change.

Reviewers

@johnpierson
@BogdanZavu

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9089

@johnpierson johnpierson requested a review from Copilot July 2, 2025 16:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds autofocus behavior and improved dropdown handling to the node autocomplete bar, makes the search box sticky at the top, and prevents duplicate cluster insertions.

  • Auto-focuses and auto-selects the first filtered item when the search input or dropdown state changes
  • Binds dropdown open state to the viewmodel and refactors view events to trigger focus
  • Updates theme XAML to keep the search box visible at the top and adjust scroll margins

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/NodeAutoCompleteViewExtension/Views/NodeAutoCompleteBarView.xaml.cs Adds OnRefocusSearchBox handler and wires ViewModel event
src/NodeAutoCompleteViewExtension/Views/NodeAutoCompleteBarView.xaml Binds IsDropDownOpen to viewmodel
src/NodeAutoCompleteViewExtension/ViewModels/NodeAutoCompleteBarViewModel.cs Implements IsDropDownOpen property and RefocusSearchBox event; sets first item on search change; prevents duplicate clusters
src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml Moves scroll viewer margin to keep search slot sticky
Comments suppressed due to low confidence (1)

src/NodeAutoCompleteViewExtension/Views/NodeAutoCompleteBarView.xaml.cs:38

  • [nitpick] The method name OnRefocusSearchbox doesn't follow PascalCase for 'Box'. Rename it to OnRefocusSearchBox to match .NET naming conventions and the event name.
        private void OnRefocusSearchbox()

chubakueno and others added 2 commits July 2, 2025 13:24
…arViewModel.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…w.xaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
FilteredLowConfidenceResults = new List<NodeSearchElementViewModel>();
SearchInput = string.Empty;
SearchInput = string.Empty;
lastAddedCluster = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps set this to null when we are closing the flyout.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not entirely sure if we should clean up some set of variables on close and some (possibly overlapping) set of variables on open. Ideally we should call the whole function on open and close but for the moment i think its ok to move the least code now that we're close to release.

@BogdanZavu
Copy link
Contributor

This works really nice! Some minor comments , feel free to address as you see fit. LGTM!

@chubakueno chubakueno merged commit 7fb748b into DynamoDS:master Jul 3, 2025
24 of 28 checks passed
chubakueno added a commit to chubakueno/Dynamo that referenced this pull request Jul 8, 2025
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.

2 participants