Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "add citations or references" divider header #91

Closed
4 changes: 2 additions & 2 deletions argo-scholar/src/components/Dialogs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export default class Dialogs extends React.Component {
<div style={{ display: "none" }}>
<PreferencesDialog />
{/* <ImportDialog />
<GEXFImportDialog /> */}
{/* <OpenDialog /> */}
<GEXFImportDialog />
<OpenDialog /> */}
<OpenSnapshotDialog />
{/* <NewProjectDialog /> */}
<ProjectDetailDialog />
Expand Down
12 changes: 9 additions & 3 deletions argo-scholar/src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RegularNavbar extends React.Component {
<nav className={classnames([Classes.NAVBAR])}>
<div className={classnames([Classes.NAVBAR_GROUP, Classes.ALIGN_LEFT])}>
<a href={LOGO_URL} target="_blank">
<img title="Argo Lite" id="Argo logo"
<img title="Argo Scholar" id="Argo logo"
src={appState.preferences.darkMode ? argologo_dark : argologo_light}
height="28"></img>
</a>
Expand Down Expand Up @@ -87,6 +87,7 @@ class RegularNavbar extends React.Component {
text={sampleSnapshotTitle}
onClick={() => {
window.loadAndDisplaySnapshotFromStrapi(sampleSnapshotStrapiUuid);
appState.logger.addLog({eventName: `LoadSample`, elementName: sampleSnapshotTitle})
}}
/>
);
Expand All @@ -100,7 +101,8 @@ class RegularNavbar extends React.Component {
text="Save Snapshot"
onClick={() => {
appState.project.stringCopyOfSnapshot = appState.graph.saveImmediateStates();
appState.project.isSaveSnapshotDialogOpen = true
appState.project.isSaveSnapshotDialogOpen = true;
appState.logger.addLog({eventName: `SaveSnapshot`, elementName: appState.graph.metadata.snapshotId});
}}
/>
<MenuItem
Expand Down Expand Up @@ -129,12 +131,16 @@ class RegularNavbar extends React.Component {
appState.graph.frame.pauseLayout();
appState.preferences.dataSheetDialogOpen = true;
this.forceUpdate();
appState.logger.addLog({eventName: `DataSheet`, elementName: `DataSheet`})
}}
/>
<MenuItem
text="Statistics"
iconName="pt-icon-timeline-bar-chart"
onClick={() => { appState.preferences.statisticsDialogOpen = true }}
onClick={() => {
appState.preferences.statisticsDialogOpen = true;
appState.logger.addLog({eventName: `Statistics`, elementName: `Statistics`})
}}
/>
<MenuItem text="Filters" iconName="graph">
<MenuItem
Expand Down
1 change: 1 addition & 0 deletions argo-scholar/src/components/NewNetworkDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class NewNetworkDialog extends React.Component {
event.preventDefault();
appState.graph.selectedNodes.length = 0;
appState.graph.currentlyHovered = null;
appState.logger.addLog({eventName: `CreateNewGraph`, elementName: `New...`})
}

render() {
Expand Down
1 change: 1 addition & 0 deletions argo-scholar/src/components/OpenSnapshotDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class OpenSnapshotDialog extends React.Component {

reader.onload = () => {
const fileAsString = reader.result;
appState.logger.addLog({eventName: `OpenSnapshot`, elementName: fileAsString});
appState.graph.loadImmediateStates(fileAsString);
}
}}
Expand Down
1 change: 1 addition & 0 deletions argo-scholar/src/components/SaveSnapshotDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class SaveSnapshotDialog extends React.Component {
onClick={() => {
document.getElementById('snapshot-textarea').select();
document.execCommand("copy");
// appState.logger.addLog({eventName: `SaveSnapshot`, elementName: `Copy to Clipboard`})
}}
>
Copy to Clipboard
Expand Down
20 changes: 1 addition & 19 deletions argo-scholar/src/components/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,24 +138,6 @@ class SearchBar extends React.Component {
event.preventDefault();
}

createEmptyGraph(event) {
appState.graph.runActiveLayout();
requestCreateNewProject({
name: appState.project.newProjectName,
createdDate: new Date().toLocaleString(),
});
requestCreateEmptyPaperGraph(
appState.project.newProjectName
);

// Importing a graph means no label would be shown by default,
// thus turn off label CSSRenderer for better performance.
appState.graph.frame.turnOffLabelCSSRenderer();
event.preventDefault();
appState.graph.selectedNodes.length = 0;
appState.graph.currentlyHovered = null;
}

addToast(message) {
toaster.show({
message: message,
Expand All @@ -173,7 +155,7 @@ class SearchBar extends React.Component {
rightElement={
<Popover
content={<AddNodes papers={this.state.searchResults} query={this.state.query}/>}
target={<button onClick={this.handleSubmit} class="pt-button pt-minimal pt-intent-primary pt-icon-arrow-right"></button>}
target={<button onClick={this.handleSubmit} className="pt-button pt-minimal pt-intent-primary pt-icon-arrow-right"></button>}
position={Position.BOTTOM}
isOpen={this.state.display && this.state.searchResults.length > 0}
onClose={() => {this.setState({display: false})}}
Expand Down
Loading