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

Add support for replacing selected nodes #1009

Merged
merged 28 commits into from
Aug 25, 2022

Conversation

glopesdev
Copy link
Member

@glopesdev glopesdev commented Aug 16, 2022

This PR will introduce support for replacing selected nodes in the workflow, extending the current option for replacing group operators to subject declarations and individual workflow nodes.

The following replacements will be supported:

  • SubjectExpressionBuilder > SubjectExpressionBuilder: type of subject is changed, name is preserved
  • SubjectExpressionBuilder > Subject: declaration changes to MulticastSubjectBuilder, name is set to name of Subject
  • SubjectExpressionBuilder (Source) > Subject: declaration changes to SubscribeSubjectBuilder, name is set to name of Subject
  • MulticastSubjectBuilder > SubjectExpressionBuilder: multicast sink changes to specified declaration type, name is preserved
  • SubscribeSubjectBuilder > SubjectExpressionBuilder (Source): subscribe changes to specified subject source declaration type, name is preserved
  • WorkflowExpressionBuilder > WorkflowExpressionBuilder: type of nested workflow is changed, name, description, and inner contents are preserved
  • Source > SubjectExpressionBuilder (Source): source changes to specified subject declaration type
  • Any > Any: any single node is replaced with the specified toolbox operator
  • Any (multi-selection) > Any: multi-selection is converted first to an intermediate group and then replaced with the specified toolbox operator

Glossary:

  • All replacements are indicated by the > character, with the original node on the left-hand side, and the selected replacement on the right-hand side.
  • SubjectExpressionBuilder: Any subject declaration (PublishSubject, ReplaySubject, etc) created from an input sequence.
  • SubjectExpressionBuilder (Source): Any subject declaration created as a source (e.g. context menu > Create Source).
  • SubscribeSubjectBuilder: A source created by subscribing to the specified subject.
  • MulticastSubjectBuilder: A sink emitting all values from the input sequence to the specified subject.
  • WorkflowExpressionBuilder: Any nested group operator, except include workflows.
  • Subject: Any named subject listed in the toolbox under the Subject category.
  • Source: A selection of nodes with no predecessors in the workflow.
  • Any: Any other operator not mentioned above.

Fixes #600
Fixes #1010

@glopesdev glopesdev added the feature New planned feature label Aug 16, 2022
@glopesdev glopesdev added this to the 2.7.0 milestone Aug 16, 2022
@glopesdev glopesdev merged commit 5a98bfd into bonsai-rx:master Aug 25, 2022
@glopesdev glopesdev deleted the issue-600 branch August 25, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New planned feature
Projects
None yet
1 participant