You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/08/12 02:12:38 UTC
[GitHub] [dolphinscheduler] sketchmind commented on a diff in pull request #11419: [Improvement-11386][UI] Concise the logic available for task action buttons
sketchmind commented on code in PR #11419:
URL: https://github.com/apache/dolphinscheduler/pull/11419#discussion_r944064639
##########
dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-context-menu.tsx:
##########
@@ -131,36 +127,37 @@ export default defineComponent({
class={styles['dag-context-menu']}
style={{ left: `${this.left}px`, top: `${this.top}px` }}
>
- {this.startButtonDisplay && (
+ {this.startDisplay && (
<NButton
class={`${styles['menu-item']}`}
- disabled={this.startReadonly}
onClick={this.startRunning}
>
{t('project.node.start')}
</NButton>)
}
- <NButton
- class={`${styles['menu-item']}`}
- disabled={this.menuReadonly}
- onClick={this.handleEdit}
- >
- {t('project.node.edit')}
- </NButton>
- <NButton
- class={`${styles['menu-item']}`}
- disabled={this.menuReadonly}
- onClick={this.handleCopy}
- >
- {t('project.node.copy')}
- </NButton>
- <NButton
- class={`${styles['menu-item']}`}
- disabled={this.menuReadonly}
- onClick={this.handleDelete}
- >
- {t('project.node.delete')}
- </NButton>
+ {this.menuDisplay && (
+ <div
+ >
+ <NButton
+ class={`${styles['menu-item']}`}
+ onClick={this.handleEdit}
+ >
+ {t('project.node.edit')}
+ </NButton>
+ <NButton
+ class={`${styles['menu-item']}`}
+ onClick={this.handleCopy}
+ >
+ {t('project.node.copy')}
+ </NButton>
+ <NButton
+ class={`${styles['menu-item']}`}
+ onClick={this.handleDelete}
+ >
+ {t('project.node.delete')}
+ </NButton>
+ </div>
+ )}
Review Comment:
> The fragment element is better than div here.
Is a '<></>' element ok?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org