Skip to content

Commit 4ae1cd7

Browse files
committed
Co-authored-by: Bryan Chau <https://github.com/bchauu>
Co-authored-by: Abeer Faizan <https://github.com/abeer-f> Co-authored-by: Ulrich Neujahr <https://github.com/nobrackets> Co-authored-by: Stephen Kim <https://github.com/stephenkim612>
1 parent 3acde76 commit 4ae1cd7

File tree

18 files changed

+5
-113
lines changed

18 files changed

+5
-113
lines changed

app/electron/main.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
const electron = require('electron');
32

43
/*
@@ -15,9 +14,6 @@ const {
1514
session,
1615
ipcMain,
1716
} = require('electron');
18-
19-
20-
2117
// The splash screen is what appears while the app is loading
2218
// const { initSplashScreen, OfficeTemplate } = require('electron-splashscreen');
2319
const { resolve } = require('app-root-path');
@@ -48,11 +44,9 @@ let menuBuilder;
4844
// this function will be called when Electron has initialized itself
4945
async function createWindow() {
5046
// install react dev tools if we are in development mode
51-
if (isDev) {
52-
} else {
5347
// this will happen before creating the browser window. it returns a Boolean whether the protocol of scheme 'app://' was successfully registered and a file (index-prod.html) was sent as the response
5448
protocol.registerBufferProtocol(Protocol.scheme, Protocol.requestHandler);
55-
}
49+
5650
// Create the browser window.
5751
win = new BrowserWindow({
5852
// full screen

app/electron/menu.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
const { Menu } = require('electron');
22
const { BrowserWindow } = require('electron');
3-
const fs = require('fs');
4-
const path = require('path');
53
const isMac = process.platform === 'darwin';
6-
const port = 5000;
74
const Protocol = require('./protocol');
8-
const tutorialRoute = `http://localhost:${port}/tutorial`;
9-
105
/*
116
DESCRIPTION: This file generates an array containing a menu based on the operating system the user is running.
12-
137
menuBuilder: The entire file is encompassed in menuBuilder. Ultimately, menuBuilder returns a function called
148
buildMenu that uses defaultTemplate to construct a menu at the top of the application (as invoked in main.js)
159

app/setupTests.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/src/components/login/SignIn.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
RouteComponentProps
77
} from 'react-router-dom';
88
import { sessionIsCreated } from '../../helperFunctions/auth';
9-
import FacebookLogin from 'react-facebook-login';
109
import Avatar from '@material-ui/core/Avatar';
1110
import Button from '@material-ui/core/Button';
1211
import CssBaseline from '@material-ui/core/CssBaseline';
@@ -16,7 +15,6 @@ import Box from '@material-ui/core/Box';
1615
import Typography from '@material-ui/core/Typography';
1716
import { makeStyles } from '@material-ui/core/styles';
1817
import Container from '@material-ui/core/Container';
19-
import GitHubIcon from '@material-ui/icons/GitHub';
2018
import LockOutlinedIcon from '@material-ui/icons/LockOutlined';
2119
import { newUserIsCreated } from '../../helperFunctions/auth';
2220
import randomPassword from '../../helperFunctions/randomPassword';
@@ -67,7 +65,7 @@ const SignIn: React.FC<LoginInt & RouteComponentProps> = props => {
6765
const [invalidPassMsg, setInvalidPassMsg] = useState('');
6866
const [invalidUser, setInvalidUser] = useState(false);
6967
const [invalidPass, setInvalidPass] = useState(false);
70-
const FBAPPID = process.env.REACT_APP_FB_APP_ID;
68+
7169

7270
useEffect(() => {
7371
const githubCookie = setInterval(() => {

app/src/components/right/ComponentDrag.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
// Future developers: This file needs to move to right folder: src/components/right
2-
31
import React, { useContext } from 'react';
42
import StateContext from '../../context/context';
53
import Grid from '@material-ui/core/Grid';
64
import ComponentPanelItem from './ComponentPanelItem';
75
import ComponentPanelRoutingItem from './ComponentPanelRoutingItem';
86
import { makeStyles } from '@material-ui/core/styles';
9-
10-
117
// The component panel section of the left panel displays all components and has the ability to add new components
128
const ComponentDrag = ({isThemeLight}): JSX.Element => {
139
const classes = useStyles();

app/src/components/right/TabPanel.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
21
import React, { ReactNode, useState } from 'react';
3-
import { useTheme } from '@material-ui/core/styles';
42
import { makeStyles, Theme } from '@material-ui/core/styles';
53
import AppBar from '@material-ui/core/AppBar';
64
import Tabs from '@material-ui/core/Tabs';
@@ -13,7 +11,6 @@ interface TabPanelProps {
1311
value: any;
1412
}
1513
const TabPanelItem = (props: TabPanelProps): JSX.Element => {
16-
const theme = useTheme();
1714
const { children, index, value, ...other } = props;
1815
return (
1916
<div

app/src/containers/CustomizationPanel.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import React, {
33
useContext,
44
useEffect,
55
useMemo,
6-
useRef,
76
useCallback
87
} from 'react';
98
import { makeStyles } from '@material-ui/core/styles';
@@ -19,16 +18,11 @@ import List from '@material-ui/core/List';
1918
import ListItem from '@material-ui/core/ListItem';
2019
import ListItemText from '@material-ui/core/ListItemText';
2120
import createModal from '../components/right/createModal';
22-
import ComponentPanel from '../components/right/ComponentPanel';
23-
import UndoIcon from '@material-ui/icons/Undo';
24-
import RedoIcon from '@material-ui/icons/Redo';
25-
import TabPanel from '../components/right/TabPanel';
2621
import { styleContext } from './AppContainer';
2722
import ErrorMessages from '../constants/ErrorMessages';
2823
import ProjectManager from '../components/right/ProjectManager';
2924
import StateContext from '../context/context';
3025
import FormSelector from '../components/form/Selector';
31-
import { config } from 'ace-builds';
3226
import UseStateModal from '../components/bottom/UseStateModal';
3327
// Previously named rightContainer, Renamed to Customizationpanel this now hangs on BottomTabs
3428
// need to pass in props to use the useHistory feature of react router

app/src/context/themeContext 2.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/src/helperFunctions/gitHubOauth.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/src/interfaces/Interfaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface Component {
4040
stateProps: StateProp[]; // state: [ { id, key, value, type }, ...]
4141
annotations?: string;
4242
useStateCodes: string[];
43-
useContext?: object // structure --> {providerId: {attribute: stateId, ....}, ...}
43+
useContext?: object
4444
}
4545
export interface StateProp {
4646
key: string;

app/src/reducers.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@ const rootReducer = (state = initialState, action) => {
55
return { ...state, code: action.payload };
66
case 'ADD_CHILD':
77
return { ...state, child: action.payload };
8-
case 'CHANGE_FOCUS':
9-
return { ...state, focus: action.payload };
108
case 'RESET_STATE':
119
return {...state, code: {} }
1210
default:
1311
return state;
1412
}
1513
};
16-
1714
export default rootReducer;

app/src/reducers/componentReducer.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,7 @@ const reducer = (state: State, action: Action) => {
4545
// if no search is found return -1
4646
return { directParent: null, childIndexValue: null };
4747
};
48-
const deleteChild = (component: Component, currentChildId: number) => {
49-
const { directParent, childIndexValue } = findParent(
50-
component,
51-
currentChildId
52-
);
53-
directParent.children.splice(childIndexValue, 1);
54-
};
48+
5549
// determine if there's a child of a given type in a component
5650
const childTypeExists = (
5751
type: string,

app/src/utils/createTestSuiteNext.util.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ module.exports = {
3333
"/node_modules/",
3434
"enzyme.js"
3535
],
36-
setupFilesAfterEnv: ["<rootDir>/enzyme.js"],
3736
coverageReporters: [
3837
"json",
3938
"lcov",

package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
"scripts": {
5454
"postinstall": "set ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true electron-builder install-app-deps",
5555
"dev-server": "cross-env NODE_ENV=development webpack-dev-server --config ./webpack.development.js",
56-
"start": "concurrently --success first \"cross-env NODE_ENV=development webpack-dev-server --config ./webpack.development.js\" \"cross-env NODE_ENV=development electron .\" \"npm run server\" -k",
5756
"dev": "concurrently --success first \"cross-env NODE_ENV=development webpack-dev-server --config ./webpack.development.js\" \"cross-env NODE_ENV=development electron .\" \"npm run server\" -k",
58-
"p": "concurrently --success first \"npm run dev-server\" \"cross-env NODE_ENV=production electron .\" \"nodemon server/server.js\" -k",
5957
"prod-build": "cross-env NODE_ENV=production npx webpack --mode=production --config ./webpack.production.js",
6058
"prod": "npm run prod-build && electron . --no-sandbox",
6159
"pack": "electron-builder --dir",
@@ -73,7 +71,7 @@
7371
},
7472
"keywords": [
7573
"electron",
76-
"prototying",
74+
"prototyping",
7775
"react",
7876
"next.js"
7977
],
@@ -102,9 +100,6 @@
102100
"diagnostics": false
103101
}
104102
},
105-
"setupFilesAfterEnv": [
106-
"<rootDir>/app/setupTests.ts"
107-
],
108103
"snapshotSerializers": [
109104
"enzyme-to-json/serializer"
110105
]

postcss.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

server/graphQL/resolvers/query.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const { Projects, Comments } = require('../../models/reactypeModels');
33
// Link to Apollo Query Types:
44
// https://www.apollographql.com/docs/apollo-server/data/resolvers/#defining-a-resolver
55

6-
76
const Project = {
87
getProject: async (parent, { projId }) => {
98
const resp = await Projects.findOne({ _id: projId });

server/package.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

webpack.production.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const nonce = require('./app/src/utils/createNonce')();
77

88
// merges webpack.config.js with production specific configs
99
module.exports = merge(base, {
10-
// enables optimizations for production mode
1110
// sets process.env.NODE_ENV to 'production'
1211
mode: 'production',
1312
plugins: [

0 commit comments

Comments
 (0)