[DYN-7840] Inaccurate popup placement for input nodes in collapsed groups - Follow-up#16263
Merged
zeusongit merged 3 commits intoDynamoDS:masterfrom Jun 6, 2025
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-7840
Contributor
|
@ivaylo-matov please try merging the master, it should fix the failing checks |
zeusongit
reviewed
Jun 5, 2025
Comment on lines
436
to
440
| private static double GetDpiScale() | ||
| { | ||
| var source = PresentationSource.FromVisual(Application.Current.MainWindow); | ||
| return source?.CompositionTarget?.TransformToDevice.M22 ?? 1.0; | ||
| } |
Contributor
There was a problem hiding this comment.
probably a good idea to wrap this in a try-catch?
Contributor
There was a problem hiding this comment.
Pull Request Overview
A fix addressing inaccurate popup placement for input nodes in collapsed groups by incorporating DPI scaling adjustments and improving arrow alignment.
- Incorporates DPI scaling (via GetDpiScale) into placement logic in PortViewModel, adjusting both left and right context menu popups.
- Adjusts Y-coordinate calculation in PlacePortContextMenu to ensure proper alignment across various DPI settings.
- Updates the vector path Data in InPortContextMenu.xaml to improve the vertical centering of chevron arrows.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs | Adds DPI scaling adjustments to popup placement logic and introduces a helper method (GetDpiScale) for DPI retrieval. |
| src/DynamoCoreWpf/Controls/InPortContextMenu.xaml | Updates the Path Data for chevron arrows for better visual alignment. |
…te-popup-placement-for-input-nodes-in-collapsed-groups_follow-up
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
This PR addresses DYN-7840 and follows up on feedback from DYN-8055.
Changes in the logic on
PortViewModelensure that the Windows display scale (dpi) factor is taken into account when positioning the port context menu popup. The adjustment primarily affects the horizontal placement, making sure the chevron arrow remains visually centered relative to the port across different scaling levels.The
Datapath for the popup chevron arrows has been updated to improve vertical alignment. This ensures the arrow appears centered within the popup body, especially at smaller zoom levels, where it previously gave the impression of being slightly off-center.Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Fixed placement of Context menu popup for nodes in collapsed groups.
Reviewers
@DynamoDS/eidos
@jasonstratton
FYIs
@dnenov
@achintyabhat