Skip to content

Commit eb25035

Browse files
committed
fix: Adjust positioning and style of zoom buttons in CICDHistory components
1 parent baac806 commit eb25035

File tree

9 files changed

+37
-48
lines changed

9 files changed

+37
-48
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.1.8-beta-10",
3+
"version": "0.1.8-beta-11",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Assets/Icon/ic-exit-fullscreen.svg

Lines changed: 2 additions & 15 deletions
Loading

src/Assets/Icon/ic-fullscreen.svg

Lines changed: 2 additions & 2 deletions
Loading

src/Shared/Components/CICDHistory/History.components.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ export const LogResizeButton = ({ fullScreenView, setFullScreenView }: LogResize
6060
>
6161
<div>
6262
{fullScreenView ? (
63-
<ZoomOut className="zoom zoom--out pointer" onClick={toggleFullScreen} />
63+
<ZoomOut className="zoom zoom--out pointer dc__zi-4" onClick={toggleFullScreen} />
6464
) : (
65-
<ZoomIn className="zoom zoom--in pointer" onClick={toggleFullScreen} />
65+
<ZoomIn className="zoom zoom--in pointer dc__zi-4" onClick={toggleFullScreen} />
6666
)}
6767
</div>
6868
</Tippy>
@@ -71,7 +71,7 @@ export const LogResizeButton = ({ fullScreenView, setFullScreenView }: LogResize
7171
}
7272

7373
export const Scroller = ({ scrollToTop, scrollToBottom, style }: ScrollerType): JSX.Element => (
74-
<div style={style} className="dc__element-scroller flex column top">
74+
<div style={style} className="dc__element-scroller flex column top br-4">
7575
<Tippy className="default-tt" arrow={false} content="Scroll to Top">
7676
<button
7777
className="flex"

src/Shared/Components/CICDHistory/LogStageAccordion.tsx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const LogStageAccordion = ({
2626
return (
2727
<div className="flexbox-col dc__gap-8">
2828
<button
29-
className="flexbox dc__transparent dc__content-space py-6 px-8 br-4 dc__align-items-center dc__select-text logs-renderer__stage-accordion-hover"
29+
className="flexbox dc__transparent dc__content-space py-6 px-8 br-4 dc__align-items-center dc__select-text logs-renderer__stage-accordion-hover dc__position-sticky dc__zi-1 dc__top-40"
3030
style={{
3131
backgroundColor: isOpen ? '#2C3354' : '#0C1021',
3232
}}
@@ -49,23 +49,26 @@ const LogStageAccordion = ({
4949
{!!endTime && <span className="cn-0 fs-13 fw-4 lh-20">{getTimeDifference(startTime, endTime)}</span>}
5050
</button>
5151

52-
{isOpen &&
53-
logs.map((log: string, logsIndex: number) => (
54-
<div
55-
className="flex top left pl-24 dc__gap-10 lh-24 pb-10"
56-
// eslint-disable-next-line react/no-array-index-key
57-
key={`logs-${stage}-${startTime}-${logsIndex}`}
58-
>
59-
<span className="cn-4 col-2">{logsIndex + 1}</span>
60-
<p
61-
className="mono fs-14 mb-0-imp cn-0 dc__word-break"
62-
// eslint-disable-next-line react/no-danger
63-
dangerouslySetInnerHTML={{
64-
__html: DOMPurify.sanitize(log),
65-
}}
66-
/>
67-
</div>
68-
))}
52+
{isOpen && (
53+
<div className="flexbox-col dc__gap-4">
54+
{logs.map((log: string, logsIndex: number) => (
55+
<div
56+
className="flex top left pl-24 dc__gap-10 lh-20"
57+
// eslint-disable-next-line react/no-array-index-key
58+
key={`logs-${stage}-${startTime}-${logsIndex}`}
59+
>
60+
<span className="cn-4 col-2">{logsIndex + 1}</span>
61+
<p
62+
className="mono fs-14 mb-0-imp cn-0 dc__word-break"
63+
// eslint-disable-next-line react/no-danger
64+
dangerouslySetInnerHTML={{
65+
__html: DOMPurify.sanitize(log),
66+
}}
67+
/>
68+
</div>
69+
))}
70+
</div>
71+
)}
6972
</div>
7073
)
7174
}

src/Shared/Components/CICDHistory/LogsRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export const LogsRenderer = ({
396396
}}
397397
>
398398
<div
399-
className="flexbox pl-12 logs-renderer__search-bar logs-renderer__filters-border-bottom dc__position-sticky dc__top-0 dc__zi-1"
399+
className="flexbox pl-12 logs-renderer__search-bar logs-renderer__filters-border-bottom dc__position-sticky dc__top-0 dc__zi-2"
400400
// Doing this since we have binded 'f' with full screen and SearchVar has not exposed event on search, so on pressing f it goes to full screen
401401
onKeyDown={stopPropagation}
402402
style={{

src/Shared/Components/CICDHistory/TriggerOutput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ const HistoryLogs: React.FC<{
688688
</div>
689689
{(scrollToTop || scrollToBottom) && (
690690
<Scroller
691-
style={{ position: 'fixed', bottom: '25px', right: '32px' }}
691+
style={{ position: 'fixed', bottom: '52px', right: '12px', zIndex: '4' }}
692692
{...{ scrollToTop, scrollToBottom }}
693693
/>
694694
)}

src/Shared/Components/CICDHistory/cicdHistory.scss

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535

3636
.zoom {
3737
position: absolute;
38-
top: 200px;
39-
right: 32px;
38+
bottom: 12px;
39+
right: 12px;
4040
transition: top 0.3s;
4141
padding: 6px;
42-
width: 36px;
43-
height: 36px;
42+
width: 32px;
43+
height: 32px;
4444
border-radius: 4px;
4545
box-shadow:
4646
0 0 4px 0 rgba(0, 10, 20, 0.5),
@@ -129,7 +129,6 @@
129129
}
130130

131131
.zoom {
132-
top: 30px;
133132
transition: top 0.3s;
134133
}
135134
}

0 commit comments

Comments
 (0)