Skip to content

Commit 2b196bf

Browse files
author
rodriguez-facundo
committed
#139 Bring new icons for plots
1 parent dbfca3b commit 2b196bf

11 files changed

Lines changed: 344 additions & 88 deletions

File tree

webapp/Theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
33

44
// orange
5-
const primaryColor = '#37ABC8'
5+
export const primaryColor = '#37ABC8'
66

77
export const bgLight = '#4A4A4A';
88
export const bgRegular = '#434343';

webapp/components/NetPyNE.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,6 @@ class NetPyNE extends React.Component {
5959
<LayoutManager/>
6060
</div>
6161
</div>
62-
63-
64-
{/* <div className={classes.console}>
65-
// Flexlayout bottom panel gives weird layout so can't send the console there
66-
// when the widget is closed and the python console must remain open somewhere for the app to sync
67-
68-
{!this.props.pythonConsoleWidget ? <NetPyNEPythonConsole /> : null}
69-
</div> */}
70-
71-
7262
</div>
7363
);
7464
}

webapp/components/general/FileBrowser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export default class FileBrowser extends React.Component {
140140
<Dialog
141141
open={this.props.open}
142142
onClose={() => this.props.onRequestClose()}
143+
style={{ zIndex: 5000 }}
143144
>
144145
<DialogContent>
145146
<div style={{ marginBottom: '15px', color: 'white' }}>

webapp/components/general/NetPyNEIcons.js

Lines changed: 290 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webapp/components/layout/LayoutManager.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { isEqual } from '../../Utils';
88
import WidgetFactory from './WidgetFactory';
99
import TabsetIconFactory from './TabsetIconFactory'
1010
import defaultLayoutConfiguration from './layoutConf.json';
11-
import Icon from '@material-ui/core/Icon';
1211

1312
import { withStyles } from '@material-ui/core/styles'
1413
import onAction from './OnLayoutAction';
@@ -239,7 +238,7 @@ class LayoutManager extends Component {
239238
}
240239

241240
onRenderTab (node,renderValues) {
242-
renderValues.leading = <Icon className={node.getConfig().icon}/>
241+
console.log('pepe')
243242
}
244243
render () {
245244
const { classes, widgets } = this.props

webapp/components/settings/Drawer.js

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,16 @@ import ChevronRightIcon from '@material-ui/icons/ChevronRight';
1111
import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
1212
import Typography from '@material-ui/core/Typography';
1313

14-
import AdjustIcon from '@material-ui/icons/Adjust';
1514
import { WidgetStatus } from '../../constants';
1615
import {
17-
HLS_WIDGETS, PYTHON_CONSOLE_WIDGET,
16+
HLS_WIDGETS, getPythonConsoleWidget,
1817
MORPHOLOGY_WIDGET,PLOTS_WIDGETS
1918
} from '../../redux/reducers/flexlayout'
2019

21-
import {
22-
PopulationIcon, CellIcon, SynapseIcon, NetworkIcon,
23-
SourceIcon, TargetIcon, CogsIcon, SliderHIcon, CodeIcon
24-
} from '../general/NetPyNEIcons'
20+
import DrawerIcon from '../general/NetPyNEIcons'
2521

26-
// Avoid defining properties with css || inline style
27-
const useIconStyles = makeStyles(({ palette }) => ({ icon: { color: props => props.selected ? palette.primary.main : palette.common.white } }))
2822

29-
const DrawerIcon = ({ widgetId, selected }) => {
30-
const classes = useIconStyles({ selected })
31-
switch (widgetId) {
32-
case 'popParams':
33-
return <PopulationIcon fontSize="large" className={classes.icon}/>
34-
case 'cellParams':
35-
return <CellIcon fontSize="large" className={classes.icon}/>
36-
case 'synMechParams':
37-
return <SynapseIcon fontSize="large" className={classes.icon}/>
38-
case 'connParams':
39-
return <NetworkIcon fontSize="large" className={classes.icon}/>
40-
case 'stimSourceParams':
41-
return <SourceIcon fontSize="large" className={classes.icon}/>
42-
case 'stimTargetParams':
43-
return <TargetIcon fontSize="large" className={classes.icon}/>
44-
case 'simConfig':
45-
return <CogsIcon fontSize="large" className={classes.icon}/>
46-
case 'analysis':
47-
return <SliderHIcon fontSize="large" className={classes.icon}/>
48-
case 'python':
49-
return <CodeIcon fontSize="large" className={classes.icon}/>
50-
default:
51-
return <AdjustIcon fontSize="large" className={classes.icon}/>
52-
}
53-
}
23+
// Avoid defining properties with css || inline style
5424
const drawerOpenWidth = 200;
5525
const drawerCloseWidth = 48;
5626

@@ -101,7 +71,7 @@ export default ({ widgets, newWidget, editMode, activateWidget }) => {
10171
function createFocusWidget (widgetId) {
10272
if (!widgets[widgetId]) {
10373
// pick from the list of available widgets
104-
let widget = ({ ...HLS_WIDGETS, python: PYTHON_CONSOLE_WIDGET })[widgetId]
74+
let widget = ({ ...HLS_WIDGETS, pythonEdit: getPythonConsoleWidget(true) })[widgetId]
10575
if (!editMode) {
10676
widget = simulateModeWidget(widgetId)
10777
}
@@ -119,19 +89,19 @@ export default ({ widgets, newWidget, editMode, activateWidget }) => {
11989
return PLOTS_WIDGETS[widgetId]
12090
}
12191
// pick from the list of available widgets
122-
return ({ D3Canvas: MORPHOLOGY_WIDGET, python: PYTHON_CONSOLE_WIDGET })[widgetId]
92+
return ({ D3Canvas: MORPHOLOGY_WIDGET, pythonExplore: getPythonConsoleWidget(false) })[widgetId]
12393
}
12494

12595

12696
function getMenu () {
12797
if (editMode) {
12898
const array = [...Object.values(HLS_WIDGETS),
129-
PYTHON_CONSOLE_WIDGET]
99+
getPythonConsoleWidget(true)]
130100
return array
131101
} else {
132102
const array = [MORPHOLOGY_WIDGET,
133103
...Object.values(PLOTS_WIDGETS),
134-
PYTHON_CONSOLE_WIDGET]
104+
getPythonConsoleWidget(false)]
135105

136106
return array
137107
}

webapp/components/topbar/dialogs/ActionDialog.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export default class ActionDialog extends React.Component {
7575

7676
<Dialog
7777
fullWidth
78-
style={{ zIndex: 3000 }}
7978
maxWidth={this.props.openErrorDialogBox ? 'md' : 'sm'}
8079
open={!this.state.hide || this.props.openErrorDialogBox}
8180
onClose={() => this.cancelDialog()}

webapp/components/topbar/dialogs/ImportExportHLS.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ class ImportExportHLS extends React.Component {
236236
<FormControl className={classes.selectField}>
237237
<InputLabel className={classes.selectFieldLabel}>Are custom mod files required for this model?</InputLabel>
238238
<Select
239-
id="appBarImportRequiresMod"
240239
style={{ marginTop:0 }}
241240
value={this.state.loadMod === undefined ? '' : this.state.loadMod}
242241
onChange={event => this.setState({ loadMod: event.target.value })}

webapp/constants.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,38 @@ export const TOPBAR_CONSTANTS = {
5050
EXPLORE_EXISTING_NETWORK:'Explore Existing Network',
5151
BACK_TO_EDITION: 'Back to edition'
5252

53+
}
54+
55+
/*
56+
* ------------------------------------------------------------------------------ //
57+
* ------------------------------------------------------------------------------ //
58+
*/
59+
60+
export const WIDGETS_IDS = {
61+
POP_PARAMS: 'popParams',
62+
CELL_PARAMS: 'celParams',
63+
SYN_MECH_PARAMS: 'synMechParams',
64+
CONN_PARAMS: 'connParams',
65+
STIM_SOURCE_PARAMS: 'stimSourceParams',
66+
STIM_TARGET_PARAMS: 'stimTargetParams',
67+
SIM_CONFIG: 'simConfig',
68+
ANALYSIS: "analysis",
69+
MORPHOLOGY: 'D3Canvas',
70+
CONNECTION_PLOT: 'connectionPlot',
71+
D2_NET_PLOT: 'd2NetPlot',
72+
SHAPE_PLOT: 'shapePlot',
73+
TRACES_PLOT: 'tracesPlot',
74+
RASTER_PLOT: 'rasterPlot',
75+
SPIKE_PLOT: 'spikePlot',
76+
SPIKE_STATS_PLOT: 'spikeStatsPlot',
77+
RATE_PSD_PLOT: 'ratePSDPlot',
78+
LFP_TIMESERIES_PLOT: 'LFPTimeSeriesPlot',
79+
LFP_PSD_PLOT: 'LFPPSDPlot',
80+
LFP_SPECTROGRAM_PLOT: 'LFPSpectrogramPlot',
81+
LFP_LOCATION_PLOT: 'LFPLocationsPlot',
82+
GRAGER_PLOT: 'grangerPlot',
83+
RXD_CONCENTRATION_PLOT: 'rxdConcentrationPlot',
84+
PYTHON_CONSOLE_EDIT: 'pythonEdit',
85+
PYTHON_CONSOLE_EXPLORE: 'pythonExplore',
86+
5387
}

webapp/css/flexlayout.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@
151151
padding: 0;
152152
font-weight: normal;
153153
color: #b9b9b9;
154-
margin-left: @spacing;
155154
}
156155

157156
.flexlayout__tab_button_trailing {

0 commit comments

Comments
 (0)