Skip to content

Commit 828811c

Browse files
committed
fix: SourceInfo - Tippy to Tooltip change
1 parent 0f88f71 commit 828811c

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
lines changed

src/components/app/details/appDetails/SourceInfo.tsx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
getIsManualApprovalConfigured,
2525
ReleaseMode,
2626
showError,
27+
Tooltip,
2728
} from '@devtron-labs/devtron-fe-common-lib'
2829
import { URLS } from '../../../../config'
2930
import { EnvSelector } from './AppDetails'
@@ -49,19 +50,6 @@ import HelmAppConfigApplyStatusCard from '@Components/v2/appDetails/sourceInfo/e
4950
const AppDetailsDownloadCard = importComponentFromFELibrary('AppDetailsDownloadCard')
5051
const DeploymentWindowStatusCard = importComponentFromFELibrary('DeploymentWindowStatusCard')
5152

52-
const renderWithTippy = (isArgoCdApp: boolean) => (children: JSX.Element) => (
53-
<Tippy
54-
className="default-tt"
55-
arrow={false}
56-
placement="top"
57-
content={`Deployed using ${
58-
isArgoCdApp ? DeploymentAppTypeNameMapping.GitOps : DeploymentAppTypeNameMapping.Helm
59-
}`}
60-
>
61-
{children}
62-
</Tippy>
63-
)
64-
6553
export const SourceInfo = ({
6654
appDetails,
6755
setDetailed = null,
@@ -187,11 +175,17 @@ export const SourceInfo = ({
187175
disabled={loadingDetails || loadingResourceTree || (params.envId && !showCommitInfo)}
188176
/>
189177
{appDetails?.deploymentAppType && (
190-
<ConditionalWrap wrap={renderWithTippy(isArgoCdApp)} condition={!appDetails.isVirtualEnvironment}>
191-
<div className="flex">
178+
<Tooltip
179+
placement="top"
180+
alwaysShowTippyOnHover={!appDetails.isVirtualEnvironment}
181+
content={`Deployed using ${
182+
isArgoCdApp ? DeploymentAppTypeNameMapping.GitOps : DeploymentAppTypeNameMapping.Helm
183+
}`}
184+
>
185+
<div className={`flex ${!appDetails.isVirtualEnvironment ? 'ml-16' : ''}`}>
192186
<DeploymentTypeIcon deploymentAppType={appDetails?.deploymentAppType} />
193187
</div>
194-
</ConditionalWrap>
188+
</Tooltip>
195189
)}
196190
{isdeploymentAppDeleting && (
197191
<div data-testid="deleteing-argocd-pipeline">

src/components/common/DeploymentTypeIcon/DeploymentTypeIcon.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ function DeploymentTypeIcon({
3838
return <VirtualEnvHelpTippy isVirtualIcon />
3939
}
4040
if (deploymentAppType === DeploymentAppTypes.GITOPS || appType === AppType.EXTERNAL_ARGO_APP) {
41-
return <ArgoCD data-testid="argo-cd-app-logo" className="icon-dim-32 ml-16" />
41+
return <ArgoCD data-testid="argo-cd-app-logo" className="icon-dim-32" />
4242
}
4343
if (appType === AppType.EXTERNAL_FLUX_APP) {
44-
return <FluxCD data-testid="flux-cd-app-logo" className="icon-dim-32 ml-16" />
44+
return <FluxCD data-testid="flux-cd-app-logo" className="icon-dim-32" />
4545
}
4646
if (deploymentAppType === DeploymentAppTypes.HELM) {
47-
return <Helm data-testid="helm-app-logo" className="icon-dim-32 ml-16" />
47+
return <Helm data-testid="helm-app-logo" className="icon-dim-32" />
4848
}
4949
return null
5050
}

src/components/v2/appDetails/sourceInfo/EnvironmentSelector.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ const EnvironmentSelectorComponent = ({
312312
placement="top"
313313
content={`Deployed using ${getDeployedUsing()}`}
314314
>
315-
<div className="flex">
315+
<div className={`flex ${!isVirtualEnvironment ? 'ml-16' : ''}`}>
316316
<DeploymentTypeIcon
317317
deploymentAppType={appDetails.deploymentAppType}
318318
appType={appDetails.appType}
@@ -412,7 +412,7 @@ const EnvironmentSelectorComponent = ({
412412
<TriggerUrlModal
413413
installedAppId={params.appId}
414414
isExternalApp={isExternalApp}
415-
appId={appDetails.appType !== AppType.DEVTRON_HELM_CHART ? appIdentifier : '' }
415+
appId={appDetails.appType !== AppType.DEVTRON_HELM_CHART ? appIdentifier : ''}
416416
envId={params.envId}
417417
close={closeUrlInfo}
418418
appType={appDetails.appType}

0 commit comments

Comments
 (0)