Skip to content

Conversation

@ivaylo-matov
Copy link
Contributor

Purpose

Small PR related to DYN-8893 and this tread.

This PR restores the changes to AnnotationView.xaml.cs that allow double-clicking on a group to add a CodeBlockNode to it. These changes were previously submitted in #16334 but are not present in the current master branch.

DYN-8893-New

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

Double-clicking on a group adds a code block node to it.

Reviewers

@DynamoDS/eidos
@jasonstratton
@zeusongit

FYIs

@dnenov
@achintyabhat

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

@zeusongit zeusongit requested review from a team and Copilot July 15, 2025 14:40
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 restores double-click functionality on annotation groups to add a CodeBlockNode and adds a corresponding unit test.

  • Subscribes to PreviewMouseDoubleClick in AnnotationView.xaml.cs and implements OnAnnotationDoubleClick logic.
  • Adds a test DoubleClickOnGroupAddsCodeBlockNode to verify the new behavior.

Reviewed Changes

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

File Description
test/DynamoCoreWpfTests/AnnotationViewTests.cs Added test for double-click on group adding a CBN.
src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs Subscribes/unsubscribes double-click event and handler.
Comments suppressed due to low confidence (1)

test/DynamoCoreWpfTests/AnnotationViewTests.cs:184

  • After verifying the node count, add an assertion to check that the newly added node is of type CodeBlockNodeModel, ensuring the correct node type was created.
            Assert.AreEqual(3, group1.Nodes.Count(), "Expected group to have 3 nodes after double click.");

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

@zeusongit zeusongit merged commit 07d3ecf into DynamoDS:master Jul 15, 2025
25 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.

3 participants