Skip to content

Conversation

@copybara-service
Copy link

@copybara-service copybara-service bot commented Jul 1, 2025

Feature Addition

Implement External Nodes for Groups

This commit introduces the concept of external nodes to Groups.
It allows a node in the parent graph to be connected to a node
in a group without having to include the external node in the group itself.

The main changes are:

  • External Target: The External target provides a Map<string, { nodes: string[], point: Point, type: 'in'|'out' }> for each Group
  • internalEdges input in the Graph: This array is used to provide the edges that are connecting the Group with external nodes
  • Rendering logic: The external target node is rendered with a default proxy node template.
  • Rendering logic: The edges between the external nodes and internal nodes are rendered.

This feature enable the following:

  • Connect a Node in the main DAG to a Node in a Group without having to declare the node in the Group
  • Connect a Group with external Nodes
  • Keep a consistent look for the group.
  • Create complex diagrams using subgraphs.
    Limitations
  • If two nodes are in different groups or have a parental difference of more than 1 then we can't show edges between them yet.
  • This feature currently works in layout direction left to right or right to left, while using layout top to bottom or bottom to top there is some shifting in x axis of the node

@google-cla
Copy link

google-cla bot commented Jul 1, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service copybara-service bot force-pushed the test_777884537 branch 3 times, most recently from 00caa98 to 532cd9f Compare July 21, 2025 08:57
----
Implement External Nodes for Groups

This commit introduces the concept of external nodes to Groups.
It allows a node in the parent graph to be connected to a node
in a group without having to include the external node in the group itself.

The main changes are:
- External Target: The External target provides a `Map<string, { nodes: string[], point: Point, type: 'in'|'out' }>` for each Group
- `internalEdges` input in the Graph: This array is used to provide the edges that are connecting the Group with external nodes
- Rendering logic: The external target node is rendered with a default proxy node template.
- Rendering logic: The edges between the external nodes and internal nodes are rendered.

This feature enable the following:
- Connect a Node in the main DAG to a Node in a Group without having to declare the node in the Group
- Connect a Group with external Nodes
- Keep a consistent look for the group.
- Create complex diagrams using subgraphs.
Limitations
- If two nodes are in different groups or have a parental difference of more than 1 then we can't show edges between them yet.
- This feature currently works in layout direction left to right or right to left, while using layout top to bottom or bottom to top there is some shifting in x axis of the node

PiperOrigin-RevId: 777884537
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.

1 participant