Skip to content

Commit 5c4be4b

Browse files
authored
Merge pull request #220 from open-source-labs/denton/statemanager
Denton/statemanager
2 parents 81d0096 + 6dafc2a commit 5c4be4b

File tree

8 files changed

+29
-15
lines changed

8 files changed

+29
-15
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/StateManagement/CreateTab/components/TableParentProps.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
22
import { useDispatch, useSelector } from 'react-redux';
33
import {
44
DataGrid,
5-
GridEditRowsModel,
5+
GridEditRowsModel
66
} from '@mui/x-data-grid';
77
import Button from '@mui/material/Button';
88
import makeStyles from '@mui/styles/makeStyles';
@@ -104,6 +104,7 @@ const TableParentProps = props => {
104104
}
105105
}
106106

107+
107108
return (
108109
<div className={'state-prop-grid'}>
109110
<DataGrid
@@ -113,6 +114,7 @@ const TableParentProps = props => {
113114
rowsPerPageOptions={[5]}
114115
editRowsModel={editRowsModel}
115116
className={props.isThemeLight ? classes.themeLight : classes.themeDark}
117+
disableColumnMenu={true}
116118
/>
117119
</div>
118120
);

app/src/components/StateManagement/CreateTab/components/TablePassedInProps.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useEffect } from 'react';
22
import {
33
DataGrid,
4-
GridEditRowsModel,
4+
GridEditRowsModel
55
} from '@mui/x-data-grid';
66
import Button from '@mui/material/Button';
77
import ClearIcon from '@mui/icons-material/Clear';
@@ -96,6 +96,7 @@ const TablePassedInProps = props => {
9696
let rows: any = passedInProps?.slice();
9797
//let rows: readonly StateProp[] = passedInProps?.slice() || [];
9898

99+
99100
return (
100101
<div className={'state-prop-grid'}>
101102
<DataGrid
@@ -105,6 +106,7 @@ const TablePassedInProps = props => {
105106
rowsPerPageOptions={[5]}
106107
editRowsModel={editRowsModel}
107108
className={props.isThemeLight ? classes.themeLight : classes.themeDark}
109+
disableColumnMenu={true}
108110
/>
109111
</div>
110112
);

app/src/components/StateManagement/CreateTab/components/TableStateProps.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ const TableStateProps = props => {
103103
let rows = [];
104104
currentComponent.stateProps?.forEach((prop) =>{ rows.push(prop)});
105105

106-
107-
108106
return (
109107
<div className={'state-prop-grid'}>
110108
<DataGrid
@@ -115,7 +113,7 @@ const TableStateProps = props => {
115113
editRowsModel={editRowsModel}
116114
onRowClick={selectHandler}
117115
className={props.isThemeLight ? classes.themeLight : classes.themeDark}
118-
disableColumnMenu={false}
116+
disableColumnMenu={true}
119117
/>
120118
</div>
121119
);

app/src/components/bottom/BottomPanel.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ 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+
node.current.style.height = newVal > min ? `${h + dy}px` : `${min}px`;
2629
};
2730

2831
const mouseUpHandler = function () {
@@ -33,6 +36,7 @@ const BottomPanel = (props): JSX.Element => {
3336

3437
useEffect(() => {
3538
node.current.style.height = '50vh';
39+
node.current.style.minHeight = '50vh';
3640
}, []);
3741

3842
return (
@@ -41,7 +45,7 @@ const BottomPanel = (props): JSX.Element => {
4145
<div id="resize-drag" onMouseDown={mouseDownHandler} tabIndex={0}>
4246
......
4347
</div>
44-
<BottomTabs isThemeLight={props.isThemeLight} />
48+
<BottomTabs setBottomShow = {props.setBottomShow} isThemeLight={props.isThemeLight} />
4549
</div></>
4650
);
4751
};

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={()=>{props.setBottomShow(true)}}
5354
>
5455
<Box
5556
display="flex"

app/src/containers/MainContainer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ const MainContainer = (props): JSX.Element => {
7171
const bottomPanelRef = useRef(null);
7272

7373
useEffect(() => {
74-
const handleClick = (event) => {
74+
const handleClick = (event) => {
7575
if (event.type === "click" &&
7676
(bottomPanelRef.current &&
77-
!bottomPanelRef.current.contains(event.target)) || (event.type === "message" && event.data === 'iframeClicked')) {
77+
!bottomPanelRef.current.contains(event.target) && event.target.getAttribute("role") != "menu" && !event.target.classList.contains('MuiInput-input')) || (event.type === "message" && event.data === 'iframeClicked')) {
7878
//menuButtonRef is to ensure that handleClose does not get invoked when the user clicks on the menu dropdown button
7979
handleClose();
8080
}
@@ -105,8 +105,8 @@ const MainContainer = (props): JSX.Element => {
105105
<CanvasContainer isThemeLight={props.isThemeLight} />
106106
<DemoRender />
107107
</div>
108-
<div onMouseOver={()=>setBottomShow(true)} className={showPanel} ref={ref}>
109-
<BottomPanel isThemeLight={props.isThemeLight} />
108+
<div className={showPanel} ref = {ref}>
109+
<BottomPanel setBottomShow = {setBottomShow} isThemeLight={props.isThemeLight} />
110110
</div>
111111
</div>
112112
);

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)