Skip to content

Commit cfb7293

Browse files
authored
Merge pull request #70 from ShlomoPorges/development
Development
2 parents 71fe640 + a08b0ef commit cfb7293

File tree

6 files changed

+75
-17
lines changed

6 files changed

+75
-17
lines changed

src/components/xxxSnackbars.jsx

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// import React from 'react';
2+
// import PropTypes from 'prop-types';
3+
// import Button from '@material-ui/core/Button';
4+
// import Snackbar from '@material-ui/core/Snackbar';
5+
// import SnackbarContentWrapper from './SnackbarContentWrapper.jsx';
6+
7+
// const Snackbars = (props) => {
8+
// const {
9+
// successOpen, errorOpen, handleNotificationClose, msg, viewAppDir,
10+
// } = props;
11+
// const successMsg = <div>Your files were successfully created. <Button
12+
// variant='fab'
13+
// mini
14+
// aria-label='View app directory'
15+
// onClick={viewAppDir}
16+
// >View</Button></div>;
17+
// const errMsg = `There was an error while creating your files. ${msg}`;
18+
// return (
19+
// <div>
20+
// <Snackbar
21+
// anchorOrigin={{
22+
// vertical: 'bottom',
23+
// horizontal: 'left',
24+
// }}
25+
// open={successOpen}
26+
// autoHideDuration={5000}
27+
// >
28+
// <SnackbarContentWrapper
29+
// onClose={handleNotificationClose}
30+
// variant="success"
31+
// message={successMsg}
32+
// />
33+
// </Snackbar>
34+
// <Snackbar
35+
// anchorOrigin={{
36+
// vertical: 'bottom',
37+
// horizontal: 'left',
38+
// }}
39+
// open={errorOpen}
40+
// autoHideDuration={5000}
41+
// >
42+
// <SnackbarContentWrapper
43+
// onClose={handleNotificationClose}
44+
// variant="error"
45+
// message={errMsg}
46+
// />
47+
// </Snackbar>
48+
// </div>
49+
// );
50+
// };
51+
52+
// Snackbars.propTypes = {
53+
// successOpen: PropTypes.bool.isRequired,
54+
// errorOpen: PropTypes.bool.isRequired,
55+
// msg: PropTypes.string.isRequired,
56+
// viewAppDir: PropTypes.func.isRequired,
57+
// handleNotificationClose: PropTypes.func.isRequired,
58+
// };
59+
60+
// export default Snackbars;

src/containers/AppContainer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import LinearProgress from '@material-ui/core/LinearProgress';
66
import LeftContainer from './LeftContainer.jsx';
77
import MainContainer from './MainContainer.jsx';
88
// import RightContainer from './RightContainer.jsx';
9-
import convertIdsToObjs from '../utils/convertIdsToObjs.util';
9+
// import convertIdsToObjs from '../utils/convertIdsToObjs.util';
1010
import theme from '../components/theme.ts';
1111
import { loadInitData } from '../actions/components';
1212

@@ -46,28 +46,28 @@ class AppContainer extends Component {
4646

4747
render() {
4848
const {
49-
components, totalComponents, focusComponent, loading, selectableChildren,
49+
components, focusComponent, loading, selectableChildren,
5050
} = this.props;
5151
const { width, rightColumnOpen } = this.state;
5252

5353
// uses component childIds and parentIds arrays (numbers) to build component-filled children and parents arrays
54-
const updatedComponents = convertIdsToObjs(components);
54+
//const updatedComponents = convertIdsToObjs(components);
5555

5656
return (
5757
<MuiThemeProvider theme={theme}>
5858
<div className="app-container">
5959
<LeftContainer
60-
components={updatedComponents}
61-
totalComponents={totalComponents}
60+
components={components}
61+
// totalComponents={totalComponents}
6262
focusComponent={focusComponent}
6363
selectableChildren={selectableChildren}
6464
/>
6565
<MainContainer
66-
components={updatedComponents}
66+
components={components}
6767
collapseColumn={this.collapseColumn}
6868
width={width}
6969
rightColumnOpen={rightColumnOpen}
70-
totalComponents={totalComponents}
70+
// totalComponents={totalComponents}
7171
/>
7272
{/* <RightContainer
7373
width={width}

src/containers/LeftContainer.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ class LeftContainer extends Component {
6060
render() {
6161
const {
6262
components,
63-
updateComponent,
6463
deleteComponent,
6564
focusComponent,
66-
totalComponents,
6765
classes,
6866
addChild,
6967
changeFocusComponent,

src/containers/MainContainer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const mapDispatchToProps = dispatch => ({
4848
});
4949

5050
const mapStateToProps = store => ({
51-
totalComponents: store.workspace.totalComponents,
51+
// totalComponents: store.workspace.totalComponents,
5252
focusComponent: store.workspace.focusComponent,
5353
focusChild: store.workspace.focusChild,
5454
stateComponents: store.workspace.components,

src/reducers/componentReducer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ const componentReducer = (state = initialApplicationState, action) => {
169169
case HANDLE_TRANSFORM:
170170
return handleTransform(state, action.payload);
171171

172-
case MOVE_TO_BOTTOM:
173-
return moveToBottom(state, action.payload);
174-
case MOVE_TO_TOP:
175-
return moveToTop(state, action.payload);
172+
// case MOVE_TO_BOTTOM:
173+
// return moveToBottom(state, action.payload);
174+
// case MOVE_TO_TOP:
175+
// return moveToTop(state, action.payload);
176176
case OPEN_EXPANSION_PANEL:
177177
return openExpansionPanel(state, action.payload);
178178
case DELETE_ALL_DATA:

src/utils/findComponentById.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ interface Component {
3131
parentIds: number[];
3232
color: string;
3333
draggable: boolean;
34-
childrenIds: number[];
35-
selectableParents?: any[]; // unused
36-
expanded?: boolean; // unused
34+
// childrenIds: number[];
35+
// selectableParents?: any[]; // unused
36+
// expanded?: boolean; // unused
3737
props: Prop[];
3838
nextPropId: number;
3939
position: Position;

0 commit comments

Comments
 (0)