Skip to content

Commit 29c8259

Browse files
committed
fixing bottom panel
1 parent 50aab95 commit 29c8259

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

Dockerrun.aws.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"Environment": [
1313
{
1414
"Name": "API_BASE_URL",
15-
"Value": "Reactypev17-env.eba-mbvivk7k.us-east-1.elasticbeanstalk.com"
15+
"Value": "Reactype-v17env.eba-sw2fhsbj.us-east-1.elasticbeanstalk.com"
1616
}
1717
]
1818
}

app/src/components/bottom/BottomPanel.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ const BottomPanel = (props): JSX.Element => {
2222
const dy = y - e.clientY;
2323

2424
// Adjust the dimension of element
25-
node.current.style.height = `${h + dy}px`;
25+
const newVal = h + dy;
26+
const styles = window.getComputedStyle(node.current);
27+
const min = parseInt(styles.minHeight, 10);
28+
console.log('is newVal > min newVal', newVal)
29+
console.log('is newVal > min min', min)
30+
node.current.style.height = newVal > min ? `${h + dy}px` : `${min}px`;
31+
console.log('mousemove', node.current.style.height)
2632
};
2733

2834
const mouseUpHandler = function () {
@@ -33,6 +39,7 @@ const BottomPanel = (props): JSX.Element => {
3339

3440
useEffect(() => {
3541
node.current.style.height = '50vh';
42+
node.current.style.minHeight = '50vh';
3643
}, []);
3744

3845
return (
@@ -41,7 +48,7 @@ const BottomPanel = (props): JSX.Element => {
4148
<div id="resize-drag" onMouseDown={mouseDownHandler} tabIndex={0}>
4249
......
4350
</div>
44-
<BottomTabs isThemeLight={props.isThemeLight} />
51+
<BottomTabs setBottomShow = {props.setBottomShow} isThemeLight={props.isThemeLight} />
4552
</div></>
4653
);
4754
};

app/src/components/bottom/BottomTabs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const BottomTabs = (props): JSX.Element => {
5050
<div
5151
className={`${classes.root} ${classes.rootLight}`}
5252
style={{ backgroundColor: '#191919' , zIndex: 1, borderTop: '2px solid grey'}}
53+
onMouseOver={()=>{console.log('mouse over'); props.setBottomShow(true)}}
5354
>
5455
<Box
5556
display="flex"

app/src/containers/MainContainer.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ const MainContainer = (props): JSX.Element => {
7272

7373
useEffect(() => {
7474
const handleClick = (event) => {
75+
console.log(event.target)
76+
7577
if (event.type === "click" &&
7678
(bottomPanelRef.current &&
77-
!bottomPanelRef.current.contains(event.target)) || (event.type === "message" && event.data === 'iframeClicked')) {
79+
!bottomPanelRef.current.contains(event.target) && event.target.getAttribute("role") != "menu" && !event.target.classList.contains('MuiInput-input')) || (event.type === "message" && event.data === 'iframeClicked')) {
7880
//menuButtonRef is to ensure that handleClose does not get invoked when the user clicks on the menu dropdown button
7981
handleClose();
8082
}
@@ -105,8 +107,8 @@ const MainContainer = (props): JSX.Element => {
105107
<CanvasContainer isThemeLight={props.isThemeLight} />
106108
<DemoRender />
107109
</div>
108-
<div onMouseOver={()=>setBottomShow(true)} className={showPanel} ref={ref}>
109-
<BottomPanel isThemeLight={props.isThemeLight} />
110+
<div className={showPanel} ref = {ref}>
111+
<BottomPanel setBottomShow = {setBottomShow} isThemeLight={props.isThemeLight} />
110112
</div>
111113
</div>
112114
);

app/src/public/styles/style.css

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,10 @@ BOTTOM PANEL
513513
.bottom-hide:focus-within {
514514
max-height: 100%;
515515
}
516-
516+
/*
517517
.bottom-hide:hover {
518518
max-height: 100%;
519-
}
519+
} */
520520

521521
.tab-content {
522522
height: calc(100% - 76px);
@@ -528,10 +528,17 @@ BOTTOM PANEL
528528
background-color: #191919;
529529
}
530530

531-
.MuiDataGrid-menuList {
531+
.MuiDataGrid-menuList, .MuiDataGrid-columnsPanel, .MuiDataGrid-filterForm {
532532

533533
background-color: #333333
534534
}
535+
.MuiDataGrid-panelHeader, .MuiDataGrid-panelFooter {
536+
537+
background-color: #252525
538+
539+
}
540+
541+
535542

536543
#resize-drag {
537544

0 commit comments

Comments
 (0)