Skip to content

DYN-9078: Node context menu chevron doesn't change color on hover#17124

Merged
jasonstratton merged 5 commits into
DynamoDS:masterfrom
ivaylo-matov:DYN-9078-Node-context-menu-chevron-doesn't-change-color-on-hover
May 29, 2026
Merged

DYN-9078: Node context menu chevron doesn't change color on hover#17124
jasonstratton merged 5 commits into
DynamoDS:masterfrom
ivaylo-matov:DYN-9078-Node-context-menu-chevron-doesn't-change-color-on-hover

Conversation

@ivaylo-matov

Copy link
Copy Markdown
Contributor

Purpose

This PR addresses DYN-9078.

In node, workspace, and group context menus, items that open a submenu show a small blue > on the right. When you hover those items or open the submenu the arrow stayed blue.

This PR updates the styling so the arrow turns white in the same situations. It also fixes the same behavior for group context menus, and aligns the group menu chevron vertically without making the rows taller.

DYN-9078




Before:
Screenshot 2026-05-28 110719




After:
Screenshot 2026-05-28 113918

Declarations

Check these if you believe they are true

Release Notes

Context menu items with submenus now show a white chevron when hovered or expanded, matching the menu label. Group context menus are included.

Reviewers

@DynamoDS/eidos
@jasonstratton
@zeusongit

FYIs

@dnenov
@johnpierson

Copilot AI review requested due to automatic review settings May 28, 2026 11:12

@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-9078

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

Note

Copilot was unable to run its full agentic suite in this review.

Updates WPF context-menu styling so submenu arrows remain visible (white) when hovering or when the submenu is open, improving menu readability and consistency.

Changes:

  • Set submenu arrow foreground to white on IsMouseOver=True in multiple menu templates/styles.
  • Add IsSubmenuOpen=True triggers so the arrow stays white while the submenu is open.
  • Align annotation submenu arrow visuals by setting transform origin and explicitly toggling arrow foreground on hover enter/leave.

Reviewed changes

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

File Description
src/DynamoCoreWpf/Views/Core/WorkspaceView.xaml Adds submenu-arrow foreground setters for hover and submenu-open states.
src/DynamoCoreWpf/Views/Core/NodeView.xaml.cs Adds code-behind trigger/setter for submenu arrow and introduces an IsSubmenuOpen trigger.
src/DynamoCoreWpf/Views/Core/AnnotationView.xaml.cs Adjusts submenu arrow transform origin and explicitly changes arrow foreground on hover.
src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml Applies the same submenu arrow hover/open foreground behavior across Modern theme templates.

Comment on lines +2390 to +2395
var isSubmenuOpenTrigger = new Trigger
{
Property = MenuItem.IsSubmenuOpenProperty,
Value = true
};
isSubmenuOpenTrigger.Setters.Add(new Setter(Label.ForegroundProperty, Brushes.White, "subMenuArrow"));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

now addressed

Value = true
};
isMouseOverTrueTrigger.Setters.Add(new Setter(TextBlock.ForegroundProperty, Brushes.White, "ContentPresenter"));
isMouseOverTrueTrigger.Setters.Add(new Setter(Label.ForegroundProperty, Brushes.White, "subMenuArrow"));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Now addresses, although it seem that subMenuArrow might be created as a Label on purpose. The rest of that block already uses Label.MarginProperty, Label.ContentProperty etc, so the code is already label-only.

Property = MenuItem.IsSubmenuOpenProperty,
Value = true
};
isSubmenuOpenTrigger.Setters.Add(new Setter(Label.ForegroundProperty, Brushes.White, "subMenuArrow"));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Now addressed with the same comment as above.

Comment on lines 4115 to +4122
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="White" />
<Setter TargetName="subMenuArrow" Property="Foreground" Value="White" />
<Setter TargetName="dockPanel" Property="Background" Value="{StaticResource GenericMouseOverBackgroundColorBrush}" />
</Trigger>
<Trigger Property="IsSubmenuOpen" Value="True">
<Setter TargetName="subMenuArrow" Property="Foreground" Value="White" />
</Trigger>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have intentionally kept the existing structure. The comment makes sense, but pulling shared styles seems like a big refactor and IMO is best done in a separate PR.

a redundant trigger was causing a delay before the arrow reverted to blue
@sonarqubecloud

Copy link
Copy Markdown

Comment thread src/DynamoCoreWpf/Views/Core/NodeView.xaml.cs
cursoragent and others added 2 commits May 29, 2026 05:49
Co-authored-by: Ivo Petrov <ivaylo-matov@users.noreply.github.com>

@jasonstratton jasonstratton 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.

Looks good! Thank you!

@jasonstratton jasonstratton merged commit 2deb3b5 into DynamoDS:master May 29, 2026
26 of 27 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