Skip to content

Commit 47ac7ab

Browse files
committed
css fixes
1 parent 1d4fe5c commit 47ac7ab

File tree

4 files changed

+51
-32
lines changed

4 files changed

+51
-32
lines changed

src/Assets/Icon/ic-circle.svg

Lines changed: 9 additions & 0 deletions
Loading

src/Shared/Components/GitCommitInfoGeneric/GitCommitInfoGeneric.tsx

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import { useState } from 'react'
1919
import moment from 'moment'
2020
import Tippy from '@tippyjs/react'
21+
import ClipboardButton from '@Common/ClipboardButton/ClipboardButton'
2122
import { stopPropagation } from '../../../Common/Helper'
2223
import { ReactComponent as Commit } from '../../../Assets/Icon/ic-commit.svg'
2324
import { ReactComponent as CommitIcon } from '../../../Assets/Icon/ic-code-commit.svg'
@@ -33,6 +34,7 @@ import GitMaterialInfoHeader from './GitMaterialInfoHeader'
3334
import { DATE_TIME_FORMATS } from '../../../Common/Constants'
3435
import { MATERIAL_EXCLUDE_TIPPY_TEXT } from '../../constants'
3536
import { GitCommitInfoGenericProps } from './types'
37+
import { ReactComponent as Circle } from '../../../Assets/Icon/ic-circle.svg'
3638

3739
const GitCommitInfoGeneric = ({
3840
materialSourceType,
@@ -198,7 +200,7 @@ const GitCommitInfoGeneric = ({
198200
)
199201
}
200202

201-
return <span data-testid="valid-git-commit">Select</span>
203+
return <Circle data-testid="valid-git-commit" />
202204
}
203205

204206
return (
@@ -215,36 +217,50 @@ const GitCommitInfoGeneric = ({
215217
{!_isWebhook && (
216218
<>
217219
{_lowerCaseCommitInfo.commit && (
218-
<div className="ml-16 mr-16 flex dc__content-space">
220+
<div className="flex dc__content-space">
219221
{_commitUrl ? (
220-
<a
221-
href={_commitUrl}
222-
target="_blank"
223-
rel="noopener noreferrer"
224-
className="commit-hash"
225-
onClick={stopPropagation}
226-
data-testid={`deployment-history-source-code-material-history${index}`}
227-
>
228-
<div
229-
className="material-history__header"
230-
data-testid={`git-commit-credential${index}`}
222+
<div className="flexbox dc__gap-8">
223+
<a
224+
href={_commitUrl}
225+
target="_blank"
226+
rel="noopener noreferrer"
227+
className="commit-hash"
228+
onClick={stopPropagation}
229+
data-testid={`deployment-history-source-code-material-history${index}`}
231230
>
232-
<Commit className="commit-hash__icon" />
233-
{_lowerCaseCommitInfo.commit}
234-
</div>
235-
</a>
231+
<div
232+
className="material-history__header "
233+
data-testid={`git-commit-credential${index}`}
234+
>
235+
<Commit className="commit-hash__icon" />
236+
{_lowerCaseCommitInfo.commit.slice(-6)}
237+
</div>
238+
</a>
239+
<ClipboardButton content={_lowerCaseCommitInfo.commit} />
240+
</div>
236241
) : null}
237242
{selectedCommitInfo ? (
238-
<div className="material-history__select-text dc_max-width__max-content">
243+
<div className="dc_max-width__max-content">
239244
{_lowerCaseCommitInfo.isselected ? (
240-
<Check data-testid="selected-git-commit" className="dc__align-right" />
245+
<Check
246+
data-testid="selected-git-commit"
247+
className="dc__align-right icon-dim-20"
248+
/>
241249
) : (
242250
matSelectionText()
243251
)}
244252
</div>
245253
) : null}
246254
</div>
247255
)}
256+
{_lowerCaseCommitInfo.message ? (
257+
<div
258+
data-testid={`${_lowerCaseCommitInfo.message.trim()}-${isExcluded ? 'excluded' : 'included'}`}
259+
className="material-history__text flex left top material-history-text--padded dc__word-break-all mb-8"
260+
>
261+
<span className="fs-13 fw-6 lh-20 cn-9"> {_lowerCaseCommitInfo.message}</span>
262+
</div>
263+
) : null}
248264
{_lowerCaseCommitInfo.author ? (
249265
<div className="material-history__text flex left">
250266
<PersonIcon className="icon-dim-16 mr-8" /> {_lowerCaseCommitInfo.author}
@@ -256,15 +272,6 @@ const GitCommitInfoGeneric = ({
256272
{moment(_lowerCaseCommitInfo.date).format(DATE_TIME_FORMATS.TWELVE_HOURS_FORMAT)}
257273
</div>
258274
) : null}
259-
{_lowerCaseCommitInfo.message ? (
260-
<div
261-
data-testid={`${_lowerCaseCommitInfo.message.trim()}-${isExcluded ? 'excluded' : 'included'}`}
262-
className="material-history__text flex left top material-history-text--padded dc__word-break-all"
263-
>
264-
<MessageIcon className="icon-dim-16 mw-16 mr-8 mt-2" />
265-
{_lowerCaseCommitInfo.message}
266-
</div>
267-
) : null}
268275
</>
269276
)}
270277

@@ -287,8 +294,12 @@ const GitCommitInfoGeneric = ({
287294
) : null}
288295
</div>
289296
{selectedCommitInfo ? (
290-
<div className="material-history__select-text flexbox dc__align-items-center dc__content-end fs-12">
291-
{_lowerCaseCommitInfo.isselected ? <Check className="dc__align-right" /> : 'Select'}
297+
<div className="flexbox dc__align-items-center dc__content-end fs-12">
298+
{_lowerCaseCommitInfo.isselected ? (
299+
<Check className="dc__align-right" />
300+
) : (
301+
<Circle data-testid="valid-git-commit" />
302+
)}
292303
</div>
293304
) : null}
294305
</div>

src/Shared/Components/MaterialHistory/MaterialHistory.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const MaterialHistory = ({ material, pipelineName, ciPipelineId, selectCommit }:
4040
<div
4141
data-testid={`material-history-${index}`}
4242
key={_commitId}
43-
className={`material-history w-auto mt-12 ${history.isSelected ? 'material-history-selected' : ''}`}
43+
className={`material-history w-auto p-16 ${history.isSelected ? 'material-history-selected' : ''}`}
4444
onClick={(e) => onClickMaterialHistory(e, _commitId, history.excluded)}
4545
>
4646
<GitCommitInfoGeneric

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export interface customEnv {
3737
HELM_APP_DETAILS_POLLING_INTERVAL?: number
3838
EA_APP_DETAILS_POLLING_INTERVAL?: number
3939
CENTRAL_API_ENDPOINT?: string
40-
HIDE_DEPLOYMENT_GROUPS?: boolean
4140
HIDE_GITOPS_OR_HELM_OPTION?: boolean
4241
CONFIGURABLE_TIMEOUT?: string
4342
HIDE_APPLICATION_GROUPS?: boolean

0 commit comments

Comments
 (0)