Skip to content

DYN-9637 - Add keyboard shortcuts to quickly navigate the canvas to the leftmost (“beginning”) and rightmost (“end”) nodes of the active graph. #16873

Open
CustomBuildingConfigurators-Balaji wants to merge 6 commits intoDynamoDS:masterfrom
CustomBuildingConfigurators-Balaji:DYN-9637

Conversation

@CustomBuildingConfigurators-Balaji
Copy link
Contributor

@CustomBuildingConfigurators-Balaji CustomBuildingConfigurators-Balaji commented Feb 4, 2026

Purpose

Add keyboard shortcuts to quickly navigate the canvas to the leftmost
(“beginning”) and rightmost (“end”) nodes of the active graph. (DYN-9637) -

New shortcuts:

  • Home: navigate to the beginning (leftmost node position).
  • End: navigate to the end (rightmost node position).

Definitions:

  • Consider only visible, placeable nodes (ignore Notes/Annotations/Groups by default).
  • Beginning = nodes with minimum X (left edge of node bounding box). End = maximum X (right edge).
  • If multiple nodes share the same extreme within a tolerance (e.g., ±2 px), zoom/pan to show all of them.

Behavior:

  • Smooth pan/zoom animation (150–250 ms).
  • If no nodes exist in workspace, no action. o If leftmost or rightmost node is inside a Collapsed Group, Zoom to the group to show the full group in view.
  • Respect editing context: shortcuts are handled only when canvas is focused and no in-place text editing is active (e.g., Code Block editor, rename fields).

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate

Demo with Individual nodes at the ends:
DYN-9637 Demo without group

Demo with Nodes inside a group at the ends:
DYN-9637 Demo with groups

Release Notes

New shortcuts:

  • Home: navigate to the beginning (leftmost node position) when there is no active selection in workspace.
  • End: navigate to the end (rightmost node position) when there is no active selection in workspace.

Reviewers

@DynamoDS/eidos

FYIs

@stevecbc

Binded those commands to Home and End keys in xaml.
Added the public properties to PublicAPI.Unshipped.txt file.
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-9637

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 adds keyboard shortcuts to navigate the canvas to the leftmost (Home key) and rightmost (End key) nodes in the active graph, addressing feature request DYN-9637.

Changes:

  • Adds Home and End key bindings to the DynamoView XAML that trigger navigation commands
  • Implements GotoLeftMostNode and GotoRightMostNode commands with corresponding CanExecute methods
  • Uses a 2px tolerance to group nearby nodes at the extremes and includes their containing groups in the navigation

Reviewed changes

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

File Description
DynamoView.xaml Adds KeyBinding declarations for Home and End keys
DynamoViewModelDelegateCommands.cs Declares and initializes the new navigation commands
DynamoViewModel.cs Implements the navigation logic with tolerance-based node filtering
PublicAPI.Unshipped.txt Documents the new public command properties

@johnpierson
Copy link
Member

One bit of feedback from someone testing:

Doesn't zoom to notes or groups with only notes in them.

So in a graph if you have notes at the beginning or the end, it is only considering NodeModels at this time.

@CustomBuildingConfigurators-Balaji
Copy link
Contributor Author

CustomBuildingConfigurators-Balaji commented Feb 5, 2026

One bit of feedback from someone testing:

Doesn't zoom to notes or groups with only notes in them.

So in a graph if you have notes at the beginning or the end, it is only considering NodeModels at this time.

Hi @johnpierson ,
The requirement was to consider only nodes and groups. Kindly refer the first point in the Definition section and second point in the Behavior section of this PR.
Thanks.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

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