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

feat: operation outputs #2276

Merged
merged 13 commits into from
Nov 21, 2023
Merged

feat: operation outputs #2276

merged 13 commits into from
Nov 21, 2023

Conversation

shawnyama
Copy link
Contributor

@shawnyama shawnyama commented Nov 20, 2023

Description

  • Put operator outputs into tera-operator-outputs.vue
  • Edges can be removed by clicking the Unlink button when an output port is hovered
  • Fixed dataset node so that it doesn't reinitialize every time the workflow mounts
  • Organized css related to input/output ports
Screen.Recording.2023-11-20.at.6.35.36.PM.mov

@shawnyama shawnyama linked an issue Nov 20, 2023 that may be closed by this pull request
4 tasks
@shawnyama shawnyama marked this pull request as ready for review November 21, 2023 14:35
@shawnyama shawnyama requested a review from mwdchang November 21, 2023 18:18
@shawnyama shawnyama merged commit 10a88d9 into main Nov 21, 2023
4 checks passed
@shawnyama shawnyama deleted the op-outputs branch November 21, 2023 19:21
<span>
<label>
{{ getPortLabel(input) }}
{{ input.isOptional ? '(optional)' : '' }}
Copy link
Member

Choose a reason for hiding this comment

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

This should be part of the getPortLabel() function.

Comment on lines +77 to +80
// Once dataset is selected
if (isEmpty(props.node.outputs)) {
emit('select-dataset', { id: dataset.value.id, name: dataset.value.name });
}
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why we emit this event only when the outputs are empty?

Comment on lines +2 to +4
<ul v-if="!isEmpty(outputs)">
<li
v-for="(output, index) in outputs"
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the v-for handling the case of an empty array?
Or is that outputs could be null or undefined? Just checked and the type forces an array, so I don't think the v-if="!isEmpty(outputs)" is necessary.

@@ -136,10 +123,9 @@ function openInNewWindow() {
floatingWindow.open(url);
}

function mouseoverPort(event) {
function mouseoverPort(event: MouseEvent, portDirection: 'input' | 'output') {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if that portDirection would be better to be an enum to avoid typing issues.

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.

[TASK]: Operator outputs
3 participants