Skip to content

Commit 052e33d

Browse files
author
Roman.Sergeenko
committed
#RI-2192 - fix cli resizable calculation of height
1 parent ec8fbb1 commit 052e33d

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

redisinsight/ui/src/pages/instance/InstancePage.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ const InstancePage = ({ routes = [] }: Props) => {
6464

6565
useEffect(() => () => {
6666
setSizes((prevSizes: any) => {
67-
localStorageService.set(BrowserStorageItem.cliResizableContainer, prevSizes)
67+
localStorageService.set(BrowserStorageItem.cliResizableContainer, {
68+
[firstPanelId]: prevSizes[firstPanelId],
69+
// partially fix elastic resizable issue with zooming
70+
[secondPanelId]: 100 - prevSizes[firstPanelId],
71+
})
6872
})
6973
}, [])
7074

@@ -98,7 +102,7 @@ const InstancePage = ({ routes = [] }: Props) => {
98102
minSize="55px"
99103
paddingSize="none"
100104
size={isShowBottomGroup ? sizes[firstPanelId] : 100}
101-
wrapperProps={{ className: cx({ [styles.mainComponent]: !isShowBottomGroup }) }}
105+
wrapperProps={{ className: cx(styles.panelTop, { [styles.mainComponent]: !isShowBottomGroup }) }}
102106
data-testid={firstPanelId}
103107
>
104108
<InstancePageRouter routes={routes} />
@@ -110,8 +114,9 @@ const InstancePage = ({ routes = [] }: Props) => {
110114
id={secondPanelId}
111115
scrollable={false}
112116
size={isShowBottomGroup ? sizes[secondPanelId] : 0}
113-
style={{ zIndex: 10 }}
117+
style={{ zIndex: 9 }}
114118
minSize="140px"
119+
wrapperProps={{ className: cx(styles.panelBottom) }}
115120
data-testid={secondPanelId}
116121
paddingSize="none"
117122
>

redisinsight/ui/src/pages/instance/styles.module.scss

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@
44

55
.resizableButton {
66
display: none;
7-
margin: 1px 16px 0 !important;
7+
margin: -8px 16px -8px !important;
88
z-index: 10;
99
background-color: var(--euiPageBackgroundColor);
1010
}
1111

12-
:global(.show-cli) .resizableButton {
13-
display: block;
14-
z-index: 10;
12+
:global(.show-cli) {
13+
.resizableButton {
14+
display: block;
15+
z-index: 10;
16+
}
17+
18+
.panelTop {
19+
padding-bottom: 8px;
20+
}
21+
22+
.panelBottom {
23+
padding-top: 8px;
24+
}
1525
}

0 commit comments

Comments
 (0)