Skip to content

Commit 07c9d8b

Browse files
committed
feat: replace Tippy with Tooltip component for improved tooltip handling in CICD history
1 parent ef775bd commit 07c9d8b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/Shared/Components/CICDHistory/CiPipelineSourceConfig.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
*/
1616

1717
import { useState, useEffect, ReactNode } from 'react'
18-
import Tippy from '@tippyjs/react'
1918
import { ReactComponent as Info } from '@Icons/ic-info-outlined.svg'
20-
import { getBranchIcon, getWebhookEventsForEventId, SourceTypeMap } from '../../../Common'
19+
import { getBranchIcon, getWebhookEventsForEventId, SourceTypeMap, Tooltip } from '../../../Common'
2120
import { GIT_BRANCH_NOT_CONFIGURED, DEFAULT_GIT_BRANCH_VALUE } from './constants'
2221
import { buildHoverHtmlForWebhook } from './utils'
2322
import { CIPipelineSourceConfigInterface } from './types'
@@ -119,18 +118,19 @@ export const CiPipelineSourceConfig = ({
119118
}, [])
120119

121120
return (
122-
<div className={`flex left dc__align-start ${showTooltip ? 'fw-5' : ''} ${rootClassName}`}>
121+
<div className={`flex left ${showTooltip ? 'fw-5' : ''} ${rootClassName}`}>
123122
{loading && showIcons && <span className="dc__loading-dots">loading</span>}
124123
{!loading && (
125-
<div className="flex dc__gap-4">
124+
<div className="flexbox dc__gap-4 dc__align-start">
126125
{showIcons && (
127126
<span className="icon-dim-12 flex dc__no-shrink dc__fill-available-space mt-4">
128127
{getBranchIcon(sourceType, _isRegex, sourceValueBase)}
129128
</span>
130129
)}
131-
{showTooltip && (
132-
<Tippy
133-
className="default-tt dc__word-break-all"
130+
{showTooltip ? (
131+
<Tooltip
132+
wordBreak
133+
alwaysShowTippyOnHover
134134
arrow={false}
135135
placement="bottom"
136136
content={sourceValueAdv}
@@ -159,9 +159,10 @@ export const CiPipelineSourceConfig = ({
159159
</span>
160160
)}
161161
</div>
162-
</Tippy>
162+
</Tooltip>
163+
) : (
164+
<span className="dc__ellipsis-right">{sourceValueAdv}</span>
163165
)}
164-
{!showTooltip && <span className="dc__ellipsis-right">{sourceValueAdv}</span>}
165166
</div>
166167
)}
167168
</div>

0 commit comments

Comments
 (0)