An easy-to-use platform for EEG experimentation in the classroom
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Addressed comments

+30 -115
+2 -2
CONTRIBUTING.md
··· 21 21 22 22 If you find a bug, or have a suggestion on how to improve the project, just fill out a Github issue! 23 23 24 - If you're interested in using BrainWaves as a basis for your own work to streamline EEG experimentation or psychological data collection, we'd love to hear from you. Send an email to [dano@neurotechx.com](mailto:dano@neurotechx.com) or create an issue and we'll be in touch. 24 + If you're interested in using BrainWaves as a basis for your own work to streamline EEG experimentation or psychological data collection, we'd love to hear from you. Send an email to [morrisondano@gmail.com](mailto:morrisondano@gmail.com) or create an issue and we'll be in touch. 25 25 26 - All project management for BrainWaves occurs through issues on Github (via Zenhub). If you want to see what we need help with, or what is on our , check out the issues on this repository. 26 + All project management for BrainWaves occurs through issues on Github (via Zenhub). If you want to see what we need help with, or what is on our [roadmap](ROADMAP.md), check out the issues on this repository.
+2 -5
ROADMAP.md
··· 5 5 July/August 2020: Jiffy Lube & Pyodide 6 6 Fall 2020+: LSL & Lab.js 7 7 8 - ## Jiffy Lube 9 - 10 - - Finishing soon 11 - - Will provide CI and better dev experience 12 - 13 8 ## Pyodide 14 9 15 10 - Successfully added pyodide via webworker ··· 34 29 ## Lab.js 35 30 36 31 - Type lab.js data (pending lab.js TypeScript library update) 32 + - Remove jspsych and refactor lab.js usage 37 33 38 34 ## Non-technical stuff 35 + 39 36 - Share on HN/reddit 40 37 - Consider writing short papers for JOSS and/or Journal of Open Source Education 41 38 - UCSD
+1 -5
app/components/ExperimentWindow.tsx
··· 68 68 image.filename 69 69 ), 70 70 })) 71 - .reduce((obj, item) => { 72 - // return { ...obj, item }; ?? 73 - obj[Object.keys(item)[0]] = Object.values(item)[0]; 74 - return obj; 75 - }, {}); 71 + .reduce((obj, item) => ({ ...obj, ...item }), {}); 76 72 } 77 73 78 74 studyWithParams.on('end', () => {
-7
app/components/InputCollect.tsx
··· 24 24 } 25 25 26 26 export default class InputCollect extends Component<Props, State> { 27 - // handleClose: () => void; 28 - // handleExit: () => void; 29 - // handleEnterSubmit: (Object) => void; 30 27 constructor(props: Props) { 31 28 super(props); 32 29 this.state = { ··· 133 130 ); 134 131 } 135 132 } 136 - 137 - function sanitizeTextInput(text: string) { 138 - return text.replace(/[|&;$%@"<>()+,./]/g, ''); 139 - }
+2 -5
app/components/InputModal.tsx
··· 1 1 import React, { Component } from 'react'; 2 2 import { Input, Modal, Button } from 'semantic-ui-react'; 3 3 import { debounce } from 'lodash'; 4 + import { sanitizeTextInput } from '../utils/ui'; 4 5 import styles from './styles/common.css'; 5 6 6 7 interface Props { ··· 16 17 } 17 18 18 19 export default class InputModal extends Component<Props, State> { 19 - static sanitizeTextInput(text: string) { 20 - return text.replace(/[|&;$%@"<>()+,./]/g, ''); 21 - } 22 - 23 20 constructor(props: Props) { 24 21 super(props); 25 22 this.state = { ··· 38 35 39 36 handleClose() { 40 37 if (this.state.enteredText.length >= 1) { 41 - this.props.onClose(InputModal.sanitizeTextInput(this.state.enteredText)); 38 + this.props.onClose(sanitizeTextInput(this.state.enteredText)); 42 39 } else { 43 40 this.setState({ isError: true }); 44 41 }
+1 -1
app/components/PreviewExperimentComponent.tsx
··· 4 4 import styles from './styles/collect.css'; 5 5 6 6 import { getImages } from '../utils/filesystem/storage'; 7 - import { Trial, ExperimentParameters } from '../constants/interfaces'; 7 + import { ExperimentParameters } from '../constants/interfaces'; 8 8 import { EXPERIMENTS } from '../constants/constants'; 9 9 10 10 interface Props {
-6
app/main.dev.ts
··· 101 101 mainWindow.show(); 102 102 mainWindow.focus(); 103 103 } 104 - mainWindow.webContents.openDevTools(); 105 104 }); 106 105 107 106 mainWindow.on('closed', () => { ··· 113 112 // Remove this if your app does not use auto updates 114 113 // eslint-disable-next-line 115 114 new AppUpdater(); 116 - 117 - // mainWindow.setMenu(null); 118 - // if (process.env.NODE_ENV === 'development') { 119 - // mainWindow.webContents.openDevTools(); 120 - // } 121 115 }; 122 116 123 117 /**
+9 -68
app/menu.ts
··· 65 65 { label: 'Services', submenu: [] }, 66 66 { type: 'separator' }, 67 67 { 68 - label: 'Hide ElectronReact', 69 - accelerator: 'Command+H', 70 - selector: 'hide:', 71 - }, 72 - { 73 68 label: 'Hide Others', 74 69 accelerator: 'Command+Shift+H', 75 70 selector: 'hideOtherApplications:', ··· 82 77 click: () => { 83 78 app.quit(); 84 79 }, 85 - }, 86 - ], 87 - }; 88 - const subMenuEdit: DarwinMenuItemConstructorOptions = { 89 - label: 'Edit', 90 - submenu: [ 91 - { label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' }, 92 - { label: 'Redo', accelerator: 'Shift+Command+Z', selector: 'redo:' }, 93 - { type: 'separator' }, 94 - { label: 'Cut', accelerator: 'Command+X', selector: 'cut:' }, 95 - { label: 'Copy', accelerator: 'Command+C', selector: 'copy:' }, 96 - { label: 'Paste', accelerator: 'Command+V', selector: 'paste:' }, 97 - { 98 - label: 'Select All', 99 - accelerator: 'Command+A', 100 - selector: 'selectAll:', 101 80 }, 102 81 ], 103 82 }; ··· 156 135 label: 'Help', 157 136 submenu: [ 158 137 { 159 - label: 'Learn More', 138 + label: 'Documentation', 160 139 click() { 161 - shell.openExternal('https://electronjs.org'); 140 + shell.openExternal('https://github.com/makebrainwaves/BrainWaves/'); 162 141 }, 163 142 }, 164 143 { 165 - label: 'Documentation', 144 + label: 'Search Issues', 166 145 click() { 167 146 shell.openExternal( 168 - 'https://github.com/electron/electron/tree/master/docs#readme' 147 + 'https://github.com/makebrainwaves/BrainWaves/issues' 169 148 ); 170 149 }, 171 150 }, 172 - { 173 - label: 'Community Discussions', 174 - click() { 175 - shell.openExternal('https://www.electronjs.org/community'); 176 - }, 177 - }, 178 - { 179 - label: 'Search Issues', 180 - click() { 181 - shell.openExternal('https://github.com/electron/electron/issues'); 182 - }, 183 - }, 184 151 ], 185 152 }; 186 153 ··· 190 157 ? subMenuViewDev 191 158 : subMenuViewProd; 192 159 193 - return [subMenuAbout, subMenuEdit, subMenuView, subMenuWindow, subMenuHelp]; 160 + return [subMenuAbout, subMenuView, subMenuWindow, subMenuHelp]; 194 161 } 195 162 196 163 buildDefaultTemplate() { 197 164 const templateDefault = [ 198 165 { 199 - label: '&File', 200 - submenu: [ 201 - { 202 - label: '&Open', 203 - accelerator: 'Ctrl+O', 204 - }, 205 - { 206 - label: '&Close', 207 - accelerator: 'Ctrl+W', 208 - click: () => { 209 - this.mainWindow.close(); 210 - }, 211 - }, 212 - ], 213 - }, 214 - { 215 166 label: '&View', 216 167 submenu: 217 168 process.env.NODE_ENV === 'development' || ··· 257 208 label: 'Help', 258 209 submenu: [ 259 210 { 260 - label: 'Learn More', 261 - click() { 262 - shell.openExternal('https://electronjs.org'); 263 - }, 264 - }, 265 - { 266 211 label: 'Documentation', 267 212 click() { 268 213 shell.openExternal( 269 - 'https://github.com/electron/electron/tree/master/docs#readme' 214 + 'https://github.com/makebrainwaves/BrainWaves/' 270 215 ); 271 216 }, 272 217 }, 273 218 { 274 - label: 'Community Discussions', 275 - click() { 276 - shell.openExternal('https://www.electronjs.org/community'); 277 - }, 278 - }, 279 - { 280 219 label: 'Search Issues', 281 220 click() { 282 - shell.openExternal('https://github.com/electron/electron/issues'); 221 + shell.openExternal( 222 + 'https://github.com/makebrainwaves/BrainWaves/issues' 223 + ); 283 224 }, 284 225 }, 285 226 ],
+1 -3
app/utils/filesystem/dialog.ts
··· 3 3 * These functions are all executed in the main process 4 4 */ 5 5 6 - import { remote } from 'electron'; 6 + import { dialog } from 'electron'; 7 7 import { FILE_TYPES } from '../../constants/constants'; 8 - 9 - const { dialog } = remote; 10 8 11 9 export const loadDialog = (event, arg) => { 12 10 switch (arg) {
+3
app/utils/ui/index.tsx
··· 1 + export function sanitizeTextInput(text: string) { 2 + return text.replace(/[|&;$%@"<>()+,./]/g, ''); 3 + }
+9 -13
package.json
··· 1 1 { 2 - "name": "BrainWaves", 2 + "name": "brainwaves", 3 3 "productName": "BrainWaves", 4 4 "version": "0.14.0", 5 5 "description": "EEG Experiment Desktop Application", ··· 96 96 }, 97 97 "publish": { 98 98 "provider": "github", 99 - "owner": "electron-react-boilerplate", 100 - "repo": "electron-react-boilerplate", 99 + "owner": "makebrainwaves", 100 + "repo": "brainwaves", 101 101 "private": false 102 102 } 103 103 }, ··· 112 112 }, 113 113 "contributors": [ 114 114 { 115 - "name": "Dano Morrison", 116 - "email": "dano@neurotechx.com", 117 - "url": "https://github.com/makebrainwaves" 118 - }, 119 - { 120 115 "name": "Teon L Brooks", 121 116 "url": "https://teonian.com" 122 117 }, ··· 129 124 "keywords": [ 130 125 "eeg", 131 126 "electron", 132 - "boilerplate", 133 127 "react", 134 128 "redux", 135 - "sass", 136 - "webpack", 137 - "hot", 138 - "reload" 129 + "redux-observable", 130 + "muse", 131 + "emotiv", 132 + "pyodide", 133 + "wasm", 134 + "lab.js" 139 135 ], 140 136 "homepage": "https://wp.nyu.edu/brainwaves/", 141 137 "jest": {