Skip to content

Commit 1ab8116

Browse files
committed
css fixes
1 parent 0ba8670 commit 1ab8116

File tree

6 files changed

+30
-11
lines changed

6 files changed

+30
-11
lines changed

src/Common/ClipboardButton/ClipboardButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default function ClipboardButton({
4747
const handleDisableTippy = () => setEnableTippy(false)
4848
const handleCopyContent = useCallback(
4949
(e?) => {
50-
stopPropagation(e)
50+
if(e) stopPropagation(e)
5151
copyToClipboard(content, handleTextCopied)
5252
},
5353
[content],

src/Shared/Components/ArtifactInfoModal/ArtifactInfoModal.component.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ const ArtifactInfoModal = ({
9999
{isArtifactInfoAvailable ? (
100100
<div className="select-material p-16 flexbox-col dc__gap-12">
101101
{artifactInfo.materials.map((material) => (
102-
<MaterialHistory material={material} pipelineName="" key={material.id} />
102+
<MaterialHistory
103+
material={material}
104+
pipelineName=""
105+
key={material.id}
106+
isCommitInfoModal
107+
/>
103108
))}
104109
<div className="dc__dashed_icon_grid-container">
105110
<hr className="dc__dotted-line" />

src/Shared/Components/GitCommitInfoGeneric/GitCommitInfoGeneric.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ const GitCommitInfoGeneric = ({
246246
</div>
247247
</a>
248248
<span
249-
className="git-commit-info-generic__copy dc__visibility-hidden"
249+
className="git-commit-info-generic__copy dc__visibility-hidden p-2"
250250
data-testid="git-commit-copy"
251251
>
252252
<ClipboardButton content={_lowerCaseCommitInfo.commit} />
@@ -261,7 +261,9 @@ const GitCommitInfoGeneric = ({
261261
data-testid={`${_lowerCaseCommitInfo.message.trim()}-${isExcluded ? 'excluded' : 'included'}`}
262262
className="material-history__text lh-20 flex left dc__gap-8 top material-history-text--padded dc__word-break-all"
263263
>
264-
<span className="fs-13 fw-6 lh-20 cn-9">{_lowerCaseCommitInfo.message}</span>
264+
<span className="fs-13 fw-6 lh-20 cn-9 dc__ellipsis-right__3rd-line">
265+
{_lowerCaseCommitInfo.message}
266+
</span>
265267
</div>
266268
) : null}
267269
<div className="flexbox-col dc__gap-4">

src/Shared/Components/GitCommitInfoGeneric/GitMaterialInfoHeader.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ const GitMaterialInfoHeader = ({
4848
>
4949
<div className={getGitIcon(repoUrl)} />
5050
<div className="flex left left dc__gap-4 fs-13">
51-
<div className="repo cn-9 fw-6" data-testid={`deployment-history-source-code-repo${index}`}>
51+
<div
52+
className="repo cn-9 fw-6 dc__mxw-250 dc__ellipsis-right"
53+
data-testid={`deployment-history-source-code-repo${index}`}
54+
>
5255
{repo}
5356
</div>
5457
<div className="branch flex left cn-7 dc__gap-4">

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ import { SourceTypeMap } from '../../../Common'
1818
import { GitCommitInfoGeneric } from '../GitCommitInfoGeneric'
1919
import { MaterialHistoryProps } from './types'
2020

21-
const MaterialHistory = ({ material, pipelineName, ciPipelineId, selectCommit }: MaterialHistoryProps) => {
21+
const MaterialHistory = ({
22+
material,
23+
pipelineName,
24+
ciPipelineId,
25+
selectCommit,
26+
isCommitInfoModal,
27+
}: MaterialHistoryProps) => {
2228
const onClickMaterialHistory = (e, _commitId, isExcluded) => {
2329
e.stopPropagation()
2430
if (selectCommit && !isExcluded) {
@@ -53,10 +59,12 @@ const MaterialHistory = ({ material, pipelineName, ciPipelineId, selectCommit }:
5359
const historyList = materialHistoryMapWithTime[date]
5460
return (
5561
<>
56-
<div className="flex left dc__gap-8">
57-
<span className="fs-12 lh-18 cn-7 fw-6 w-126">{date}</span>
58-
<div className="h-1 bcn-2 w-100" />
59-
</div>
62+
{!isCommitInfoModal && (
63+
<div className="flex left dc__gap-8">
64+
<span className="fs-12 lh-18 cn-7 fw-6 w-126">{date}</span>
65+
<div className="h-1 bcn-2 w-100" />
66+
</div>
67+
)}
6068

6169
{historyList?.map((history, index) => {
6270
const _commitId =
@@ -68,7 +76,7 @@ const MaterialHistory = ({ material, pipelineName, ciPipelineId, selectCommit }:
6876
<div
6977
data-testid={`material-history-${index}`}
7078
key={_commitId}
71-
className={`material-history w-auto cursor ${history.isSelected ? 'material-history-selected' : ''}`}
79+
className={`material-history w-auto cursor ${!history.excluded && !isCommitInfoModal ? 'cursor material-history__box-shadow' : ''} ${history.isSelected ? 'material-history-selected' : ''}`}
7280
onClick={(e) => onClickMaterialHistory(e, _commitId, history.excluded)}
7381
>
7482
<GitCommitInfoGeneric

src/Shared/Components/MaterialHistory/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ export interface MaterialHistoryProps {
2121
pipelineName: string
2222
ciPipelineId?: string
2323
selectCommit?: (materialId: string, commit: string, ciPipelineId?: string) => void
24+
isCommitInfoModal?: boolean
2425
}

0 commit comments

Comments
 (0)