|
23 | 23 | routeForWorkerDeployment, |
24 | 24 | routeForWorkflow, |
25 | 25 | } from '$lib/utilities/route-for'; |
26 | | - import { truncateValue } from '$lib/utilities/truncate-value'; |
| 26 | + import { |
| 27 | + TRUNCATE_LENGTH, |
| 28 | + truncateValue, |
| 29 | + } from '$lib/utilities/truncate-value'; |
27 | 30 | import { isWorkflowTaskFailure } from '$lib/utilities/workflow-task-failures'; |
28 | 31 |
|
29 | 32 | import FilterableTableCell from './filterable-table-cell.svelte'; |
|
73 | 76 | 'Build ID', |
74 | 77 | 'Scheduled By ID', |
75 | 78 | ]; |
| 79 | +
|
| 80 | + const hideTooltip = (value: string | undefined) => { |
| 81 | + return ( |
| 82 | + !truncate || (truncate && truncateValue(value).length <= TRUNCATE_LENGTH) |
| 83 | + ); |
| 84 | + }; |
76 | 85 | </script> |
77 | 86 |
|
78 | 87 | {#if filterableLabels.includes(label) || isCustomKeywordOrTextAttribute} |
|
216 | 225 | options={{ format: truncate ? 'short' : 'long' }} |
217 | 226 | /> |
218 | 227 | {:else if label === 'Task Queue'} |
219 | | - <Tooltip text={workflow.taskQueue} top class="min-w-0" hide={!truncate}> |
| 228 | + <Tooltip |
| 229 | + text={workflow.taskQueue} |
| 230 | + top |
| 231 | + class="min-w-0" |
| 232 | + hide={hideTooltip(workflow.taskQueue)} |
| 233 | + > |
220 | 234 | {truncate ? truncateValue(workflow.taskQueue) : workflow.taskQueue} |
221 | 235 | </Tooltip> |
222 | 236 | {:else if label === 'Parent Namespace'} |
223 | 237 | <Tooltip |
224 | 238 | text={workflow?.parentNamespaceId ?? ''} |
225 | 239 | top |
226 | 240 | class="min-w-0" |
227 | | - hide={!truncate} |
| 241 | + hide={hideTooltip(workflow?.parentNamespaceId)} |
228 | 242 | > |
229 | 243 | {truncate |
230 | 244 | ? truncateValue(workflow?.parentNamespaceId ?? '') |
|
255 | 269 | ''} |
256 | 270 | top |
257 | 271 | class="min-w-0" |
258 | | - hide={!truncate} |
| 272 | + hide={hideTooltip( |
| 273 | + workflow.searchAttributes?.indexedFields?.TemporalScheduledById, |
| 274 | + )} |
259 | 275 | > |
260 | 276 | {truncate |
261 | 277 | ? truncateValue( |
|
286 | 302 | {:else if $customSearchAttributes[label] === SEARCH_ATTRIBUTE_TYPE.BOOL} |
287 | 303 | <Badge>{content}</Badge> |
288 | 304 | {:else} |
289 | | - <Tooltip text={content} top class="min-w-0" hide={!truncate}> |
| 305 | + <Tooltip text={content} top class="min-w-0" hide={hideTooltip(content)}> |
290 | 306 | {truncate ? truncateValue(content) : content} |
291 | 307 | </Tooltip> |
292 | 308 | {/if} |
|
0 commit comments