Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

☂️ Project Side Quest: Bring subgraphs into main board view #3788

Closed
6 of 9 tasks
dglazkov opened this issue Nov 15, 2024 · 3 comments
Closed
6 of 9 tasks

☂️ Project Side Quest: Bring subgraphs into main board view #3788

dglazkov opened this issue Nov 15, 2024 · 3 comments
Assignees

Comments

@dglazkov
Copy link
Collaborator

dglazkov commented Nov 15, 2024

The umbrella bug for all the things to make it happen:

Plumbing

  • Come up with a useful sample board that uses side wires
  • Expose side wires in InspectableGraph
  • Introduce EditTransform abstraction
  • Add MoveToSubgraph transform
  • Add MergeWithMainGraph transform
  • Add CreateSidewire transform
  • Add RemoveSidewire transform
  • Add sideEdges to InspectableGraph

UI

  • Come up with an alternative way of selecting graphs for invocation
@dglazkov
Copy link
Collaborator Author

dglazkov commented Nov 15, 2024

Quick design sketch:

BGL bits:

  • From BGL perspective, side wires are actually input ports on a node, with the behaviors board, config, and side. We may deprecate side eventually, after we teach our machinery to wire visually to external boards.
  • we'll start with one side wire port per node, but account for allowing more than one in the future
  • the port type will be string (single side wire) or array of string (multiple side wires per port).
  • the values supplied to the port must be (for now) in the format of #[uuid], where [uuid] is the id of the sub-board. All other values will be ignored

InspectableNode bits:

  • From InspectableNode perspective, when a side wire is detected, it is moved to side ports object
  • The InspectablePort's kind property returns "side" when it is a side wire.

EditableGraph bits

  • New edit operations for adding and removing boards
  • A new concept of a transform: a parametrized sequence of edit operations
  • A bunch of transforms to facilitate wiring side wires

dglazkov added a commit that referenced this issue Nov 15, 2024
- **Introduce `side` behavior.**
- **Introduce `side` port list.**
- **Plumb side ports to `GraphNode`.**
- **Make no-input/no-output boards invokable.**
- **docs(changeset): Expose side wires in `InspectableGraph`.**

Progress on #3788
paullewis added a commit that referenced this issue Nov 15, 2024
dglazkov added a commit that referenced this issue Nov 16, 2024
- **Start sketching out graph operations.**
- **Clarify interfaces**
- **Keep a single node/edge cache of graphs and subgraphs.**
- **Pass the subgraph to new Node instance.**
- **Teach EditableGraph to not create new InspectableGraph instances for
sub-graphs.**
- **Create EditableGraph subgraph instances lazily.**
- **Fix logic errors in addGraph/removeGraph.**
- **Implement "addgraph" operation.**
- **Remove `EditableGraph.addGraph`.**
- **Add "removegraph" operation.**
- **Remove `EditableGraph.removeGraph`.**
- **Remove `EditableGraph.replaceGraph`.**
- **docs(changeset): Migrate to use `InspectableGraph.edit` for subgraph
add/remove/replace.**

Progress on #3788.
dglazkov added a commit that referenced this issue Nov 18, 2024
- **Introduce `computeSelection`.**
- **Add `IsolateSelectionTransform`.**
- **Massage API a bit.**
- **Flatten `EditableGraph`: it now operates on graphs and subgraphs.**
- **Introduce `MoveToGraph` transform.**
- **Switch transforms to be iteratively applied.**
- **Introduce `MoveToNewGraph` transform.**
- **Introduce `MergeGraphTransform`.**
- **docs(changeset): Introduce Edit Transforms and start using them.**

Progress on #3788.
dglazkov added a commit that referenced this issue Nov 18, 2024
- **Fix typo in docs**
- **Introduce `ConfigureSidewireTransform`.**
- **Introduce `SidewireToNewGraphTransform`.**
- **docs(changeset): Introduce sidewire transforms.**

Progress on #3788.
dglazkov added a commit that referenced this issue Nov 18, 2024
- **Add `computeSideEdges` helper.**
- **docs(changeset): Add `#computSideEdges` helper to compute side
edges.**

Progress on #3788.
timswanson-google pushed a commit that referenced this issue Dec 3, 2024
- **Introduce `side` behavior.**
- **Introduce `side` port list.**
- **Plumb side ports to `GraphNode`.**
- **Make no-input/no-output boards invokable.**
- **docs(changeset): Expose side wires in `InspectableGraph`.**

Progress on #3788
timswanson-google pushed a commit that referenced this issue Dec 3, 2024
timswanson-google pushed a commit that referenced this issue Dec 3, 2024
- **Start sketching out graph operations.**
- **Clarify interfaces**
- **Keep a single node/edge cache of graphs and subgraphs.**
- **Pass the subgraph to new Node instance.**
- **Teach EditableGraph to not create new InspectableGraph instances for
sub-graphs.**
- **Create EditableGraph subgraph instances lazily.**
- **Fix logic errors in addGraph/removeGraph.**
- **Implement "addgraph" operation.**
- **Remove `EditableGraph.addGraph`.**
- **Add "removegraph" operation.**
- **Remove `EditableGraph.removeGraph`.**
- **Remove `EditableGraph.replaceGraph`.**
- **docs(changeset): Migrate to use `InspectableGraph.edit` for subgraph
add/remove/replace.**

Progress on #3788.
timswanson-google pushed a commit that referenced this issue Dec 3, 2024
- **Introduce `computeSelection`.**
- **Add `IsolateSelectionTransform`.**
- **Massage API a bit.**
- **Flatten `EditableGraph`: it now operates on graphs and subgraphs.**
- **Introduce `MoveToGraph` transform.**
- **Switch transforms to be iteratively applied.**
- **Introduce `MoveToNewGraph` transform.**
- **Introduce `MergeGraphTransform`.**
- **docs(changeset): Introduce Edit Transforms and start using them.**

Progress on #3788.
timswanson-google pushed a commit that referenced this issue Dec 3, 2024
- **Fix typo in docs**
- **Introduce `ConfigureSidewireTransform`.**
- **Introduce `SidewireToNewGraphTransform`.**
- **docs(changeset): Introduce sidewire transforms.**

Progress on #3788.
timswanson-google pushed a commit that referenced this issue Dec 3, 2024
- **Add `computeSideEdges` helper.**
- **docs(changeset): Add `#computSideEdges` helper to compute side
edges.**

Progress on #3788.
@paullewis
Copy link
Contributor

Wondering if we can broadly declare victory here? We have #3836 for the remaining bits.

@dglazkov
Copy link
Collaborator Author

VICTORY 🚢

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

No branches or pull requests

2 participants