Skip to content

Commit 0ffca82

Browse files
author
Alex
committed
Merge branch 'release/1.9.7'
2 parents 03c0ba8 + d6e3dda commit 0ffca82

File tree

5 files changed

+51
-3
lines changed

5 files changed

+51
-3
lines changed

net2vis/src/actions/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ export function toggleAlert() {
5555
return { type: types.TOGGLE_ALERT };
5656
}
5757

58+
// Toggle the Help View
59+
export function toggleHelp() {
60+
return { type: types.TOGGLE_HELP };
61+
}
62+
5863
// Toggle the Upload Alert View
5964
export function toggleUpload() {
6065
return { type: types.TOGGLE_UPLOAD };

net2vis/src/actions/types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const TOGGLE_CODE = "TOGGLE_CODE";
1212
export const TOGGLE_PREFERENCES = "TOGGLE_PREFERENCES";
1313
export const TOGGLE_LEGEND = "TOGGLE_LEGEND";
1414
export const TOGGLE_ALERT = "TOGGLE_ALERT";
15+
export const TOGGLE_HELP = "TOGGLE_HELP";
1516
export const TOGGLE_UPLOAD = "TOGGLE_UPLOAD";
1617
export const LOAD_LAYER_TYPES_SUCCESS = "LOAD_LAYER_TYPES_SUCCESS";
1718
export const LOAD_PREFERENCES_SUCCESS = "LOAD_PREFERENCES_SUCCESS";

net2vis/src/components/controls/ControlsComponent.js

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
DialogContentText,
1616
DialogTitle,
1717
} from "@mui/material";
18-
import { GetApp, BugReport } from "@mui/icons-material";
18+
import { GetApp, BugReport, Help } from "@mui/icons-material";
1919

2020
import ToggleButton from "./ToggleButton";
2121
import * as actions from "../../actions";
@@ -138,6 +138,13 @@ class Controls extends React.Component {
138138
/>
139139
</div>
140140
<div>
141+
<IconButton
142+
color="inherit"
143+
aria-label="Help"
144+
onClick={this.props.actions.toggleHelp}
145+
>
146+
<Help />
147+
</IconButton>
141148
<IconButton
142149
color="inherit"
143150
aria-label="Report Bug"
@@ -168,8 +175,7 @@ class Controls extends React.Component {
168175
<DialogContent>
169176
<DialogContentText id="alert-dialog-description">
170177
This is a research project. When using these visualizations,
171-
please cite us. You can find the publication on{" "}
172-
<a href="https://arxiv.org/abs/1902.04394">ArXiv</a>.
178+
please <a href="https://ieeexplore.ieee.org/abstract/document/9350177">cite us</a>.
173179
</DialogContentText>
174180
</DialogContent>
175181
<DialogActions>
@@ -178,6 +184,39 @@ class Controls extends React.Component {
178184
</Button>
179185
</DialogActions>
180186
</Dialog>
187+
<Dialog
188+
open={display.help_toggle}
189+
aria-labelledby="help-dialog-title"
190+
aria-describedby="help-dialog-description"
191+
>
192+
<DialogTitle id="help-dialog-title">
193+
Help
194+
</DialogTitle>
195+
<DialogContent>
196+
<DialogContentText id="help-dialog-description">
197+
Net2Vis has been a research project and is now maintained by the author of the <a href="https://ieeexplore.ieee.org/abstract/document/9350177">associated publication</a> and by the community that uses this application.
198+
Feel free to file issues on git or contribute yourself by implementing new features.
199+
<br />
200+
<br />
201+
<b>Grouping</b>
202+
<br />
203+
To create custom groups, select a layer, then shift-select another layer.
204+
If you selected layers that can be grouped, the group button on the lower right will become active.
205+
<br />
206+
<br />
207+
<b>Errors</b>
208+
<br />
209+
If your code contains an error, you will get a notification saying that your code is not executable.
210+
The code will also get a red x icon next to where the error occured.
211+
Hovering that icon provides more detail on the error.
212+
</DialogContentText>
213+
</DialogContent>
214+
<DialogActions>
215+
<Button onClick={this.props.actions.toggleHelp} color="primary" autoFocus>
216+
Thanks!
217+
</Button>
218+
</DialogActions>
219+
</Dialog>
181220
</div>
182221
</div>
183222
</Toolbar>

net2vis/src/reducers/DisplayReducer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ export default function displayReducer(state = initialState.display, action) {
1111
return { ...state, legend_toggle: !state.legend_toggle };
1212
case types.TOGGLE_ALERT:
1313
return { ...state, alert_toggle: !state.alert_toggle };
14+
case types.TOGGLE_HELP:
15+
return { ...state, help_toggle: !state.help_toggle };
1416
case types.TOGGLE_UPLOAD:
1517
return { ...state, upload_toggle: !state.upload_toggle };
1618
default:

net2vis/src/reducers/initialState.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default {
1818
preferences_toggle: true,
1919
legend_toggle: true,
2020
alert_toggle: false,
21+
help_toggle: false,
2122
upload_toggle: false,
2223
},
2324
layer_types_settings: {},

0 commit comments

Comments
 (0)