Skip to content

DYN-9091: move view to new port and reuse window#16324

Merged
chubakueno merged 3 commits into
DynamoDS:masterfrom
chubakueno:feature/DYN-9091
Jun 27, 2025
Merged

DYN-9091: move view to new port and reuse window#16324
chubakueno merged 3 commits into
DynamoDS:masterfrom
chubakueno:feature/DYN-9091

Conversation

@chubakueno

Copy link
Copy Markdown
Contributor

Purpose

Move autocomplete flyout window to new port and reuse window while still open.

2025-06-25.17-48-00.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

Move autocomplete flyout window to new port and reuse window while still open.

Reviewers

@johnpierson
@BogdanZavu

FYIs

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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-9091

@johnpierson johnpierson requested a review from Copilot June 26, 2025 02:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the autocomplete flyout so that it reuses the same window when switching ports instead of recreating it.

  • Extracted event subscription/unsubscription into SubscribeEvents/UnsubscribeEvents in the bar view.
  • Added ReloadDataContext to refresh the view model and rebind events on the existing window.
  • Modified the view extension to cache and reload the bar view instance when already open.

Reviewed Changes

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

File Description
src/NodeAutoCompleteViewExtension/Views/NodeAutoCompleteBarView.xaml.cs Introduced SubscribeEvents/UnsubscribeEvents, wired up ParentNodeRemoved, and added ReloadDataContext to refresh the bar in-place.
src/NodeAutoCompleteViewExtension/NodeAutoCompleteViewExtension.cs Added a field to cache the bar view and updated the request handler to call ReloadDataContext when the window is already open.

Comment thread src/NodeAutoCompleteViewExtension/NodeAutoCompleteViewExtension.cs
Comment thread src/NodeAutoCompleteViewExtension/NodeAutoCompleteViewExtension.cs
@BogdanZavu

BogdanZavu commented Jun 26, 2025

Copy link
Copy Markdown
Contributor

So there are a few more aspects to consider for window reusability. As it is now ( reused only when open ) - there are contexts where we can't reuse it - e.g when we are dealing with multiple workspaces a dyn and a custom node open in the same time.
But we can handle this as part of full reusability of the window.

Let's address that issue from John and other than that LGTM! Nice to see this working!

…n.cs

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

@johnpierson johnpierson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, added task based on @BogdanZavu comment. https://jira.autodesk.com/browse/DYN-9104

@chubakueno

chubakueno commented Jun 27, 2025

Copy link
Copy Markdown
Contributor Author

So there are a few more aspects to consider for window reusability. As it is now ( reused only when open ) - there are contexts where we can't reuse it - e.g when we are dealing with multiple workspaces a dyn and a custom node open in the same time. But we can handle this as part of full reusability of the window.

Let's address that issue from John and other than that LGTM! Nice to see this working!

Ah, yes, if we close it then it's not reusable either. If we wanted full reusability we'd have to accept that it stays in the visual tree (hidden) once the funcitonality is used, because a Close()'d window cannot be Opened again (but a Hidden / Colapsed window can be set to Visible again). I think we can manage this as a separate ticket / PR.

@chubakueno chubakueno merged commit c436c0b into DynamoDS:master Jun 27, 2025
27 of 28 checks passed
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.

4 participants