DYN-9034: Fix context menu for node customizations#16294
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9034
There was a problem hiding this comment.
Pull Request Overview
This PR addresses DYN-9034 by fixing the context menu behavior for node customizations. Key changes include updating the stashing mechanism for menu items to use MainContextMenu instead of grid.ContextMenu and updating the DisplayNodeContextMenu method to properly clear and configure the active context menu.
Comments suppressed due to low confidence (1)
src/DynamoCoreWpf/Views/Core/NodeView.xaml.cs:2369
- [nitpick] It would be beneficial to add a clarifying comment explaining the reasoning behind clearing MainContextMenu.Items and then assigning nodeContextMenu to MainContextMenu, to improve code clarity.
MainContextMenu.Items.Clear();
aparajit-pratap
left a comment
There was a problem hiding this comment.
LGTM but I'm still confused about nodeContextMenu and MainContextMenu. Are these two different things? If not, why do we need two separate properties/fields to refer to the same thing?
I had the same question initially, but here’s what I gathered from reviewing the implementation: I’ve replaced most usages of |
|
Too many context menus hanging around. Perhaps they could be named appropriately to denote which is which and what purpose they serve? |
|
I added some comments to make it clear, |
Purpose
Fix context menu for node customizations
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Fix context menu for node customizations
Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of