Skip to content

Commit 81d7d6b

Browse files
author
Kama Huang
committed
fix console panel scroll bar issue when first rendered
Signed-off-by: Kama Huang <kamahuan@amazon.com>
1 parent eb4d42d commit 81d7d6b

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

public/pages/workflow_detail/resizable_workspace.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
327327
display: 'flex',
328328
flexDirection: 'column',
329329
overflow: 'hidden',
330+
//avoid console panel scroll bar when first render
331+
overflowX: 'hidden',
332+
overflowY: 'hidden',
330333
}}
331334
>
332335
<div
@@ -480,6 +483,8 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
480483
maxWidth: '100%',
481484
marginBottom: '15px',
482485
paddingBottom: '5px',
486+
scrollbarWidth: 'none',
487+
msOverflowStyle: 'none',
483488
}}
484489
>
485490
<EuiPanel
@@ -491,11 +496,17 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
491496
borderRadius: 0,
492497
borderTop: 'none',
493498
overflowX: 'hidden',
494-
overflowY: 'auto',
499+
overflowY:
500+
consoleErrorMessages.length > 0 || !isEmpty(ingestResponse)
501+
? 'auto'
502+
: 'hidden',
495503
width: '100%',
496504
maxWidth: '100%',
497505
minWidth: 0,
506+
scrollbarWidth: 'none',
507+
msOverflowStyle: 'none',
498508
}}
509+
className="console-panel-no-scroll"
499510
>
500511
<EuiFlexGroup
501512
alignItems="center"

public/pages/workflow_detail/tools/console/console.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export function Console(props: ConsoleProps) {
177177
style={{
178178
maxHeight: hasIngestResponse ? '15vh' : '25vh',
179179
minHeight: '100px',
180-
overflow: 'auto',
180+
overflow: hasErrors ? 'auto' : 'hidden',
181181
width: '100%',
182182
maxWidth: '100%',
183183
minWidth: 0,
@@ -262,7 +262,7 @@ export function Console(props: ConsoleProps) {
262262
style={{
263263
height: hasErrors ? '12vh' : '22vh',
264264
minHeight: '100px',
265-
overflow: 'auto',
265+
overflow: hasIngestResponse ? 'auto' : 'hidden',
266266
width: '100%',
267267
maxWidth: '100%',
268268
minWidth: 0,

public/pages/workflow_detail/workflow-detail-styles.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,17 @@
88
text-overflow: ellipsis;
99
overflow: hidden;
1010
}
11+
12+
.console-panel-no-scroll::-webkit-scrollbar {
13+
display: none;
14+
width: 0;
15+
height: 0;
16+
}
17+
18+
.console-panel-no-scroll::-webkit-scrollbar-track {
19+
display: none;
20+
}
21+
22+
.console-panel-no-scroll::-webkit-scrollbar-thumb {
23+
display: none;
24+
}

0 commit comments

Comments
 (0)