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/02 04:11:31 UTC

[GitHub] [dolphinscheduler] Amy0104 commented on a diff in pull request #10957: [Improvement-10942][UI]The workflow or task name is too long and resu…

Amy0104 commented on code in PR #10957:
URL: https://github.com/apache/dolphinscheduler/pull/10957#discussion_r935096479


##########
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-dependent.ts:
##########
@@ -308,7 +308,18 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] {
                   processCode
                 )
                 item.depTaskCode = 0
-              }
+              },
+              renderOption: ({
+                node,
+                option
+              }: {
+                node: VNode
+                option: SelectOption
+              }) =>
+                h(NTooltip, null, {
+                  trigger: () => node,
+                  default: () => option.label
+                })

Review Comment:
   Here the Ellipsis is better than Tooltip because there is no need to prompt when the name is not overflowing.



##########
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-dependent.ts:
##########
@@ -330,7 +341,18 @@ export function useDependent(model: { [field: string]: any }): IJsonItem[] {
             span: 24,
             name: t('project.node.task_name'),
             props: {
-              filterable: true
+              filterable: true,
+              renderOption: ({
+                node,
+                option
+              }: {
+                node: VNode
+                option: SelectOption
+              }) =>
+                h(NTooltip, null, {
+                  trigger: () => node,
+                  default: () => option.label
+                })

Review Comment:
   Same as above.



-- 
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